fc.web.forms
Class Checkbox

java.lang.Object
  extended by fc.web.forms.Field
      extended by fc.web.forms.Choice
          extended by fc.web.forms.Checkbox

public final class Checkbox
extends Choice

Represents a HTML form's checkbox element.


Nested Class Summary
 
Nested classes/interfaces inherited from class fc.web.forms.Field
Field.Type
 
Constructor Summary
Checkbox(String name)
          Constructs a new unselected checkbox with no separate value attribute
Checkbox(String name, boolean selected)
          Constructs a new checkbox which is selected/unselected as specified.
Checkbox(String name, String value)
          Constructs a new unselected checkbox with the specified value and HTML text.
Checkbox(String name, String value, boolean selected)
          Creates a new checkbox object.
 
Method Summary
 Field.Type getType()
          Subclasses should return an appropriate Field.Type.
 
Methods inherited from class fc.web.forms.Choice
getBooleanValue, getIntValue, getShortValue, getValue, isFilled, renderImpl, setSelected, setValue, setValue, setValue, setValueFromSubmit, toString
 
Methods inherited from class fc.web.forms.Field
add, addError, addLabel, addString, disable, disable, enable, enable, getLabel, getName, getValidateErrors, isEnabled, render, render, render, renderError, renderError, renderStyleTag, setStyleTag, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Checkbox

public Checkbox(String name,
                String value,
                boolean selected)
Creates a new checkbox object.

Parameters:
name - the field name
value - the value of this choice item
selected - true is this choice is originally selected

Checkbox

public Checkbox(String name,
                String value)
Constructs a new unselected checkbox with the specified value and HTML text.

Parameters:
name - the name of this choice
value - the value of this choice item

Checkbox

public Checkbox(String name,
                boolean selected)
Constructs a new checkbox which is selected/unselected as specified.

Parameters:
name - the name of this choice
selected - true to select this checkbox.

Checkbox

public Checkbox(String name)
Constructs a new unselected checkbox with no separate value attribute

Parameters:
name - the name of this choice
Method Detail

getType

public Field.Type getType()
Description copied from class: Field
Subclasses should return an appropriate Field.Type. This type is rendered as part of <input type= ...

Specified by:
getType in class Choice