Save This Page
Home » struts-2.0.11.2-src » org.apache » struts2 » components » [javadoc | source]
org.apache.struts2.components
public class: If [javadoc | source]
java.lang.Object
   org.apache.struts2.components.Component
      org.apache.struts2.components.If

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>

Field Summary
public static final  String ANSWER     
 Boolean answer     
 String test     
Fields inherited from org.apache.struts2.components.Component:
COMPONENT_STACK,  stack,  parameters,  id,  actionMapper
Constructor:
 public If(ValueStack stack) 
Method from org.apache.struts2.components.If Summary:
end,   setTest,   start
Methods from org.apache.struts2.components.Component:
addAllParameters,   addParameter,   altSyntax,   copyParams,   determineActionURL,   determineActionURL,   determineNamespace,   end,   end,   fieldError,   findAncestor,   findString,   findString,   findValue,   findValue,   findValue,   getComponentStack,   getId,   getParameters,   getStack,   popComponentStack,   setActionMapper,   setId,   start,   toString,   usesBody
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts2.components.If Detail:
 public boolean end(Writer writer,
    String body) 
 public  void setTest(String test) 
 public boolean start(Writer writer)