Multiple view models in same page
Nobody?
You can send events from one Window to another or pass arguments via Executions.getCurrent().setAttribute(name, value) when navigating to the new page
Can you please send me a example? Wow can i sent this event via ajax?
Window A call Window B
you send argument pass for window A to Windo B
in controller Window A
public void btnPassWinB$onClick(Event event){
HashMap<String,object> mapArg=new HasMap();
mapArg.put("myObject",youObject);
Executions.createCompnents("ruta/windowB.zul",null,mapArg)
}
in Controller window B
public void doAfterCompose(Component comp)throws Exception{
map=(map<String,Object>)Excution.getCurrent().getDesktop();
myModel=map.get("myObject",youObject)
map.clear.
}
otherwise
separate and create you model
.
you model send a Window B
.........................
myListbox.setModel(myModel);
map.put("youModel",myModel);
......................
in controller B
MyModel modelList=map.get("youModel")
modelList.add().....modelList.delete().....model.getIndexSelected()................................
otherwise
integrate spring and model pass argument facade spring.
you objet spring
springObject.get("myModel");
en you xml
<bean id="myModel" class="youPackageModel" .......>
en you Window B
spring.getBean("myModel"......)......
otherwise
create singleton y pass model a clase singleton.
many ways in order to update its model
espero que te sirva.
Eric Rosas Lizama
ZK - Open Source Ajax Java Framework
Hi folks!
I have one view model that i want to reuse in a master/detail page.
Is there any way to make the master viewmodel notify (or change directly) one property of the detail viewmodel?
Thanks in advance!
Best Regards
Thiago Lacerda