Save directive |
Use the Save directive to set up named values at runtime, while the source HTML is processed, onto an internal symbol table known as the scratchpad. This in-memory scratchpad — a list of names and values — is available throughout the generation of the HTML stream.
The save JavaServer Page tag provides a functionally identical capability. See JSP Tags — save.
Use the Save directive to pass values among multiple HTML definitions that stream processing combines to generate a single output stream.
For example, use the Save directive to save the Short Description (pyLabel) for the current class instance and store it in a scratchpad variable named label.
{SAVE label={lookup pyLabel Rule-Obj-Class pyClassName {.pyObjClass}}}
Later in the stream, you can use the $SAVE
keyword in the Reference directive to look up the saved value on the scratchpad and display the saved value.
{$save(label)}
An advantage of the Save directive over the Lookup directive is that, with Save, you can override the control display associated with pyLabel.
In the syntax presentations below:
[
and ]
define optional parts of the directive. Do not type the brackets.{
and }
mark the start and end of the directive.{SAVE propertyname [=] value}
Retrieve the saved name using the $SAVE
keyword in a Reference directive.
{REFERENCE $SAVE(name)}