-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I'm building my first ZK6 app, and I have a question about where the best place is to store global data that all MVVM models can access, and hopefully allow for this global data to be passed as @init parameters to the model class.
In the equivalent ZK5 functionality I was using 'Desktop.setAttribute' to store attributes that all views might access. Then in the composer classes I would check for the presence of mandatory global data and throw an error if required global data values were not found.
Looking through the equivalent ZK6 docs I can only find the example of...
org.zkoss.zk.ui.Execution ex = org.zkoss.zk.ui.Executions.getCurrent(); ex.setAttribute("param1","abc"); @Init public void init(@ExecutionParam("param1") String param1){ this.param1 = param1;
Asked: 2012-04-11 06:43:37 +0800
Seen: 191 times
Last updated: Apr 11 '12