Configuring Siebel eBusiness Applications > Specialized Behavior Supported by Web Templates > Favorites (Predefined Queries) >

Conditional Tags: <swe:switch>, <swe:case>, and <swe:default>


Purpose: These three tags are used together to provide a conditional branching capability similar to the switch, case, and default statements in JavaScript. The <swe:switch> is a container tag for the <swe:case> and <swe:default> tags. Anything other than <swe:case> and <swe:default> within the body of the <swe:switch> tag is ignored. The condition to check is specified as an attribute of the <swe:case> tag. The <swe:case> tags are checked starting from the first <swe:case> tag. If any of the <swe:case> tags satisfies the condition, the other <swe:case> tags and the <swe:default> tags are skipped. If none of the <swe:case> tags satisfy their condition, the body of the <swe:default> tag is processed. There should only be one <swe:default> tag within the body of a <swe:switch> tag.

Usage: <swe:switch>

<swe:case condition="xxx">

...

</swe:case>

<swe:case condition="yyy">

...

</swe:case>

<swe:default>

...

</swe:default>

</swe:switch>

Attributes:

  • Condition. Supported only in the <swe:case> tag. If the condition evaluates to TRUE, the body of the <swe:case> tag is processed. Any subsequent <swe:case> tags within the <swe:switch> tag is skipped without checking their associated conditions. If the condition evaluates to FALSE, the body of the tag is skipped.
Configuring Siebel eBusiness Applications