org.apache.struts2.components
类 Checkbox

java.lang.Object
  继承者 org.apache.struts2.components.Component
      继承者 org.apache.struts2.components.UIBean
          继承者 org.apache.struts2.components.Checkbox

public class Checkbox
extends UIBean

Renders an HTML input element of type checkbox, populated by the specified property from the ValueStack.

Examples

 
 JSP:
 <s:checkbox label="checkbox test" name="checkboxField1" value="aBoolean" fieldValue="true"/>

 Velocity:
 #tag( Checkbox "label=checkbox test" "name=checkboxField1" "value=aBoolean" )

 Resulting HTML (simple template, aBoolean == true):
 <input type="checkbox" name="checkboxField1" value="true" checked="checked" />

 
 


字段摘要
static String TEMPLATE
           
 
从类 org.apache.struts2.components.Component 继承的字段
COMPONENT_STACK
 
构造方法摘要
Checkbox(com.opensymphony.xwork2.util.ValueStack stack, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
方法摘要
 void setFieldValue(String fieldValue)
           
 
从类 org.apache.struts2.components.UIBean 继承的方法
addFormParameter, copyParams, end, evaluateParams, getId, getTemplate, getTemplateDir, getTheme, setAccesskey, setCssClass, setCssErrorClass, setCssErrorStyle, setCssStyle, setDefaultTemplateDir, setDefaultUITheme, setDisabled, setDynamicAttributes, setErrorPosition, setId, setJavascriptTooltip, setKey, setLabel, setLabelposition, setLabelSeparator, setName, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setRequiredLabel, setRequiredPosition, setTabindex, setTemplate, setTemplateDir, setTemplateEngineManager, setTheme, setTitle, setTooltip, setTooltipConfig, setTooltipCssClass, setTooltipDelay, setTooltipIconPath, setUIThemeExpansionToken, setValue
 
从类 org.apache.struts2.components.Component 继承的方法
addAllParameters, addParameter, altSyntax, getComponentStack, getParameters, getStack, setActionMapper, setThrowExceptionsOnELFailure, setUrlHelper, start, usesBody
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

TEMPLATE

public static final String TEMPLATE
另请参见:
常量字段值
构造方法详细信息

Checkbox

public Checkbox(com.opensymphony.xwork2.util.ValueStack stack,
                javax.servlet.http.HttpServletRequest request,
                javax.servlet.http.HttpServletResponse response)
方法详细信息

setFieldValue

public void setFieldValue(String fieldValue)