Back ForwardWhen directive

About directives

  

Use the When directive to conditionalize a segment of HTML or XML, whether used for display, user input or correspondence. Use it to control whether stream processing includes, or omits, parts of HTML text under conditions that you determine. You can base the conditions on Boolean values returned by properties, Java methods, or When rules.

JSP equivalent

The pega:when JavaServer Page tag provides a functionally identical capability. See JSP Tags — when.

  Example

  Complete Syntax

  $MODE-INPUT and $INPUT-ENABLED keywords

  Using a When rule

  Using Java methods

  Working with more than one condition

  Evaluating an expression

Up Directives