0

ShowBusy delay inside of a listener

asked 2012-12-27 11:12:32 +0800

frann gravatar image frann
12

updated 2013-01-22 03:55:12 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

Hi, I have a problem with a Clients.showbusy inside of a listener, it's just shows when the process of a Listener is over, here I have some pseudo code:

private EventListener processServiceAnswerChatEventListener = new EventListener() {

     public void onEvent(Event e) throws Exception {
           Label lb = new Label(scriptDialog.getTxPostChat());
          Clients.showBusy(lb .getValue()); -> SHOULD SHOW THE MESSAGE OF PROCESS HERE BUT
          //WEB SERVICE CALL. 
          List<Return> listReturnFromService = ServiceUtil.getServiceReturn(scriptDialog.getUrl(),mapParams); 
         //AT THIS POINT THE MESSAGE IS CALL,AND THE PROCESS IS OVER. 
     }
};

Does some one have a solution fo this?! I really tried everything... But it's just not work.

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2013-01-22 06:12:05 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

You can use Use Echo Events to do so.

For example

<window id="w" width="200px" title="Test echoEvent" border="normal">
  <attribute name="onLater">
  doLongOperation(); //take long to execute
  Clients.clearBusy(); //remove the busy message
  </attribute>

  <button label="Echo Event">
  <attribute name="onClick">
  Clients.showBusy("Execute..."); //show a busy message to user
  Events.echoEvent("onLater", w, null); //echo an event back 
  </attribute>
  </button>
</window>
link publish delete flag offensive edit
Your reply
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

Follow

RSS

Stats

Asked: 2012-12-27 11:12:32 +0800

Seen: 53 times

Last updated: Jan 22 '13

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