Show TOC

Object documentationTimer Locate this document in the navigation structure

 

This control fires a server or client event after a preset time. The time is set in 1/1000 seconds. The timer control has no visible effect. The timer control can be for client side eventing. See the EventValidationComponent description for more details.

  • clientEvent

    Defines the JavaScript fragment that is executed when the time out event occurs. If both events ('serverEventName' and 'clientEvent') are specified, the 'clientEvent' event handling method is activated and the serverEventName is omitted.

  • enabled - inherited from EventValidationComponent.

    A boolean value that enables (=true) or disables (=false) the timer control. A disabled timer sends no event when clicked.

  • id

    Identification name of the timer component.

  • jsObjectNeeded - inherited from Component.

    A boolean value that defines if a JavaScript object has to be generated for the timer component.

  • serverEventName

    A boolean value that activates (=TRUE) or deactivates (=FALSE) the "Insert Image/Link" function.

  • timeOut

    Time span after which the event is fired. The time value is set in milli seconds.

Attributes

M

Values

Usage

enabled*

FALSE

TRUE (d)

Taglib

No tag available

Classlib

setEnabled(true)

id

*

String (cs)

Taglib

id="timer"

Classlib

setId("timer")

jsObjectNeeded**

FALSE (d)

TRUE

Taglib

No tag available

Classlib

setJsObjectNeeded(true)

timeout

Value (0)

Taglib

timeout="1000"

Classlib

setTimeOut(1000)

* Method is inherited from the EventValidationComponent component.

** Method is inherited from the Component component.

Events

M

Values

Usage

clientEvent

with event type

Taglib

No tag available

Classlib

setClientEvent(EventTrigger.ON_TIMEOUT, " alert('Timeout')")

clientEvent

String (cs)

Taglib

clientEvent="alert('Timeout')"

Classlib

setClientEvent("alert('Timeout')")

serverEventName

String (cs)

Taglib

serverEventName="onTimeout"

Classlib

setServerEventName("onTimeout")

Example

using the taglib

Syntax Syntax

  1.   <hbj:timer id="timeOut"
          serverEventName="myTimeoutEvent"
          timeOut="12000"
      />
    
End of the code.

using the classlib

Syntax Syntax

  1.     Form form = (Form)this.getForm();
        Timer timer = new Timer("timeOut");
        timer.setServerEventName("myTimeoutEvent");
        timer.setTimeOut(12000);
        form.addComponent(timer);
    
End of the code.