|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
AWIf is the fundamental conditional control structure. It's body is evaluated based on the evaluation of its test condition binding.
Typical use:
<a:If ifTrue="$userCanEditItem">
<a:TextField value="$theItem">
<a:Else/>
<a:String value="$theItem">
</a:If>
Note that all of the condition bindings available on the a:If element can also be use on a:Else (and a single a:If block can have multiple conditional a:Else sections.
While a:If supports comparison operations (<a:If isGreaterThan="$rating" value="50"/>)
use of the expression language may be clearer (<a:If ifTrue="${rating > 50}"/>)
| Bindings | |||
|---|---|---|---|
ifTrue
|
Tests for boolean True (or not null) |
boolean (get) |
|
ifFalse
|
Tests for boolean False (or null) |
boolean (get) |
|
equalNull
|
Tests for == null |
Object (get) |
|
notEqualNull
|
Tests for == null |
Object (get) |
|
isEqual
|
Comparison operator: |
Object (get) |
|
isNotEqual
|
Comparison operator: |
Object (get) |
|
isGreaterThan
|
Comparison operator: |
Object (get) |
|
isGreaterThanOrEqual
|
Comparison operator: |
Object (get) |
|
isLessThan
|
Comparison operator: |
Object (get) |
|
isLessThanOrEqual
|
Comparison operator: |
Object (get) |
|
java.lang.Objectariba.ui.aribaweb.util.AWBaseObject
ariba.ui.aribaweb.core.AWBaseElement
ariba.ui.aribaweb.core.AWBindableElement
ariba.ui.aribaweb.core.AWIf
public class AWIf
| Nested Class Summary | |
|---|---|
static class |
AWIf.AWIfBlock
|
| Constructor Summary | |
|---|---|
AWIf()
|
|
| Method Summary | |
|---|---|
AWIf.AWIfBlock[] |
_conditionBlocks()
|
void |
add(AWElement element)
|
void |
applyValues(AWRequestContext requestContext,
AWComponent component)
The receiver should take any form values (or query string parameters) that it owns from the AWRequestContext.request(). |
static boolean |
evaluateConditionInComponent(AWBinding conditionBinding,
AWComponent component,
boolean negate)
|
void |
init(String tagName,
Map bindingsHashtable)
|
AWResponseGenerating |
invokeAction(AWRequestContext requestContext,
AWComponent component)
The receiver should determine if it is the intended recipient of the current action (by checking the AWRequestContext.request() AWRequest.senderId()) and,
if so, handle the action and return the result. |
void |
renderResponse(AWRequestContext requestContext,
AWComponent component)
The receiver should render its content to the AWRequestContext.response() |
void |
setLineNumber(int lineNumber)
|
void |
setTemplateName(String name)
|
String |
toString()
|
void |
validate(AWValidationContext validationContext,
AWComponent component)
Checks for things like valid binding names and definitions. |
| Methods inherited from class ariba.ui.aribaweb.core.AWBindableElement |
|---|
allBindings, appendTo, determineInstance, tagName |
| Methods inherited from class ariba.ui.aribaweb.core.AWBaseElement |
|---|
bareStringContent, clone, continueVisit, determineInstance, lineNumber, startVisit, templateName |
| Methods inherited from class ariba.ui.aribaweb.util.AWBaseObject |
|---|
debugString, ensureFieldValuesClear, getFieldValue, init, isKindOfClass, localizedJavaString, logString, logWarning, setFieldValue |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ariba.ui.aribaweb.core.AWElement |
|---|
clone |
| Methods inherited from interface ariba.ui.aribaweb.util.AWObject |
|---|
getFieldValue, init, isKindOfClass, setFieldValue |
| Methods inherited from interface ariba.ui.aribaweb.core.AWCycleableReference |
|---|
determineInstance |
| Methods inherited from interface ariba.ui.aribaweb.util.AWObject |
|---|
getFieldValue, init, isKindOfClass, setFieldValue |
| Methods inherited from interface ariba.ui.aribaweb.core.AWVisitable |
|---|
continueVisit, startVisit |
| Constructor Detail |
|---|
public AWIf()
| Method Detail |
|---|
public AWIf.AWIfBlock[] _conditionBlocks()
public void setTemplateName(String name)
setTemplateName in class AWBaseElementpublic void setLineNumber(int lineNumber)
setLineNumber in class AWBaseElement
public static boolean evaluateConditionInComponent(AWBinding conditionBinding,
AWComponent component,
boolean negate)
public void init(String tagName,
Map bindingsHashtable)
init in interface AWBindableinit in class AWBindableElementpublic void add(AWElement element)
add in interface AWElementContaining
public void applyValues(AWRequestContext requestContext,
AWComponent component)
AWCycleableAWRequestContext.request().
applyValues in interface AWCycleableapplyValues in class AWBaseElementrequestContext - the context for the current request.component - the current parent component
public AWResponseGenerating invokeAction(AWRequestContext requestContext,
AWComponent component)
AWCycleableAWRequestContext.request() AWRequest.senderId()) and,
if so, handle the action and return the result.
invokeAction in interface AWCycleableinvokeAction in class AWBaseElementrequestContext - the context for the current request.component - the current parent component
public void renderResponse(AWRequestContext requestContext,
AWComponent component)
AWCycleableAWRequestContext.response()
renderResponse in interface AWCycleablerenderResponse in class AWBaseElementrequestContext - the context for the current request.component - the current parent component
public void validate(AWValidationContext validationContext,
AWComponent component)
AWBaseElement
validate in interface AWElementvalidate in class AWBindableElementpublic String toString()
toString in class AWBaseElement
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||