第一:我很震驚,我不得不問這個問題。文檔中沒有任何地方解釋瞭如何使用新的「WindowManager」......我一直在圍繞這個問題進行幾個小時的攻擊,而且我還沒有像這樣微不足道的行事方式:我如何輕鬆地在Griffon中顯示/隱藏視圖
def vName = 'Error'
if (!app.views[vName]) { //I just want to create it once, otherwise I'd just change it's model and want to show() it!
buildMVCGroup(vName, vName, errorCode: 500, message: "fail detected ;-)") //ok, this indeed shows the idem (as it's an "frame(/**/show: true,/*...*/", but I dont want to create it each time
}
// app.windowManager.show(app.views.Error) //fails, show() want's an Window, and app.views.Error is of ErrorView type
// app.views.Error.visible = true //won't display the view
// app.views.Error.show() // there is no such method
我還需要一個很好的方式來隱藏,這樣的:
//in controller
def view
def hideAction = {
//view.hide() //fails, no such method...
}
另一種方式,會讓我快樂,是一種簡單的方法來「當用戶單擊OK(在ErrorView」,處置這MVCGroup。我一直在搜索和閱讀相當一段時間的例子,但仍然無法弄清楚如何編寫這樣簡單的應用程序流HMM ...
個提前爲如何做到這一點的任何想法非常感謝, 歡呼
很酷,非常感謝評論ecspike :-) – 2010-12-06 18:21:17