You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jeremy Thomerson <je...@wickettraining.com> on 2009/03/12 23:18:28 UTC

Re: get the index number of the RadioChoice selected and and not the label

Then use the numbers as your model, override getConverter and return your
own converter that converts the numbers to the displayable strings and vice
versa.

--
Jeremy Thomerson
http://www.wickettraining.com



On Thu, Mar 12, 2009 at 5:14 PM, novotny <no...@gridsphere.org> wrote:

>
> Hi,
>
> I couldn't seem to find the answer to this question but it's probably
> pretty
> easy. I have a radio choice like so:
>
> RadioChoice<String> rc = new RadioChoice<String>("answer", new
> PropertyModel<String>(item, "selected"), item.getAnswers());
>
> But basically it saves the answer text when what I really want to save is
> the value number e.g. "1" if the first radio was selected or "2" if it was
> the second.
>
> Thanks! Jason
>
>
> --
> View this message in context:
> http://www.nabble.com/get-the-index-number-of-the-RadioChoice-selected-and-and-not-the-label-tp22486349p22486349.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>