How do I run command in view end ?

asked 2015-01-24 13:22:18 +0800

unitcell gravatar image unitcell
28 4

updated 2015-01-26 01:02:58 +0800

cor3000 gravatar image cor3000
5613 2 7
ZK Team

Hi all,

How do I run command in view end ?

in view end,part below,

  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.

in vm,

  public void deletePro() {


delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted

answered 2015-01-24 14:09:53 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9

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.

link publish delete flag offensive edit

answered 2015-01-25 18:34:15 +0800

Darksu gravatar image Darksu
1991 1 4

Hello unitcell,

At the following post you can find an alternative solution to your problem:


Best Regards,


link publish delete flag offensive edit

answered 2015-01-26 10:38:43 +0800

liunnek gravatar image liunnek

that is really helping!

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2015-01-24 13:22:18 +0800

Seen: 25 times

Last updated: Jan 26 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More