| java.lang.Object com.opensymphony.webwork.components.Component com.opensymphony.webwork.components.UIBean com.opensymphony.webwork.components.TextField com.opensymphony.webwork.components.ComboBox
ComboBox | public class ComboBox extends TextField (Code) | |
The combo box is basically an HTML INPUT of type text and HTML SELECT grouped together to give you a combo box
functionality. You can place text in the INPUT control by using the SELECT control or type it in directly in
the text field.
In this example, the SELECT will be populated from id=year attribute. Counter is itself an Iterator. It will
span from first to last. The population is done via javascript, and requires that this tag be surrounded by a
<form>.
Note that unlike the <ww:select/> tag, there is no ability to define the individual <option> tags' id attribute
or content separately. Each of these is simply populated from the toString() method of the list item. Presumably
this is because the select box isn't intended to actually submit useful data, but to assist the user in filling
out the text field.
Examples
JSP:
<ww:bean name="webwork.util.Counter" id="year">
<ww:param name="first" value="text('firstBirthYear')"/>
<ww:param name="last" value="2000"/>
<ww:combobox label="Birth year" size="6" maxlength="4" name="birthYear" list="#year"/>
</ww:bean>
Velocity:
#tag( ComboBox "label=Birth year" "size=6" "maxlength=4" "name=birthYear" "list=#year" )
author: Patrick Lightbody author: Rene Gielen version: $Revision: 2468 $ since: 2.2 |
evaluateExtraParams | public void evaluateExtraParams()(Code) | | |
getDefaultTemplate | protected String getDefaultTemplate()(Code) | | |
setList | public void setList(String list)(Code) | | Iteratable source to populate from. If this is missing, the select widget is simply not displayed.
|
Methods inherited from com.opensymphony.webwork.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, boolean escapeXml)(Code)(Java Doc) protected String determineNamespace(String namespace, OgnlValueStack 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 WebWorkException 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 OgnlValueStack getStack()(Code)(Java Doc) protected void popComponentStack()(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)
|
|
|