-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello list,
I have created a modal window: Executions.createComponents ("/ ventanaDlg.zul", null, map);
Then in the ViewModel "VentanaDlgVM.java" i have the following code:
@Command
@NotifyChange("listaComite")
public void OnEliminar(@BindingParam("comite") ComiteElectoral comite){
if ( Messagebox.show("Delete the item: "+comite.getVotante(),
"Confirmación", Messagebox.OK | Messagebox.CANCEL, Messagebox.QUESTION)== Messagebox.OK ){
listaComite.remove(listaComite.indexOf(comite));
}
}
But when I run the command, I then display the dialog via "MessageBox.Show" but the execution does not stop , but unlike performs the action that goes on and removes the data from the list of "listaComite.remove"
What's the problem?
I am using ZK CE 6.5.2
Thank you very much,
Atte. Andres Mamani.
I can not send a reply, so I edit.
thanks @ sjoshi yet "view" or "null" is equal in this case
I do not remember why, but I read some time ago that I had to set the zk.xml
<system-config>
<ui-factory-class>
org.zkoss.spring.bean.ZkSpringUiFactory
</ui-factory-class>
<disable-event-thread> false </disable-event-thread>
</system-config>
I had it set in a previous project :) and still is valid for MVVM. This will solve the problem with a modal window or MessageBox.Show
Also use zkspring
Thank you.
I am not sure but may be issue to pass Null Value .Why you are passing Null Here?
Executions.createComponents ("/ ventanaDlg.zul", null, map);
You should pass the object of Component class rather than Null
For more Information you can check my answer Here. May be it will help you.
See below code for more information
@Command
public void openModal(@ContextParam(ContextType.VIEW) Component view){
Executions.getCurrent().createComponents("/modalWindow.zul",
view, "Your Parameter Value");
}
Asked: 2013-08-20 16:23:20 +0800
Seen: 42 times
Last updated: Aug 20 '13