|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.tag.StripesTagSupport
net.sourceforge.stripes.tag.HtmlTagSupport
net.sourceforge.stripes.tag.InputTagSupport
net.sourceforge.stripes.tag.InputSelectTag
public class InputSelectTag
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
Field Summary |
---|
Fields inherited from class net.sourceforge.stripes.tag.InputTagSupport |
---|
errorRenderer, fieldErrors |
Fields inherited from class net.sourceforge.stripes.tag.StripesTagSupport |
---|
pageContext, parentTag |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
---|
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
---|
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
---|---|
InputSelectTag()
|
Method Summary | |
---|---|
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. |
Methods inherited from class net.sourceforge.stripes.tag.InputTagSupport |
---|
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 |
Methods inherited from class net.sourceforge.stripes.tag.HtmlTagSupport |
---|
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 |
Methods inherited from class net.sourceforge.stripes.tag.StripesTagSupport |
---|
getActionBeanType, getActionBeanUrl, getPageContext, getParent, getParentTag, getTagStack, popPageContextAttributes, pushPageContextAttributes, setPageContext, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.BodyTag |
---|
setBodyContent |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
---|
doEndTag, doStartTag, getParent, setPageContext, setParent |
Constructor Detail |
---|
public InputSelectTag()
Method Detail |
---|
public 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) throws StripesJspException
optionValue
- the value of the option under considerationselectedOnPage
- true if the page contains selected=... and false otherwise
StripesJspException
public int doStartInputTag() throws JspException
doStartInputTag
in class InputTagSupport
JspException
- if the enclosing form tag cannot be found or output cannot be writtenpublic void doInitBody() throws JspException
doInitBody
in interface BodyTag
JspException
public int doAfterBody() throws JspException
doAfterBody
in interface IterationTag
JspException
public int doEndInputTag() throws JspException
doEndInputTag
in class InputTagSupport
JspException
- if output cannot be written.public void release()
release
in interface Tag
release
in class HtmlTagSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |