public class ElseIf 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 |
|---|---|
protected Boolean |
answer |
protected String |
test |
actionMapper, COMPONENT_STACK, devMode, parameters, stack, standardAttributesMap, throwExceptionOnELFailure| Constructor and Description |
|---|
ElseIf(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, altSyntax, completeExpressionIfAltSyntax, copyParams, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findStringIfAltSyntax, findValue, findValue, findValue, getComponentStack, getParameters, getStack, getStandardAttributes, isAcceptableExpression, isValidTagAttribute, popComponentStack, setActionMapper, setDevMode, setNotExcludedAcceptedPatterns, setThrowExceptionsOnELFailure, setUrlHelper, stripExpressionIfAltSyntax, toString, usesBodypublic ElseIf(ValueStack stack)
public boolean start(Writer writer)
Componentpublic boolean end(Writer writer, String body)
Componentpublic void setTest(String test)
Copyright © 2000–2023 Apache Software Foundation. All rights reserved.