0

Periodic Auto Refresh

asked 2007-05-30 19:32:39 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4336894

By: stevechai

I need to reload real-time data from server and display at client side periodically and automatically. It is like Yahoo Finance auto refresh stock price periodically.
How to do it?

Thanks

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2007-05-31 14:04:05 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4337935

By: stevechai

Thanks a lot.



link publish delete flag offensive edit

answered 2007-05-31 14:00:21 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4337928

By: ansancle

Ignore the reference to <DHzMenuBar/> in the .zul - I forgot to delete that.

link publish delete flag offensive edit

answered 2007-05-31 13:18:49 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4337902

By: ansancle

Here is a sample .zul file that has a timer in it :

<window id="testWindow" use="com.dh.mui.test.DHzTestWindow" title="Test Window"
border="normal" width="700px">
<DHzMenuBar/>
<timer id="timer" delay="1000" repeats="true"
onTimer="testWindow.onTimer()"/>
<label id="timeLabel" value="Messages Last Checked at " />
</window>

And here is the corresponding java file onTimer callback method. Change the value of delay in the .zul to adjust the time between callbacks.

public void onTimer()
{
// Inside this method you can query your database for updates and then update the screen to show
// The new values - since you are in the ZK event loop in here you can update screen components.
}

link publish delete flag offensive edit

answered 2007-05-31 01:50:32 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4337266

By: jumperchen

Try to use Timer to solve your issue.

/Jumper

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: 2007-05-30 19:32:39 +0800

Seen: 1,069 times

Last updated: May 31 '07

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