Class SingleTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.BrowserInfoTag
org.deltava.taglib.html.ElementTag
org.deltava.taglib.html.FormElementTag
org.deltava.taglib.html.SingleTag
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
- Direct Known Subclasses:
SingleCheckTag
,SingleRadioTag
An abstract JSP tag to support the generation of HTML single-option checkboxes or radio buttons.
- Since:
- 1.0
- Version:
- 11.2
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class org.deltava.taglib.html.FormElementTag
_value
Fields inherited from class org.deltava.taglib.html.ElementTag
_classes, _data, _out
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
doEndTag()
Renders the checkbox to the JSP output stream.void
release()
void
setChecked
(boolean checked) Sets if the checkbox is selected.final void
setClassName
(String cName) Sets the CSS class name for the checkbox label text .void
setDisabled
(boolean disabled) Marks this button as disabled.final void
Sets the checkbox label text.final void
setOnChange
(String jsEvent) Sets the JavaScript onChange event for these checkboxes/radio buttons.final void
Sets the checkbox value/alias.Methods inherited from class org.deltava.taglib.html.FormElementTag
setDelimValues, setIdx, setName, setRequired, validateState
Methods inherited from class org.deltava.taglib.html.ElementTag
doStartTag, getFormIndexCount, getName, getParentFormTag, setID, setNumericAttr, setPageContext, setStyle
Methods inherited from class org.deltava.taglib.BrowserInfoTag
getBrowserContext
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
-
Constructor Details
-
SingleTag
-
-
Method Details
-
setClassName
Sets the CSS class name for the checkbox label text .- Overrides:
setClassName
in classElementTag
- Parameters:
cName
- the CSS class name(s)- See Also:
-
setLabel
Sets the checkbox label text.- Parameters:
label
- the label text
-
setValue
Sets the checkbox value/alias.- Overrides:
setValue
in classFormElementTag
- Parameters:
objValue
- the alias
-
setChecked
public void setChecked(boolean checked) Sets if the checkbox is selected.- Parameters:
checked
-
-
setDisabled
public void setDisabled(boolean disabled) Marks this button as disabled.- Parameters:
disabled
- TRUE if disabled, otherwise FALSE
-
setOnChange
Sets the JavaScript onChange event for these checkboxes/radio buttons.- Parameters:
jsEvent
- the JavaScript event code
-
release
public void release()- Specified by:
release
in interfaceTag
- Overrides:
release
in classElementTag
-
doEndTag
Renders the checkbox to the JSP output stream.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
- Returns:
- TagSupport.EVAL_PAGE
- Throws:
JspException
- if an I/O error occurs
-