Bookshelf Home | Contents | Index | PDF |
Siebel Developer's Reference > Siebel Web Engine Tags > swe:if, swe:switch, swe:case, swe:defaultThe SWE framework supports the following conditional tags: swe:if, swe:switch, swe:case, and swe:default. swe:ifThis tag provides a simple conditional branching capability. Usage<swe:if condition="xxx,yyy,aaa:bbb,ccc:ddd,..."> ... </swe:if> AttributesCondition. The condition for which to check. In the preceding usage example:
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:
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:defaultThese 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. UsageAttributesCondition. 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. | |