org.deltava.taglib.html
Class SingleTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.deltava.taglib.html.ElementTag
          extended by org.deltava.taglib.html.FormElementTag
              extended by org.deltava.taglib.html.SingleTag
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag
Direct Known Subclasses:
SingleCheckTag, SingleRadioTag

public abstract class SingleTag
extends FormElementTag

An abstract JSP tag to support the generation of HTML single-option checkboxes or radio buttons.

Since:
1.0
Version:
1.0
Author:
Luke
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.deltava.taglib.html.FormElementTag
_value
 
Fields inherited from class org.deltava.taglib.html.ElementTag
_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
protected SingleTag(String type, String className)
          Creates a new checkbox tag.
 
Method Summary
 int doEndTag()
          Renders the checkbox to the JSP output stream.
 void release()
          Releases the tag's state data.
 void setChecked(boolean checked)
          Sets if the checkbox is selected.
 void setClassName(String cName)
          Sets the CSS class name for the checkbox label text .
 void setLabel(String label)
          Sets the checkbox label text.
 void setOnChange(String jsEvent)
          Sets the JavaScript onChange event for these checkboxes/radio buttons.
 void setValue(Object objValue)
          Sets the checkbox value/alias.
 
Methods inherited from class org.deltava.taglib.html.FormElementTag
setDelimValues, setIdx, setName, validateState
 
Methods inherited from class org.deltava.taglib.html.ElementTag
getName, setID, setNumericAttr, setPageContext, setStyle
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doStartTag, 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
 

Constructor Detail

SingleTag

protected SingleTag(String type,
                    String className)
Creates a new checkbox tag.

Method Detail

setClassName

public final void setClassName(String cName)
Sets the CSS class name for the checkbox label text .

Overrides:
setClassName in class ElementTag
Parameters:
cName - the CSS class name(s)
See Also:
ElementTag.setClassName(String)

setLabel

public final void setLabel(String label)
Sets the checkbox label text.

Parameters:
label - the label text

setValue

public final void setValue(Object objValue)
Sets the checkbox value/alias.

Overrides:
setValue in class FormElementTag
Parameters:
objValue - the alias

setChecked

public void setChecked(boolean checked)
Sets if the checkbox is selected.

Parameters:
checked -

setOnChange

public final void setOnChange(String jsEvent)
Sets the JavaScript onChange event for these checkboxes/radio buttons.

Parameters:
jsEvent - the JavaScript event code

release

public void release()
Releases the tag's state data.

Specified by:
release in interface Tag
Overrides:
release in class ElementTag

doEndTag

public int doEndTag()
             throws JspException
Renders the checkbox to the JSP output stream.

Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class TagSupport
Returns:
TagSupport.EVAL_PAGE
Throws:
JspException - if an I/O error occurs


Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.