Mike, thanks a lot, it's much simplier with this dataTable since you can assign an id to each <tr> of the table via the rowid attribute binding of the t:dataTable.
Thanks a lot. Matias Gomez Carabias -----Original Message----- From: Mike Kienenberger [mailto:[EMAIL PROTECTED] Sent: Monday, December 19, 2005 4:15 PM To: MyFaces Discussion Subject: Re: h:dataTable <tr> id Like I've said before, I haven't done anything like this, so I don't know the answer to your questions. Take a look at this page: http://myfaces.apache.org/tlddoc/tomahawk/t/dataTable.html There are many different row attributes available on the t:dataTable component. You might even determine a better way to do it than the ways I've suggested previously. Thes attributes look promising. rowId rowOnClick rowOnDblClick rowOnMouseDown rowStyle rowStyleClass If you search the MyFaces user mailing list archives, you'll probably find other threads discussing how this is best done. I seem to recall that most of the above attributes were added to t:dataTable to allow highlighting the selected row. Maybe you can write up a how-to article and add it to the HowTo section on the http://wiki.apache.org/myfaces/ page after you figure out the best solution. On 12/19/05, Matias Gomez Carabias <[EMAIL PROTECTED]> wrote: > Mike, thanks for your quick reply. > > If I use the row-styling option , then I'd have to add a > valuechangelistener and change the style in that method? > > How do I set a style for a row? Is there anyway to do this? I mean, how > do I access the "row" object? > > Thanks a lot Mike, really > > Regards > > Matias Gomez Carabias > > -----Original Message----- > From: Mike Kienenberger [mailto:[EMAIL PROTECTED] > Sent: Monday, December 19, 2005 12:49 PM > To: MyFaces Discussion > Subject: Re: h:dataTable <tr> id > > I guess one way you could do this is to use t:dataList instead. You > could then design your layout to work however you wanted since > t:dataList doesn't output any html tags. > > It seems like there may have been some row-styling tags added to > t:dataTable so that you could do this differently. Ie, instead of > setting a different id for each row, you'd just set a different css > style for the selected row. However, I've never tried to this > myself. > > On 12/19/05, Matias Gomez Carabias <[EMAIL PROTECTED]> wrote: > > > > > > > > > > Hi all, I have the following question, is there anyway to assign an id > to > > each <tr> in the rendered h:dataTable? For example set the id of the > tr to > > de id of the bean that's being iterated over? > > > > > > > > I need this because I have to do a javascript function to paint the > row of > > the table when the item Is selected by an <h:selectBooleanCheckbox>. > > > > > > > > Thanks a lot > > > > > > > > Matias Gomez Carabias >

