onlyonce JavaServer Page tag |
Use the onlyonce JSP tag to indicate that text within the body of the tag is to be included in the stream processing output only the first time that an onlyonce tag of that name is found.
This tag is primarily useful in complex HTML streams to prevent multiple definitions of JavaScript functions.
When entering HTML source code directly into the HTML tab of a HTML Property rule (or similar form), you can minimize the size of the resulting HTML document with the <pega:onlyonce > and <pega:static > tags. See Including only one copy of JavaScript code in More About HTML property rules.
For example, this tag is named Alpha.
<!-- define scripts -->
<pega:onlyonce name="Alpha" >
<b> The work object id is <pega:reference
name=".pyID">.
</pega:onlyonce >
During stream processing, if another onlyonce tag named Alpha appears, the body of the second (and later) tags are skipped over and not processed.
In the syntax presentations below:
<pega:onlyonce
name="name" >
HTML, XML or JavaScript code to process only once
</pega:onlyonce >
The name
attribute is required.
Attribute |
Description |
name
|
Set the name attribute to an arbitrary non-blank text
value. Case is significant. During stream processing,
second and later appearances of an
|