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
_valueFields inherited from class org.deltava.taglib.html.ElementTag
_classes, _data, _outFields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoEndTag()Renders the checkbox to the JSP output stream.voidrelease()voidsetChecked(boolean checked) Sets if the checkbox is selected.final voidsetClassName(String cName) Sets the CSS class name for the checkbox label text .voidsetDisabled(boolean disabled) Marks this button as disabled.final voidSets the checkbox label text.final voidsetOnChange(String jsEvent) Sets the JavaScript onChange event for these checkboxes/radio buttons.final voidSets the checkbox value/alias.Methods inherited from class org.deltava.taglib.html.FormElementTag
setDelimValues, setIdx, setName, setRequired, validateStateMethods inherited from class org.deltava.taglib.html.ElementTag
doStartTag, getFormIndexCount, getName, getParentFormTag, setID, setNumericAttr, setPageContext, setStyleMethods inherited from class org.deltava.taglib.BrowserInfoTag
getBrowserContext, passedCAPTCHAMethods 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:
setClassNamein 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:
setValuein 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:
releasein interfaceTag- Overrides:
releasein classElementTag
-
doEndTag
Renders the checkbox to the JSP output stream.- Specified by:
doEndTagin interfaceTag- Overrides:
doEndTagin classTagSupport- Returns:
- TagSupport.EVAL_PAGE
- Throws:
JspException- if an I/O error occurs
-