|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport javax.servlet.jsp.tagext.BodyTagSupport org.apache.struts.taglib.html.OptionTag
public class OptionTag
Tag for select options. The body of this tag is presented to the user in the option list, while the value attribute is the value returned to the server if this option is selected.
Field Summary | |
---|---|
protected String |
bundle
The name of the servlet context attribute containing our message resources. |
protected boolean |
disabled
Is this option disabled? |
protected boolean |
filter
Should the label be filtered for HTML sensitive characters? |
protected String |
key
The key used to look up the text displayed to the user for this option, if any. |
protected String |
locale
The name of the attribute containing the Locale to be used for looking up internationalized messages. |
protected static MessageResources |
messages
The message resources for this package. |
protected String |
styleId
The identifier associated with this tag. |
protected String |
text
The message text to be displayed to the user for this tag (if any) |
protected String |
value
The server value for this option, also used to match against the current property value to determine whether this option should be marked as selected. |
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
id, pageContext |
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 | |
---|---|
OptionTag()
|
Method Summary | |
---|---|
int |
doAfterBody()
Process the body text of this tag (if any). |
int |
doEndTag()
Process the end of this tag. |
int |
doStartTag()
Process the start of this tag. |
String |
getBundle()
|
String |
getDir()
Returns the direction for weak/neutral text this element. |
boolean |
getDisabled()
|
boolean |
getFilter()
|
String |
getKey()
|
String |
getLang()
Returns the language code of this element. |
String |
getLocale()
|
String |
getStyle()
|
String |
getStyleClass()
|
String |
getStyleId()
Return the style identifier for this tag. |
String |
getValue()
|
void |
release()
Release any acquired resources. |
protected String |
renderOptionElement()
Generate an HTML %lt;option> element. |
void |
setBundle(String bundle)
|
void |
setDir(String dir)
Sets the direction for weak/neutral text of this element. |
void |
setDisabled(boolean disabled)
|
void |
setFilter(boolean filter)
|
void |
setKey(String key)
|
void |
setLang(String lang)
Sets the language code of this element. |
void |
setLocale(String locale)
|
void |
setStyle(String style)
|
void |
setStyleClass(String styleClass)
|
void |
setStyleId(String styleId)
Set the style identifier for this tag. |
void |
setValue(String value)
|
protected String |
text()
Return the text to be displayed to the user for this option (if any). |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
---|
getParent, setPageContext, setParent |
Field Detail |
---|
protected static MessageResources messages
protected String text
protected String bundle
protected boolean disabled
protected boolean filter
protected String key
protected String locale
protected String styleId
protected String value
Constructor Detail |
---|
public OptionTag()
Method Detail |
---|
public String getBundle()
public void setBundle(String bundle)
public boolean getDisabled()
public void setDisabled(boolean disabled)
public boolean getFilter()
public void setFilter(boolean filter)
public String getKey()
public void setKey(String key)
public String getLocale()
public void setLocale(String locale)
public String getStyle()
public void setStyle(String style)
public String getStyleClass()
public void setStyleClass(String styleClass)
public String getStyleId()
public void setStyleId(String styleId)
styleId
- The new style identifierpublic String getValue()
public void setValue(String value)
public String getLang()
public void setLang(String lang)
public String getDir()
public void setDir(String dir)
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class BodyTagSupport
JspException
- if a JSP exception has occurredpublic int doAfterBody() throws JspException
doAfterBody
in interface IterationTag
doAfterBody
in class BodyTagSupport
JspException
- if a JSP exception has occurredpublic int doEndTag() throws JspException
doEndTag
in interface Tag
doEndTag
in class BodyTagSupport
JspException
- if a JSP exception has occurredprotected String renderOptionElement() throws JspException
JspException
public void release()
release
in interface Tag
release
in class BodyTagSupport
protected String text() throws JspException
JspException
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |