OpenWGA 5.0 - WebTML reference


WebTML default actions

WebTML actions are procedures that are called from a WebTML page or from other procedures as well. They normally execute customTMLScript code that needs to be defined, but there also is a number of predefined WebTML actions that can be used directly. Those are called WebTML default actions und they offer very common functionalities to be used in most OpenWGA developments, like setting WebTML variables or storing WebTML forms to their data source.

Their usage scheme is identical to using normal WebTML actions as they are addressed by an individual action ID. Each default action has a predefined ID which, to differ it from normal actions, starts with a dollar sign "$":
<tml:form id="testform" source="content">
Input: <tml:input name="field"/>
<tml:button clickaction="$store">Speichern</tml:button>
</tml:form>

This section of the documentation lists all available default actions.

action="$attach"

Description: Attaches all files that were uploaded to the current WebTML form to the content document in the current context and saves it. This is a master action and therefor not dependent on the current users access rights.

action="$hdbstore"

Description: Stores form data according to a defined HDB model

Use this to store WebTML forms that have a declared contentclass to store their data according to the HDB model.

action="$refresh"

Description: Just reloads the current WebTML page or AJAX portlet.

While this action itself has no functionality it may be useful to trigger functionalities that occur on the reload. For example you might use $refresh as change action on a <tml:input type="select"> field to allow the WebTML form code to react on a newly chosen value.

action="$reset"

Description: Resets the current WebTML form.

This equals a call to the TMLScript method tmlform.reset().

action="$setpvar"

Description: Sets a normal WebTML portlet variable.

As WebTML action parameters can only be strings this can only used to set string variables.
Parameters: param1: Name of the variable

param2: String value of the variable

action="$setsessionvar"

Description: Sets a WebTML session variable.

As WebTML action parameters are always strings this action can only be used to set string variables.
Parameters: param1: Name of the variable

param2: String value of the variable

action="$setvar"

Description: Sets a normal WebTML variable.

As WebTML action parameters can only be strings this can only used to set string variables.
Parameters: param1: Name of the variable

param2: String value of the variable

action="$store"

Description: Stores the current WebTML form on its source document, including all fields and uploaded files

This action takes the source of the WebTML form into account and stores the data on the based content document, profile or portlet configuration. In the case of a content document this also attachesuploaded files to it.

action="$setpsessionvar""

Description: Sets a WebTML portlet session variable.

As WebTML action parameters are always strings this action can only be used to set string variables.
Parameters: param1: Name of the variable

param2: String value of the variable