net.sf.easyweb4j.tags
Class BooleanCheckBoxTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.SimpleTagSupport
      extended by net.sf.easyweb4j.tags.EasyWeb4JTagSupport
          extended by net.sf.easyweb4j.tags.BooleanCheckBoxTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.DynamicAttributes, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag

public class BooleanCheckBoxTag
extends EasyWeb4JTagSupport

Generates a checkbox on the JSP view to get the value for a boolean field. Since HTML does not send any parameter for unchecked check boxes, this tag inserts a hidden input immediately after the checkbox to ensure that a parameter is always passed.

Author:
Chandra Sekar S

Constructor Summary
BooleanCheckBoxTag()
           
 
Method Summary
 void doTag()
           
 String getName()
           
 boolean isState()
           
 void setName(String name)
          Name of the checkbox input element.
 void setState(boolean state)
          Determines whether the checkbox is checked by default or not.
 
Methods inherited from class net.sf.easyweb4j.tags.EasyWeb4JTagSupport
buildEndTag, buildStartTag, buildStartTag, getDynamicAttributes, getEasyWeb4JContainer, setDynamicAttribute
 
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanCheckBoxTag

public BooleanCheckBoxTag()
Method Detail

doTag

public void doTag()
           throws javax.servlet.jsp.JspException,
                  IOException
Specified by:
doTag in interface javax.servlet.jsp.tagext.SimpleTag
Overrides:
doTag in class javax.servlet.jsp.tagext.SimpleTagSupport
Throws:
javax.servlet.jsp.JspException
IOException

isState

public boolean isState()

setState

public void setState(boolean state)
Determines whether the checkbox is checked by default or not.

Parameters:
state - true if it must be checked by default false otherwise.

getName

public String getName()

setName

public void setName(String name)
Name of the checkbox input element.

Parameters:
name - Name of the checkbox.


Copyright © 2009-2010 Chandra Sekar S. All Rights Reserved.