myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Breidecker <rbreidec...@yahoo.com>
Subject Re: DataTable and selectOneRadio
Date Fri, 08 Apr 2005 16:02:05 GMT
I had to code a custom solution for this where I use
two images.  One image for the selected state and one
for the unselected state.  I have a backing bean that
keeps track of which one is selected, based on an
actionlistener that gets executed when a row is
clicked on.  The trick is to have a backing bean
method for deciding which image gets displayed when
the data table gets rendered.  It wasn't pretty, but
it did the job.

Here is my datatable column definition for the
radiobutton.  Note: the image property is a dynamic
property.

<h:column>                       			<f:facet
name="header"></f:facet>                      
<h:commandButton id="selectButton"
actionListener="#{resultsBean.selectButtonActivated}" 
                     
image="#{resultsBean.selectButtonUrl}"                
      alt="#{msgs.selectButtonText}"
title="#{msgs.selectButtonText}"/> 
</h:column>

--- Heath Borders <heath.borders@gmail.com> wrote:
> Currently, this is not possible without a custom
> component.
> 
> On Apr 7, 2005 3:51 AM, Vinod Singh
> <Vinod.Singh@rmsi.com> wrote: 
> > 
> > Hi All,
> > 
> > How I can put <h:selectOneRadio > in a column of
> datatable. I want that at
> > a time only one radio button could be selected out
> of several rows.
> > 
> > Thanks,
> > 
> > Vinod
> > 
> > 
> 
> 
> -- 
> -Heath Borders-Wing
> hborders@mail.win.org
> 


		
__________________________________ 
Yahoo! Messenger 
Show us what our next emoticon should look like. Join the fun. 
http://www.advision.webevents.yahoo.com/emoticontest

Mime
View raw message