fc.web.forms
Class RadioGroup

java.lang.Object
  extended by fc.web.forms.Field
      extended by fc.web.forms.ChoiceGroup
          extended by fc.web.forms.RadioGroup

public class RadioGroup
extends ChoiceGroup

Represents a grouped set of radio buttons


Nested Class Summary
 
Nested classes/interfaces inherited from class fc.web.forms.ChoiceGroup
ChoiceGroup.Choice
 
Nested classes/interfaces inherited from class fc.web.forms.Field
Field.Type
 
Constructor Summary
RadioGroup(String name)
          
 
Method Summary
 boolean getBooleanValue(FormData fd)
          Convenience method that returns the value of this field as a boolean.
 int getIntValue(FormData fd)
          Convenience method that returns the value of this field as a integer.
 String getStringValue(FormData fd)
          Convenience method that returns the selected option as a String.
 Field.Type getType()
          Subclasses should return an appropriate Field.Type.
 
Methods inherited from class fc.web.forms.ChoiceGroup
add, addAll, getAllElements, getChoice, getValue, isFilled, isSelected, renderImpl, renderImpl, reset, reverseRender, setValue, setValue, setValueFromSubmit, toString, writeLabel
 
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

RadioGroup

public RadioGroup(String name)

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 ChoiceGroup

getStringValue

public String getStringValue(FormData fd)
Convenience method that returns the selected option as a String.

If there is no selection, returns null


getIntValue

public int getIntValue(FormData fd)
Convenience method that returns the value of this field as a integer.

Throws:
NumberFormatException - if the value could not be returned as in integer.

getBooleanValue

public boolean getBooleanValue(FormData fd)
Convenience method that returns the value of this field as a boolean.