OpenWGA 7.6 - OpenWGA Concepts and Features
Design and development » TMLScript » Items, metadata and variables in TMLScriptPriorities of variable types
As Items, JavaScript variables and WebTML variables are sometimes retrieved using the same functionality an order of priority must exist to answer the question which type is retrieved when there are multiple equally named variables of different types.
TMLScript follows this rule of thumb: The smaller the scope, the higher the priority
Variables of lower scope are normally more specific to the current code than those with a bigger scope. So it is more likely that they are meant when their name is used.For the known variable types this means the following priority list:
Priority | Type | Scope |
---|---|---|
1. | JavaScript variables | The current script |
2. | Portlet variables | In the current portlet and request |
3. | Portlet session variables | In the current portlet for the browser session |
4. | Normal WebTML vaiables | The current request |
5. | WebTML session variables | The browser session |
6. | Items- and metadata | Persistent |