Hi,
to clarify:
- a RadioChoice is for selecting an object from a list of objects and
you don't need to control the markup
- a RadioGroup/Radio is for selecting an object from a list of objects
with free markup (e.g. a <table>)
What you have is a special case, where you want to *set booleans on a
list of objects*.
This can easily be achieved with a RadioGroup/Radio and a special model:
IModel<AgModele> agModel = new IModel<AgModele>() {
public void setObject(AgModele agenda) {
for (AgModele other : agendas) {
other.setVisible(false);
}
agenda.setVisible(true);
}
public AgModele getObject() {
for (AgModele other : agendas) {
if (other.isVisible()) {
return other;
}
}
return null;
}
}
Use this model for your RadioGroup.
Sven
On 12/13/2013 03:48 PM, Selom wrote:
Hello,
I confess I don't understand wicket radiogroup ( and model ).
i spent too much time with it .
Here is my problem.
*AgPage.html*
I would like to have debut2 to be *selected *, since visible = true.
Thanks for tour help.
-----
Selom
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/RadioGroup-selected-model-value-tp4662998.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]