Timer"

From Documentation
m (Created page with 'init')
 
Line 1: Line 1:
init
+
{{ZKComponentReferencePageHeader}}
 +
 
 +
= Timer =
 +
 
 +
*Demonstration: [http://www.zkoss.org/zkdemo/userguide/#u3 Timer]
 +
*Java API: <javadoc>org.zkoss.zul.Timer</javadoc>
 +
*JavaScript API: <javadoc directory="jsdoc">zul.utl.Timer</javadoc>
 +
 
 +
= Employment/Purpose =
 +
Timer is a special component that is invisible. It fires one or more org.zkoss.zk.ui.event.Event after a specified delay.
 +
Notice that the timer won't fire any event until it is attached to a page.
 +
 
 +
 
 +
= Example =
 +
<source lang="xml" >
 +
<label id="now" />
 +
<timer id="timer" delay="1000" repeats="true"
 +
onTimer="now.setValue(new Date().toString())" />
 +
</source>
 +
 
 +
 
 +
 
 +
 
 +
=Supported events=
 +
 
 +
{| border="1" | width="100%"
 +
! <center>Name</center>
 +
! <center>Event Type</center>
 +
|-
 +
| <center><tt>onTimer</tt></center>
 +
| '''Event:''' <javadoc>org.zkoss.zk.ui.event.Event</javadoc>
 +
 
 +
Denotes the timer you specified has triggered an event. To know which timer, invoke the <tt>getTarget</tt> method in the Event class.
 +
|}
 +
 
 +
=Supported Children=
 +
 
 +
*NONE
 +
 
 +
=Use cases=
 +
 
 +
{| border='1px' | width="100%"
 +
! Version !! Description !! Example Location
 +
|-
 +
| &nbsp;
 +
| &nbsp;
 +
| &nbsp;
 +
|}
 +
 
 +
=Version History=
 +
 
 +
{| border='1px' | width="100%"
 +
! Version !! Date !! Content
 +
|-
 +
| 5.0.2
 +
| 5/19/2010
 +
| Initialization
 +
|}
 +
 
 +
{{ZKComponentReferencePageFooter}}

Revision as of 04:22, 18 May 2010

Timer

Employment/Purpose

Timer is a special component that is invisible. It fires one or more org.zkoss.zk.ui.event.Event after a specified delay. Notice that the timer won't fire any event until it is attached to a page.


Example

<label id="now" />
<timer id="timer" delay="1000" repeats="true"
	onTimer="now.setValue(new Date().toString())" />



Supported events

Name
Event Type
onTimer
Event: Event

Denotes the timer you specified has triggered an event. To know which timer, invoke the getTarget method in the Event class.

Supported Children

*NONE

Use cases

Version Description Example Location
     

Version History

Version Date Content
5.0.2 5/19/2010 Initialization



Last Update : 2010/05/18

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.