org.apache.struts2.components
类 Radio
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.ListUIBean
org.apache.struts2.components.Radio
public class Radio
- extends ListUIBean
Render a radio button input field.
Examples
In this example, a radio control is displayed with a list of genders. The gender list is built from attribute
id=genders. The framework calls getGenders() which will return a Map. For examples using listKey and listValue attributes,
see the section select tag. The default selected one will be determined (in this case) by the getMale() method
in the action class which should retun a value similar to the key of the getGenters() map if that particular
gender is to be selected.
<s:action name="GenderMap" var="genders"/>
<s:radio label="Gender" name="male" list="#genders.genders"/>
<@s.radio name="car" list={"ford": "Ford Motor Co", "toyota": "Toyota"} listKey="key" listValue="value" />
构造方法摘要 |
Radio(com.opensymphony.xwork2.util.ValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
从类 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 |
TEMPLATE
public static final String TEMPLATE
- 另请参见:
- 常量字段值
Radio
public Radio(com.opensymphony.xwork2.util.ValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)