Timer

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.

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

Class Name

org.zkoss.zul.Timer

Supported Child Components

*NONE

Supported Events

Event Name

Event Type

onTimer

org.zkoss.zk.ui.event.Event

Description:

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

Properties

Property

Description

Data Type

Default Value

delay

Sets the delay, the number of milliseconds between successive action events.

Note : 0 means immediately

int

0

repeats

Sets whether the timer shall send Event repeatedly.

Values : true|false

boolean

false

running

Start or stops the timer.

Values : true|false

boolean

true

Methods

Name

Description

Data Type

Values

start

Starts the timer.

void

stop

Stops the timer.

void

Inherited From