|
|||||||||
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(java.lang.String tagName,
java.util.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(java.lang.String name)
|
java.lang.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.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(java.lang.String name)
setTemplateName
in class AWBaseElement
public void setLineNumber(int lineNumber)
setLineNumber
in class AWBaseElement
public static boolean evaluateConditionInComponent(AWBinding conditionBinding, AWComponent component, boolean negate)
public void init(java.lang.String tagName, java.util.Map bindingsHashtable)
init
in interface AWBindable
init
in class AWBindableElement
public void add(AWElement element)
add
in interface AWElementContaining
public void applyValues(AWRequestContext requestContext, AWComponent component)
AWCycleable
AWRequestContext.request()
.
applyValues
in interface AWCycleable
applyValues
in class AWBaseElement
requestContext
- the context for the current request.component
- the current parent componentpublic AWResponseGenerating invokeAction(AWRequestContext requestContext, AWComponent component)
AWCycleable
AWRequestContext.request()
AWRequest.senderId()
) and,
if so, handle the action and return the result.
invokeAction
in interface AWCycleable
invokeAction
in class AWBaseElement
requestContext
- the context for the current request.component
- the current parent component
public void renderResponse(AWRequestContext requestContext, AWComponent component)
AWCycleable
AWRequestContext.response()
renderResponse
in interface AWCycleable
renderResponse
in class AWBaseElement
requestContext
- the context for the current request.component
- the current parent componentpublic void validate(AWValidationContext validationContext, AWComponent component)
AWBaseElement
validate
in interface AWElement
validate
in class AWBindableElement
public java.lang.String toString()
toString
in class AWBaseElement
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |