You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Mads Peter Henderson <ma...@tietoenator.com> on 2004/12/16 14:04:16 UTC

How to set selected value of selectOneRadio

Hi,

This is probably a very trivial question, but I can't find out how to 
set which of the selectItems of a <x:selectOneRadio> which has been 
selected.

I have tried to look into the selectbox.jsp and the CarConfigurator 
class of the examples, but I can't figure out what makes the band 
selctor (id="discount2") having a default selected item while, rebate 
selector (id="r1") has no default selction.
Can someone enlighten me?

-- 
Thanks
Mads Peter Henderson


Re: How to set selected value of selectOneRadio

Posted by Martin Marinschek <ma...@gmail.com>.
just set the value of the x:selectOneRadio such that it is the same as
the value of the selectItem you want to have selected as default...

regards,

Martin


On Thu, 16 Dec 2004 14:04:16 +0100, Mads Peter Henderson
<ma...@tietoenator.com> wrote:
> Hi,
> 
> This is probably a very trivial question, but I can't find out how to
> set which of the selectItems of a <x:selectOneRadio> which has been
> selected.
> 
> I have tried to look into the selectbox.jsp and the CarConfigurator
> class of the examples, but I can't figure out what makes the band
> selctor (id="discount2") having a default selected item while, rebate
> selector (id="r1") has no default selction.
> Can someone enlighten me?
> 
> --
> Thanks
> Mads Peter Henderson
> 
>

Re: How to set selected value of selectOneRadio

Posted by Michael Borgwardt <br...@brazils-animeland.de>.
On Thu, 16 Dec 2004, Mads Peter Henderson wrote:

> This is probably a very trivial question, but I can't find out how to 
> set which of the selectItems of a <x:selectOneRadio> which has been 
> selected.

The value attribute of the selectOneRadio tag determines that.

-- 
Michael Borgwardt