Siebel Developer's Reference > Siebel Web Engine Tags > Program Logic Tags >

Switch, Case, and Default Tags


The switch, case, and default tags provide conditional branching that is similar to the switch, case, and default statements in the C++ language. For example, they can use the following format:

<swe:switch>
<swe:case condition="case_tag_attribute">
...
</swe:case>
<swe:case condition="case_tag_attribute">
...
</swe:case>
<swe:default>
...
</swe:default>
</swe:switch>

where:

  • condition. Is an attribute of the case tag that specifies the condition that SWE examines. The condition attribute uses the same format that the if tag uses. If any case tag:
    • Satisfies the condition. SWE ignores all subsequent case tags and default tags. It processes the body of the if tag.
    • Does not satisfy the condition. SWE processes the body of the default tag.

      For more information, see If Tag.

Note the following:

  • The switch tag is a container tag that SWE uses for the case and default tags. SWE ignores any other type of tag that the body of the switch tag contains.
  • SWE examines the case tags starting with the first case tag it encounters.
  • SWE allows only one default tag in the body of a switch tag.
Siebel Developer's Reference Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.