OpenWGA 7.5 - OpenWGA Concepts and Features

Design and development » WebTML » Basic concepts » Options

Options and WebTML portlets

Another feature of WebTML options is their behaviour regarding AJAX in WebTML portlets. If a portlet gets reloaded via AJAX then the WebTML options that were available on the initial portlet rendering are recovered. They are then again available to the re-rendered portlet code. So regarding WebTML options the environment of an WebTML portlet remains constant accross AJAX requests.

This differs options from WebTML variables. If a WebTML portlet is dependent on a WebTML variable that was set outside the portlet then this variable will not be available if the portlet is reloaded via AJAX.

Options can be passed to WebTML portlets like they are to Includes, as <tml:portlet> is derived from <tml:include>:

<tml:portlet name="ticker" ref="portlets:ticker:portlet" ajax="true">

    <tml:option name="codes">ibm,sap</tml:option>

</tml:portlet>

Regarding this functionality the option feature of "local" scope gains importance. To be recovered these available WebTML options need to be sent across the network in case of an AJAX-reload. This means more traffic the more options need to be transported. Setting options to "local" scope may keep them from being transported in all AJAX request of included portlets, thus helping to reduce traffic.