net.sf.echobinding.controls
Class BoundButtonGroup<T>

java.lang.Object
  extended by nextapp.echo2.app.button.ButtonGroup
      extended by net.sf.echobinding.controls.BoundButtonGroup<T>
Type Parameters:
T -
All Implemented Interfaces:
java.io.Serializable, nextapp.echo2.app.RenderIdSupport

public class BoundButtonGroup<T>
extends nextapp.echo2.app.button.ButtonGroup

See Also:
Serialized Form

Constructor Summary
BoundButtonGroup(java.lang.String adapterId, BindingContext context)
          Creates a bound button group.
 
Method Summary
 RadioButton<T> createButton(java.lang.String adapterId, java.lang.String label)
          Creates a bound radio button and adds it to this group.
 java.lang.Object getValue()
          Returns the value of the selected button.
 boolean isDirty(java.lang.Object value)
          Checks if the selected value is the sames as the value in the model.
 java.lang.Object load()
          Returns the value saved in the model.
 void setValue(java.lang.Object value)
          Selects the button whose option equals the given value.
 void update(java.lang.Object value)
          Update the model's value with the value of the selected button.
 
Methods inherited from class nextapp.echo2.app.button.ButtonGroup
addButton, getButtons, getRenderId, removeButton, updateSelection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoundButtonGroup

public BoundButtonGroup(java.lang.String adapterId,
                        BindingContext context)
Creates a bound button group.

Parameters:
adapterId -
context -
Method Detail

createButton

public RadioButton<T> createButton(java.lang.String adapterId,
                                   java.lang.String label)
Creates a bound radio button and adds it to this group.

Parameters:
adapterId - The adapter id for the radio button option
label - The label of the radio button
Returns:

load

public java.lang.Object load()
Returns the value saved in the model.

Returns:

update

public void update(java.lang.Object value)
Update the model's value with the value of the selected button.

Parameters:
value -

isDirty

public boolean isDirty(java.lang.Object value)
Checks if the selected value is the sames as the value in the model.

Parameters:
value -
Returns:

getValue

public java.lang.Object getValue()
Returns the value of the selected button.

Returns:
the value of the selected button

setValue

public void setValue(java.lang.Object value)
Selects the button whose option equals the given value.

Parameters:
value -


Copyright © 2007. All Rights Reserved.