config not preserved in controller across binder mp invocations?


I have two methods in my controller, named index and show respectively. index() will be called by default from the application.json setup with additional config ("title"). Subsequently when I click on a button, show() will be called and should display the "title" config. However during my testing, after clicking on the button, "title" is empty.

I believe (from my previous experience) that IF the controller was loaded into front-end, ie both index() and show() are invoked in client side, then this problem will not exist.

Maybe this behaviour is intentional by design choice?

Versions: mojito 0.7~0.9

I have setup a demo to illustrate what I was talking about: https://github.com/ftliou/mojito94-test

For now in order to preserve config - I use ac.data.set() in index() and ac.data.get() in show()

I am not sure if there is a better way to do this?

Thanks again.

  • FT
  • May 18, 2014
0 Replies

Recent Posts

in Yahoo! Mojito