Re: RadioGroup selected model value

2013-12-17 Thread Paul Bors
See also section 12.10 of the Wicket Guide Working with radio buttons and
checkboxes at:
http://wicket.apache.org/guide/guide/chapter11.html#chapter11_10



On Mon, Dec 16, 2013 at 3:44 AM, Selom pierre.kou...@uhb.fr wrote:

 Hi Sven,
 Thanks for the clarification  . Now I understand much more.

 I tried  out   your code your code  with the following modification.




 Now when the page is shown , * the object  with value debut2   is
 effectively selected  as expected*.

 I Thanks you .



 -
 Selom
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/RadioGroup-selected-model-value-tp4662998p4663034.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: RadioGroup selected model value

2013-12-16 Thread Selom
Hi Sven,
Thanks for the clarification  . Now I understand much more.

I tried  out   your code your code  with the following modification.
  



Now when the page is shown , * the object  with value debut2   is
effectively selected  as expected*.

I Thanks you .



-
Selom
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RadioGroup-selected-model-value-tp4662998p4663034.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RadioGroup selected model value

2013-12-13 Thread Selom
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: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: RadioGroup selected model value

2013-12-13 Thread Sven Meier

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:

IModelAgModele agModel = new IModelAgModele() {
  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: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org