com.opensymphony.webwork.components
Class If
java.lang.Object
com.opensymphony.webwork.components.Component
com.opensymphony.webwork.components.If
public class If
- extends Component
Perform basic condition flow. 'If' tag could be used by itself or
with 'Else If' Tag and/or single/multiple 'Else' Tag.
- test* (Boolean) - Logic to determined if body of tag is to be displayed
<ww:if test="%{false}">
<div>Will Not Be Executed</div>
</ww:if>
<ww:elseif test="%{true}">
<div>Will Be Executed</div>
</ww:elseif>
<ww:else>
<div>Will Not Be Executed</div>
</ww:else>
- Author:
- tmjee
- See Also:
Else,
ElseIf
|
Constructor Summary |
If(com.opensymphony.xwork.util.OgnlValueStack stack)
|
|
Method Summary |
boolean |
end(Writer writer,
String body)
Callback for the end tag of this component. |
void |
setTest(String test)
Expression to determine if body of tag is to be displayed |
boolean |
start(Writer writer)
Callback for the start tag of this component. |
| Methods inherited from class com.opensymphony.webwork.components.Component |
addAllParameters, addParameter, altSyntax, copyParams, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findValue, findValue, findValue, getComponentStack, getId, getParameters, getStack, popComponentStack, setId, toString, usesBody |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ANSWER
public static final String ANSWER
- See Also:
- Constant Field Values
If
public If(com.opensymphony.xwork.util.OgnlValueStack stack)
setTest
public void setTest(String test)
- Expression to determine if body of tag is to be displayed
start
public boolean start(Writer writer)
- Description copied from class:
Component
- Callback for the start tag of this component.
Should the body be evaluated?
- Overrides:
start in class Component
- Parameters:
writer - the output writer.
- Returns:
- true if the body should be evaluated
end
public boolean end(Writer writer,
String body)
- Description copied from class:
Component
- Callback for the end tag of this component.
Should the body be evaluated again?
NOTE: will pop component stack.
- Overrides:
end in class Component
- Parameters:
writer - the output writer.body - the rendered body.
- Returns:
- true if the body should be evaluated again
Copyright © 2007 OpenSymphony. All Rights Reserved.