OpenWGA 5.4 - WebTML reference

WebTML tags


Description :
<tml:button> creates an HTML button tag which can be used to call TML actions.
Derived from: Attributes:
show inherited attributes ...
Name Value(s) Purpose
clickaction action id / tml module reference Defines the action to call on button click. It is recommended to define actions in separate TMLScript modules and use module references to reference the action code.
confirm confirm-message Defines a confirmation message that must be accepted by the user before the action is executed
cssclass css class Optional css class to customize the button layout
cssstyle css styles Optional css styles to customize the button layout

The attribute 'clickaction' defines the id of action to call when the button is clicked. The attributes 'param1' to 'param5' can be used to parameterize the action. The body of the <tml:button> tag is used as body of the HTML button tag and defines the button label. To customize the button layout the attributes 'cssclass' and 'cssstyle' can be used.

<tml:htmlhead/> is required in the page header to use this tag.
This example shows the usage of <tml:button> to call an action with id 'anAction'. The action defines a TML variable 'msg' which is later displayed by a <tml:item> tag.

<tml:action id="anAction">

    this.setvar("msg", "Click!");

<tml:item name="msg"/>

<tml:button clickaction="anAction">Click me!</tml:button>