org.apache.struts.taglib.html

Class CheckboxTag

public class CheckboxTag extends BaseHandlerTag

Tag for input fields of type "checkbox".

Version: $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $

Field Summary
protected static MessageResourcesmessages
The message resources for this package.
protected Stringname
The name of the bean containing our underlying property.
protected Stringproperty
The property name for this field.
protected Stringtext
The body content of this tag (if any).
protected Stringvalue
The server value for this option.
Method Summary
intdoAfterBody()
Save the associated label from the body content.
intdoEndTag()
Process the remainder of this page normally.
intdoStartTag()
Generate the required input tag.
StringgetName()
StringgetProperty()
Return the property name.
StringgetValue()
Return the server value.
protected booleanisChecked()
Determines if the checkbox should be checked.
protected StringprepareName()
Prepare the name element
voidrelease()
Release any acquired resources.
voidsetName(String name)
voidsetProperty(String property)
Set the property name.
voidsetValue(String value)
Set the server value.

Field Detail

messages

protected static MessageResources messages
The message resources for this package.

name

protected String name
The name of the bean containing our underlying property.

property

protected String property
The property name for this field.

text

protected String text
The body content of this tag (if any).

value

protected String value
The server value for this option.

Method Detail

doAfterBody

public int doAfterBody()
Save the associated label from the body content.

Throws: JspException if a JSP exception has occurred

doEndTag

public int doEndTag()
Process the remainder of this page normally.

Throws: JspException if a JSP exception has occurred

doStartTag

public int doStartTag()
Generate the required input tag.

Support for indexed property since Struts 1.1

Throws: JspException if a JSP exception has occurred

getName

public String getName()

getProperty

public String getProperty()
Return the property name.

getValue

public String getValue()
Return the server value.

isChecked

protected boolean isChecked()
Determines if the checkbox should be checked.

Returns: true if checked="checked" should be rendered.

Throws: JspException

Since: Struts 1.2

prepareName

protected String prepareName()
Prepare the name element

Returns: The element name.

release

public void release()
Release any acquired resources.

setName

public void setName(String name)

setProperty

public void setProperty(String property)
Set the property name.

Parameters: property The new property name

setValue

public void setValue(String value)
Set the server value.

Parameters: value The new server value

Copyright B) 2000-2007 - The Apache Software Foundation