public class InputSelectTag extends InputTagSupport implements javax.servlet.jsp.tagext.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
,
InputOptionsEnumerationTag
errorRenderer, fieldErrors
pageContext, parentTag
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.
|
java.lang.String |
getMultiple()
Gets the HTML attribute "multiple".
|
java.lang.Object |
getSelectedValueOrValues()
Returns the scalar value or Array or Collection of values that are to be selected in the
select tag.
|
java.lang.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(java.lang.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(java.lang.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(java.lang.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, setSize
evaluateExpression, 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, 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, writeSingletonTag
getActionBeanType, getActionBeanUrl, getPageContext, getParent, getParentTag, getTagStack, popPageContextAttributes, pushPageContextAttributes, setPageContext, setParent
public void setMultiple(java.lang.String multiple)
BooleanTypeConverter
then the
attribute will be set to "multiple", otherwise the attribute will not be output.public java.lang.String getMultiple()
public void setValue(java.lang.Object value)
public java.lang.Object getValue()
public java.lang.Object getSelectedValueOrValues()
Collection<Object>
of values that are selectedpublic boolean isOptionSelected(java.lang.Object optionValue, boolean selectedOnPage) throws StripesJspException
optionValue
- the value of the option under considerationselectedOnPage
- true if the page contains selected=... and false otherwiseStripesJspException
public int doStartInputTag() throws javax.servlet.jsp.JspException
doStartInputTag
in class InputTagSupport
javax.servlet.jsp.JspException
- if the enclosing form tag cannot be found or output cannot be writtenpublic void doInitBody() throws javax.servlet.jsp.JspException
doInitBody
in interface javax.servlet.jsp.tagext.BodyTag
javax.servlet.jsp.JspException
public int doAfterBody() throws javax.servlet.jsp.JspException
doAfterBody
in interface javax.servlet.jsp.tagext.IterationTag
javax.servlet.jsp.JspException
public int doEndInputTag() throws javax.servlet.jsp.JspException
doEndInputTag
in class InputTagSupport
javax.servlet.jsp.JspException
- if output cannot be written.public void release()
release
in interface javax.servlet.jsp.tagext.Tag
release
in class HtmlTagSupport
? Copyright 2005-2006, Stripes Development Team.