星期二, 3月 15, 2011

[ZK] Messagebox EventListener

捕捉Question Messagebox的事件

//popup messagebox
Messagebox.show("Are you sure?",
      "Question", Messagebox.OK | Messagebox.CANCEL,
      Messagebox.QUESTION, new EventListener() {
       public void onEvent(Event event) throws Exception {
        //if clicks ok to do something
        if (((Integer) event.getData()).intValue() == Messagebox.OK) {
         //to do something
        }
       }
      });

沒有留言:

張貼留言

留個話吧:)

其他你感興趣的文章

Related Posts with Thumbnails