PATH |
A WOConditional object controls whether a portion of the HTML page will be generated, based on the evaluation of its assigned condition.
WOConditional { condition=aBoolean; [negate=aBoolean;] ... };
YES
or true
,
and assuming that negate isn't in effect,
the HTML code controlled by the WOConditional object is emitted;
otherwise it is not.false
or NO
.The negate attribute lets you use the same test to display mutually exclusive information; for example:
<HTML> <WEBOBJECTS NAME="PAYING_CUSTOMER">Thank you for your order!</WEBOBJECTS> <WEBOBJECTS NAME="WINDOW_SHOPPER">Thanks for visiting!</WEBOBJECTS> </HTML>
PAYING_CUSTOMER: WOConditional {condition=payingCustomer;}; WINDOW_SHOPPER: WOConditional {condition=payingCustomer; negate=YES;};
- payingCustomer { if (/* ordered something */) { return YES; } return NO; }