0

echo event in ZK - long operations

asked 2015-09-08 14:06:55 +0800

mayuranjan gravatar image mayuranjan
1 1

updated 2015-09-09 04:36:16 +0800

Hi,

I am trying to implement the below example

books.zkoss.org/wiki/ZKDeveloper'sReference/UIPatterns/LongOperations/ UseEchoEvents

in this example there is "doLongOperation(); //take long to execute". How can i implement this?

The Code is as below:

<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>

And i am using the "doLongOperation()" method in vm. But this is not working.

delete flag offensive retag edit

Comments

can you post what you have already?

chillworld ( 2015-09-08 17:24:20 +0800 )edit

i have updated it in the question.

mayuranjan ( 2015-09-09 04:32:53 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-09-13 16:44:29 +0800

Darksu gravatar image Darksu
1991 1 4

Hello mayuranjan,

Please check the code at the following fiddle (there is an example there):

http://zkfiddle.org/sample/n2ppio/4-Progressmeter-with-EventQueue-and-Timer#source-2

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2015-09-18 05:01:21 +0800

cor3000 gravatar image cor3000
6280 2 7

Hi,

if you really want to work with echo events it's easier to implement the long operation in a java composer. (Doing this inside the zul file is not very performant)

here an example:

http://zkfiddle.org/sample/1a6k88i/1-long-operation-with-echo-events

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

Follow
1 follower

RSS

Stats

Asked: 2015-09-08 14:06:55 +0800

Seen: 88 times

Last updated: Sep 18 '15

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