You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Ted Jones <Tj...@metamatrix.com> on 2005/08/05 17:57:06 UTC

Set SelectItem Selected Programmatically

Is there a way to programmatically set a SelectItem object selected so
when the page renders it is highlighted in it's select box?
 
Thanks,
Ted Jones

Re: Set SelectItem Selected Programmatically

Posted by Martin Marinschek <ma...@gmail.com>.
of course, sorry...

I was talking nonsense.

regards,

Martin

On 8/5/05, Mike Kienenberger <mk...@gmail.com> wrote:
> 
> Is that answering the same question he asked?
> 
> Isn't the way to do this to make sure that the target of your value
> binding for your select box is set to the same value as the desired
> SelectItem's getValue()?
> 
> On 8/5/05, Martin Marinschek <ma...@gmail.com> wrote:
> > just use the constructor with the disabled attribute - or the setters.
> >
> > regards,
> >
> > Martin
> >
> >
> > On 8/5/05, Ted Jones <Tj...@metamatrix.com> wrote:
> > >
> > > Is there a way to programmatically set a SelectItem object selected so
> > when the page renders it is highlighted in it's select box?
> > >
> > > Thanks,
> > > Ted Jones
> >
> >
>

Re: Set SelectItem Selected Programmatically

Posted by Mike Kienenberger <mk...@gmail.com>.
Is that answering the same question he asked?

Isn't the way to do this to make sure that the target of your value
binding for your select box is set to the same value as the desired
SelectItem's getValue()?

On 8/5/05, Martin Marinschek <ma...@gmail.com> wrote:
> just use the constructor with the disabled attribute - or the setters.
>  
>  regards,
>  
>  Martin
> 
> 
> On 8/5/05, Ted Jones <Tj...@metamatrix.com> wrote:
> > 
> > Is there a way to programmatically set a SelectItem object selected so
> when the page renders it is highlighted in it's select box? 
> >   
> > Thanks, 
> > Ted Jones 
> 
>

Re: Set SelectItem Selected Programmatically

Posted by Martin Marinschek <ma...@gmail.com>.
just use the constructor with the disabled attribute - or the setters.

regards,

Martin

On 8/5/05, Ted Jones <Tj...@metamatrix.com> wrote:
> 
> Is there a way to programmatically set a SelectItem object selected so 
> when the page renders it is highlighted in it's select box?
>  Thanks,
> Ted Jones
>