| java.lang.Object org.apache.struts2.components.Component org.apache.struts2.components.UIBean org.apache.struts2.components.ListUIBean org.apache.struts2.components.Radio
Radio | public class Radio extends ListUIBean (Code) | |
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" id="genders"/>
<s:radio label="Gender" name="male" list="#genders.genders"/>
|
getDefaultTemplate | protected String getDefaultTemplate()(Code) | | |
Methods inherited from org.apache.struts2.components.Component | public void addAllParameters(Map params)(Code)(Java Doc) public void addParameter(String key, Object value)(Code)(Java Doc) public boolean altSyntax()(Code)(Java Doc) public void copyParams(Map params)(Code)(Java Doc) protected String determineActionURL(String action, String namespace, String method, HttpServletRequest req, HttpServletResponse res, Map parameters, String scheme, boolean includeContext, boolean encodeResult)(Code)(Java Doc) protected String determineActionURL(String action, String namespace, String method, HttpServletRequest req, HttpServletResponse res, Map parameters, String scheme, boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort, boolean escapeAmp)(Code)(Java Doc) protected String determineNamespace(String namespace, ValueStack stack, HttpServletRequest req)(Code)(Java Doc) public boolean end(Writer writer, String body)(Code)(Java Doc) protected boolean end(Writer writer, String body, boolean popComponentStack)(Code)(Java Doc) protected StrutsException fieldError(String field, String errorMsg, Exception e)(Code)(Java Doc) protected Component findAncestor(Class clazz)(Code)(Java Doc) protected String findString(String expr)(Code)(Java Doc) protected String findString(String expr, String field, String errorMsg)(Code)(Java Doc) protected Object findValue(String expr)(Code)(Java Doc) protected Object findValue(String expr, String field, String errorMsg)(Code)(Java Doc) protected Object findValue(String expr, Class toType)(Code)(Java Doc) public Stack getComponentStack()(Code)(Java Doc) public String getId()(Code)(Java Doc) public Map getParameters()(Code)(Java Doc) public ValueStack getStack()(Code)(Java Doc) protected void popComponentStack()(Code)(Java Doc) public void setActionMapper(ActionMapper mapper)(Code)(Java Doc) public void setId(String id)(Code)(Java Doc) public boolean start(Writer writer)(Code)(Java Doc) protected String toString(Throwable t)(Code)(Java Doc) public boolean usesBody()(Code)(Java Doc)
|
|
|