var - Template variable


Catalog:


Example:


Introduce

Context is a built-in object container for storing context variables.

Var's Lifecycle is only the current template. If a task has a action set, its lifecycle is only the current action + template.

[action]
   ↓
template

Usage

Two methods for setting var variable:

The above variables are set by context.setVariable(String var, Object object), and can also be used in the tag.

If you want a code content assist, select MyAction in the template header.

You can get variables by context.getVariable(String var),also get by tag.