1

I'm learning Griffon framework and I have the following problem:

mvcGroupInit isn't invoked when I call buildMVCGroup(...) - should I explicitly invoke it after this method call? (What about model and view injection then?)

My app:

in view ('main app' mvc):

widget(buildMVCGroup([base:new MyClass(), queue:model.queue],
                            "button", "1").view.buttonView)

in ButtonController (never invoked):

void mvcGroupInit(Map args) {
    println "############MVCGroupInit Button"
    // this method is called after model and view are injected
    model.base = args.base
    model.queue = args.queue
}

Or please suggest how I should build and init MVC groups?

EDIT: Griffon 0.9.4

Xeon
  • 5,949
  • 5
  • 31
  • 52

2 Answers2

0

That method should be called whenever a group is instantiated. If it's not happening then that's likely a bug introduced in 0.9.4. Have you tried the latest 0.9.5-rc1 release?

Andres Almiray
  • 3,236
  • 18
  • 28
0

Actually I had to reinstall my whole system, and when I run my code now - it works (though println isn't printing to the console in eclipse from mvcGroupInit). Maybe it was caching problem.

Xeon
  • 5,949
  • 5
  • 31
  • 52