|
|||||||||||
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 com.cc.framework.taglib.base.OptionTag
Tag handler for the option
Tag.
The tag generates one single option element with the help
of a data model for a <html:select>- or <forms:select>-tag.
The tag can thereby process some of the basic data types
of the framework.
Field Summary | |
private boolean |
disabled
Is this option disabled? |
private boolean |
filter
Specifies if all Strings should be converted into there HTML representation |
private java.lang.String |
key
The options value |
private java.lang.String |
label
The options text |
private boolean |
labelRaw
This flag indicates that the text is set from the tag body |
private org.apache.commons.logging.Log |
log
Commons Logging instance. |
private int |
maxlength
The maximum String length |
private static long |
serialVersionUID
Serial Version UID |
private static java.lang.Class |
strutsSelectTag
Select Tag of the struts framework |
private java.lang.String |
style
The style associated with this tag. |
private java.lang.String |
styleClass
The named style class associated with this tag. |
private java.lang.String |
styleId
The identifier associated with this tag. |
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()
Constructor |
Method Summary | |
int |
doAfterBody()
Process the body text of this tag (if any). |
int |
doEndTag()
|
int |
doStartTag()
|
void |
release()
|
protected java.lang.String |
renderOptionElement(OptionsComparator cmp)
Generate an HTML <option> element. |
void |
setDisabled(boolean disabled)
Marks this option as disabled |
void |
setDisabled(java.lang.String disabled)
Marks this option as disabled |
void |
setFilter(java.lang.String filter)
The automatic HTML coding of the column contents can be activated or disabled with the filter-attribute. |
void |
setKey(java.lang.String key)
Specifies the options key. |
void |
setLabel(java.lang.String label)
Specifies the label text for the option |
void |
setMaxlength(int maxlength)
Specifies the maximum number of characters that are displayed for the option elements |
void |
setMaxlength(java.lang.String maxlength)
Specifies the maximum number of characters that are displayed for the option elements |
void |
setPageContext(javax.servlet.jsp.PageContext pc)
|
void |
setStyle(java.lang.String style)
An HTML-style can be directly specified with this attribute. |
void |
setStyleClass(java.lang.String styleClass)
The HTML-class attribute of the element can be specified with this attribute. |
void |
setStyleId(java.lang.String styleId)
Set the style identifier for this tag. |
protected java.lang.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, 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, setParent |
Field Detail |
private static final long serialVersionUID
private static java.lang.Class strutsSelectTag
private transient org.apache.commons.logging.Log log
private java.lang.String key
private java.lang.String label
private boolean labelRaw
private int maxlength
private boolean disabled
private java.lang.String style
private java.lang.String styleClass
private java.lang.String styleId
private boolean filter
Constructor Detail |
public OptionTag()
Method Detail |
public void setPageContext(javax.servlet.jsp.PageContext pc)
Tag.setPageContext(PageContext pc)
public void release()
Tag.release()
public int doStartTag() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
Tag.doStartTag()
public int doAfterBody() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- if a JSP exception has occurredpublic int doEndTag() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
Tag.doEndTag()
protected java.lang.String renderOptionElement(OptionsComparator cmp) throws javax.servlet.jsp.JspException
cmp
- The options comparator to check if this option is selected
javax.servlet.jsp.JspException
- if a JSP exception has occurredprotected java.lang.String text() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- if an error occurspublic void setStyle(java.lang.String style)
style
- The style to setpublic void setStyleClass(java.lang.String styleClass)
styleClass
- The styleClass to setpublic void setStyleId(java.lang.String styleId)
styleId
- The new style identifierpublic void setKey(java.lang.String key)
key
- The keypublic void setLabel(java.lang.String label)
label
- The options labelpublic void setMaxlength(java.lang.String maxlength) throws javax.servlet.jsp.JspException
maxlength
- The maximum number of characters
javax.servlet.jsp.JspException
- If the Argument can't be converted to integerpublic void setMaxlength(int maxlength)
maxlength
- The maximum number of characterspublic void setDisabled(java.lang.String disabled) throws javax.servlet.jsp.JspException
disabled
- Disabled state
javax.servlet.jsp.JspException
- If disabled
is not a valid boolean valuepublic void setDisabled(boolean disabled)
disabled
- Disabled statepublic void setFilter(java.lang.String filter) throws javax.servlet.jsp.JspException
true
filter
- true
if the column content should be HTML
encoded.
javax.servlet.jsp.JspException
- If the Argument can't be converted to boolean
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |