org.apache.struts.taglib
Class MultiboxTag

org.apache.struts.taglib.BaseHandlerTag
  |
  +--org.apache.struts.taglib.MultiboxTag

public final class MultiboxTag
extends BaseHandlerTag

Tag for input fields of type "checkbox". This differs from CheckboxTag because it assumes that the underlying property is an array getter (of any supported primitive type, or String), and the checkbox is initialized to "checked" if the value listed for the "value" attribute is present in the values returned by the property getter.

Version:
$Revision: 1.5 $ $Date: 2000/08/14 04:42:51 $
Author:
Ralph Schaer, Craig R. McClanahan

Field Summary
protected static MessageResources messages
          The message resources for this package.
private  java.lang.String name
          The name of the bean containing our underlying property.
private  java.lang.String property
          The property name for this field.
private  java.lang.String value
          The value which will mark this checkbox as "checked" if present in the array returned by our property getter.
 
Fields inherited from class org.apache.struts.taglib.BaseHandlerTag
accessKey, onBlur, onChange, onClick, onDblClick, onFocus, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onSelect, style, styleClass, styleId, tabIndex
 
Constructor Summary
MultiboxTag()
           
 
Method Summary
 int doEndTag()
          Optionally render the associated label from the body content.
 int doStartTag()
          Generate the required input tag.
 java.lang.String getName()
           
 java.lang.String getProperty()
          Return the property name.
 java.lang.String getValue()
          Return the server value.
 void release()
          Release any acquired resources.
 void setName(java.lang.String name)
           
 void setProperty(java.lang.String property)
          Set the property name.
 void setValue(java.lang.String value)
          Set the server value.
 
Methods inherited from class org.apache.struts.taglib.BaseHandlerTag
getAccessKey, getOnBlur, getOnChange, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnSelect, getStyle, getStyleClass, getStyleId, getTabIndex, prepareEventHandlers, prepareFocusEvents, prepareKeyEvents, prepareMouseEvents, prepareStyles, prepareTextEvents, setAccessKey, setOnBlur, setOnChange, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setStyle, setStyleClass, setStyleId, setTabIndex
 

Field Detail

messages

protected static MessageResources messages
The message resources for this package.

name

private java.lang.String name
The name of the bean containing our underlying property.

property

private java.lang.String property
The property name for this field.

value

private java.lang.String value
The value which will mark this checkbox as "checked" if present in the array returned by our property getter.
Constructor Detail

MultiboxTag

public MultiboxTag()
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getProperty

public java.lang.String getProperty()
Return the property name.

setProperty

public void setProperty(java.lang.String property)
Set the property name.
Parameters:
property - The new property name

getValue

public java.lang.String getValue()
Return the server value.

setValue

public void setValue(java.lang.String value)
Set the server value.
Parameters:
value - The new server value

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Generate the required input tag.
Throws:
JspException - if a JSP exception has occurred

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Optionally render the associated label from the body content.
Throws:
JspException - if a JSP exception has occurred

release

public void release()
Release any acquired resources.
Overrides:
release in class BaseHandlerTag


Copyright © 2000-2002 - Apache Software Foundation