Siebel Developer's Reference > Siebel Web Engine Tags >

swe:if, swe:switch, swe:case, swe:default


The SWE framework supports the following conditional tags: swe:if, swe:switch, swe:case, and swe:default.

swe:if

This tag provides a simple conditional branching capability.

Usage

<swe:if condition="xxx,yyy,aaa:bbb,ccc:ddd,..."> ... </swe:if>

Attributes

Condition. The condition for which to check. In the preceding usage example:

  • xxx is the business service name
  • yyy is the invoke method
  • aaa is the first argument and its value is bbb
  • ccc is the second argument and its value is ddd

If the condition evaluates to TRUE, the body of the swe:if tag is processed. If the condition evaluates to FALSE, the body of the tag is skipped.

You can use the swe:if tag with any business service, such as a custom business service that checks an HTTP header. However, the output arguments for the business service must contain a property that includes the method name and a value of 1 or 0 to indicate whether it is true or false.

The common conditions supported by the preconfigured business service Web Engine State Properties are:

  • IsEvenRow
  • IsOddRow
  • IsCurrentRow
  • IsErrorRow
  • IsRowMultipleOf
  • IsRowPositionOf
  • IsLastDisplayedRow
  • IsHighInteractive
  • IsHighInteractiveApplet
  • IsLowInteractive
  • Invalid

NOTE:  This tag does not provide an "else" capability like the if tags in programming languages. To get that behavior use the swe:switch, swe:case, and swe:default tags.

swe:switch, swe:case, and swe:default

These three tags are used together to provide a conditional branching capability similar to the switch, case, and default statements in C and C++ languages. The swe:switch is a container tag for the swe:case and swe:default tags. Anything other than the swe:case and swe:default tags 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. Only one swe:default tag within the body of a swe:switch tag is allowed.

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 are skipped without checking their associated conditions. If the condition evaluates to FALSE, the body of the tag is skipped.

NOTE:  The format for the condition is the same as the format described for the swe:if tag.

Siebel Developer's Reference Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.