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.
<s:if test="%{false}"> <div>Will Not Be Executed</div> </s:if> <s:elseif test="%{true}"> <div>Will Be Executed</div> </s:elseif> <s:else> <div>Will Not Be Executed</div> </s:else>
Modifier and Type | Field and Description |
---|---|
static String |
ANSWER |
actionMapper, COMPONENT_STACK, devMode, escapeHtmlBody, parameters, performClearTagStateForTagPoolingServers, stack, standardAttributesMap, throwExceptionOnELFailure
Constructor and Description |
---|
If(ValueStack stack) |
Modifier and Type | Method and Description |
---|---|
boolean |
end(Writer writer,
String body)
Callback for the end tag of this component.
|
void |
setTest(String test) |
boolean |
start(Writer writer)
Callback for the start tag of this component.
|
addAllParameters, addParameter, completeExpression, copyParams, determineActionURL, determineNamespace, end, escapeHtmlBody, fieldError, findAncestor, findString, findString, findValue, findValue, findValue, getComponentStack, getParameters, getPerformClearTagStateForTagPoolingServers, getStack, getStandardAttributes, isAcceptableExpression, isValidTagAttribute, popComponentStack, setActionMapper, setDevMode, setEscapeHtmlBody, setNotExcludedAcceptedPatterns, setPerformClearTagStateForTagPoolingServers, setThrowExceptionsOnELFailure, setUrlHelper, stripExpression, toString, usesBody
public static final String ANSWER
public If(ValueStack stack)
public void setTest(String test)
public boolean start(Writer writer)
Component
Copyright © 2000–2022 Apache Software Foundation. All rights reserved.