|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.bebop.AbstractSingleSelectionModel
com.arsdigita.bebop.ParameterSingleSelectionModel
An implementation of SingleSelectionModel
that uses
a state parameter for managing the currently selected key.
A typical use case for this class is as follows.
public TheConstructor() { m_parameter = new StringParameter("my_key"); m_sel = new ParameterSingleSelectionModel(m_parameter); } public void register(Page p) { p.addComponent(this); p.addComponentStateParam(this, m_param); }
Field Summary | |
static String |
versionId
|
Constructor Summary | |
ParameterSingleSelectionModel(ParameterModel m)
Constructs a new ParameterSingleSelectionModel. |
Method Summary | |
Object |
getSelectedKey(PageState state)
Returns the key that identifies the selected element. |
ParameterModel |
getStateParameter()
Returns the state parameter that will be used to keep track of the currently selected key. |
void |
setSelectedKey(PageState state,
Object newKey)
Set the selected key. |
Methods inherited from class com.arsdigita.bebop.AbstractSingleSelectionModel |
addChangeListener, clearSelection, fireStateChanged, isLocked, isSelected, lock, removeChangeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
Constructor Detail |
public ParameterSingleSelectionModel(ParameterModel m)
m
- the parameter model that will be used to
keep track of the currently selected keyMethod Detail |
public Object getSelectedKey(PageState state)
getSelectedKey
in interface SingleSelectionModel
getSelectedKey
in class AbstractSingleSelectionModel
state
- a PageState
value
String
value.public final ParameterModel getStateParameter()
SingleSelectionModel
return new StringParameter("foo");
public void setSelectedKey(PageState state, Object newKey)
setSelectedKey
in interface SingleSelectionModel
setSelectedKey
in class AbstractSingleSelectionModel
state
- represents the state of the current requestnewKey
- the new selected key
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |