-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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.
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>
Asked: 2012-12-27 11:12:32 +0800
Seen: 53 times
Last updated: Jan 22 '13