Save directive

About directives

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.

JSP equivalent

The save JavaServer Page tag provides a functionally identical capability. See JSP Tags — save.

Example

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.

Complete syntax

In the syntax presentations below:

{SAVE propertyname [=] value}

Retrieve the saved name using the $SAVE keyword in a Reference directive.

{REFERENCE $SAVE(name)}

definitionsscratchpad, stream processing

Up Directives