0

manually creating timer

asked 2006-02-27 08:07:02 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

By: rob_chou

I'm trying to manually create a timer with the following code. It doesn't cause an error but it doesn't do anything either. Any clues?

Timer tm = new Timer( 5000 );
tm.setRepeats( true );
tm.setAttribute( "onTimer", "timerRefresh();", tm.COMPONENT_SCOPE ); tm.setParent( main ); tm.start();


delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2006-02-27 09:05:52 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

By: tomyeh

The concept of component's attributes is similar to that of request's attributes.
It is "storage" to keep data (for your purpose). It is nothing to do with the member or method of the component. (It is unlike JavaScript)

To add an event listener, you have to either call Component.addEventListener, or extend Timer to provide a method called onTimer.

link publish delete flag offensive edit

answered 2006-02-27 18:56:58 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

By: nobody

ok, addEventListener takes a "String evtnm" parameter. What's name for a timer event?

thanks,
rob

link publish delete flag offensive edit

answered 2006-02-28 01:33:56 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

By: tomyeh

onTimer

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: 2006-02-27 08:07:02 +0800

Seen: 530 times

Last updated: Feb 28 '06

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