dev@woodstock.java.net

Re: [Fwd: How to highlight a row in table]

From: Dan Labrecque - Sun Microsystems <Dan.Labrecque_at_Sun.COM>
Date: Tue, 20 Mar 2007 16:14:16 -0500

Use a value expression with the selected attribute of tableRowGroup.
This will allow you to highlight only the rows you're interested in.
This is basically the same as maintaining row highlighting for a
checkbox selection, but the value expression is based on some other
criteria. See the TLD doc for examples, specifically example #3 of
tableRowGroup.

| <webuijsf:tableRowGroup id="rowGroup1"
      selected="#{TableBean.groupA.select.selectedState}" <<<<
      sourceData="#{TableBean.groupA.names}"
      sourceVar="name" rows="5">|

Dan

Ken Paulsen wrote:
>
> Adding the Woodstock alias as this is probably the best place for this
> question. :)
>
> I don't know the answer off the top of my head, I would guess that you
> can add JS to do this, but am not sure what support already exists if
> any. So I'll let others (Dan?) answer this.
>
> Ken
>
> ------------------------------------------------------------------------
>
> Subject:
> How to highlight a row in table
> From:
> Karam Singh Badesha <Karam.Badesha_at_Sun.COM>
> Date:
> Tue, 20 Mar 2007 12:41:25 -0700
> To:
> smi-cc_at_sun.com, Anissa Lam <Anissa.Lam_at_Sun.COM>, Ken Paulsen
> <Ken.Paulsen_at_sun.com>
>
> To:
> smi-cc_at_sun.com, Anissa Lam <Anissa.Lam_at_Sun.COM>, Ken Paulsen
> <Ken.Paulsen_at_sun.com>
>
>
> Hi,
> I am using woodstock components in my application and I have a table
> with read only data. Since there is lot of data, I would like to add
> the highlight functionality to the table. I don't have a column with
> the checkbox. How do I get the hightlight working when a user clicks
> on a row?
>
> I tried adding selected="true" to the tableRowGroup but it highlights
> all the rows by default.
>
> thanks
> Karam
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: dev-help_at_woodstock.dev.java.net
>