public class InputSelectTag extends InputTagSupport implements BodyTag
Coordinates with one or more other tags to produce a well formed HTML select tag with state repopulation. The select tag itself really only writes out the basic <select name="foo"> ... </select> piece of the structure, and provides mechanisms for child options to determine whether or not they should render themselves as selected.
InputOptionTag,
InputOptionsCollectionTag,
InputOptionsEnumerationTagerrorRenderer, fieldErrorspageContext, parentTagEVAL_BODY_BUFFERED, EVAL_BODY_TAGEVAL_BODY_AGAINEVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE| Constructor and Description |
|---|
InputSelectTag() |
| Modifier and Type | Method and Description |
|---|---|
int |
doAfterBody()
Does nothing.
|
int |
doEndInputTag()
Writes out the close select tag (</select>).
|
void |
doInitBody()
Does nothing.
|
int |
doStartInputTag()
Writes out the opening <select name="foo"> tag.
|
String |
getMultiple()
Gets the HTML attribute "multiple".
|
Object |
getSelectedValueOrValues()
Returns the scalar value or Array or Collection of values that are to be selected in the
select tag.
|
Object |
getValue()
Returns the String value set by the tag attribute on the JSP, or the override value set in
the HttpRequest, or the override value bound to the ActionBean object in scope.
|
boolean |
isOptionSelected(Object optionValue,
boolean selectedOnPage)
Checks to see if the option value should be rendered as selected or not.
|
void |
release()
Releases the discovered selected values and then calls super-release().
|
void |
setMultiple(String multiple)
If the text value passed in matches the empty string or (ignoring case) "multiple",
or if the value can be converted to true by the
BooleanTypeConverter then the
attribute will be set to "multiple", otherwise the attribute will not be output. |
void |
setValue(Object value)
Stores the value attribute in an instance variable since it is used to determine which
options are checked.
|
doCatch, doEndTag, doFinally, doStartTag, format, format, getActionBean, getDisabled, getFieldErrors, getFormatPattern, getFormatType, getLocalizedFieldName, getLocalizedFieldName, getName, getOverrideValueOrValues, getParentFormTag, getReadonly, getSingleOverrideValue, getSize, getValidationMetadata, getValueOnPage, hasErrors, isItemSelected, loadErrors, makeFocused, registerWithParentForm, setDisabled, setFocus, setFormatPattern, setFormatType, setName, setReadonly, setSizeevaluateExpression, get, getAccesskey, getAttributes, getBodyContent, getBodyContentAsString, getCssClass, getDir, getId, getLang, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getStyle, getTabindex, getTitle, isXmlTags, set, setAccesskey, setBodyContent, setClass, setCssClass, setDir, setDynamicAttribute, setId, setLang, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setStyle, setTabindex, setTitle, toString, writeAttributes, writeCloseTag, writeOpenTag, writeSingletonTaggetActionBeanType, getActionBeanUrl, getPageContext, getParent, getParentTag, getTagStack, popPageContextAttributes, pushPageContextAttributes, setPageContext, setParentclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetBodyContentdoEndTag, doStartTag, getParent, setPageContext, setParentpublic void setMultiple(String multiple)
BooleanTypeConverter then the
attribute will be set to "multiple", otherwise the attribute will not be output.public String getMultiple()
public void setValue(Object value)
public Object getValue()
public Object getSelectedValueOrValues()
Collection<Object> of values that are selectedpublic boolean isOptionSelected(Object optionValue, boolean selectedOnPage)
optionValue - the value of the option under considerationselectedOnPage - true if the page contains selected=... and false otherwisepublic int doStartInputTag()
throws JspException
doStartInputTag in class InputTagSupportJspException - if the enclosing form tag cannot be found or output cannot be writtenpublic void doInitBody()
throws JspException
doInitBody in interface BodyTagJspExceptionpublic int doAfterBody()
throws JspException
doAfterBody in interface IterationTagJspExceptionpublic int doEndInputTag()
throws JspException
doEndInputTag in class InputTagSupportJspException - if output cannot be written.public void release()
release in interface Tagrelease in class HtmlTagSupport© Copyright 2005-2006, Stripes Development Team.