-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all,
How do I run command in view end ?
in view end,part below,
<zscript>
void delete() {
Messagebox.show("Delete it ?", "confirm", Messagebox.NO|Messagebox.YES, Messagebox.QUESTION,
new org.zkoss.zk.ui.event.EventListener(){
public void onEvent(Event e) throws Exception {
if(e.getName().equals("onYes")) {
//onCreate="@command('deletePro')"; // <--- My Question here.
}
}
});
}
</zscript>
in vm,
@Command
public void deletePro() {
...
}
Thanx.
Please do not use zscript in your applications. This is for fast prototyping or testing purpose.
Another reason is that Zscript is interpreted by the beanshell and this will result in slower execution than a normal java class.
This should be in your viewmodel under the command delete.
From there you can acces your other method very easy.
Greetz chill.
Hello unitcell,
At the following post you can find an alternative solution to your problem:
http://forum.zkoss.org/question/77757/how-to-include-a-modal-confirmation-message-box-before-calling-mvvm-command/
Best Regards,
Darksu
Asked: 2015-01-24 13:22:18 +0800
Seen: 27 times
Last updated: Jan 26 '15
How to stop combining commands in an ajax call ?
Use parameters in a conditional @command
Validator. Retrieve command arguments
key event listener for whole page
event.stopPropagation in MinimizeEvent not working in zk 7.0.1
Not send parameters via command from native table. MVVM
binder does not find command annotation in parent class of viewmodel
zk8 client side binding to a viewmodel command seems not to work