incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Baker,Jonathan" <Bak...@oclc.org>
Subject RE: selectedRowKeys
Date Thu, 31 Aug 2006 13:10:34 GMT
I just really want to know the easiest and most straightforward way to
know what rows were selected in my table.  I have all of the code
working once I know which rows are selected.  

I just really want to know if that selectedRowKeys attribute is
functional, and if not is there an alternative to keeping a reference to
the whole table component just to ask it which rows it thinks are
selected.


JB

-----Original Message-----
From: Simon Lessard [mailto:simon.lessard.3@gmail.com] 
Sent: Thursday, August 31, 2006 8:58 AM
To: adffaces-user@incubator.apache.org
Subject: Re: selectedRowKeys

Hello Jonathan,

Can you precise the use case please so we can come up with a possible
solution?


Thanks,

~ Simon

On 8/31/06, Baker,Jonathan <BakerJ@oclc.org> wrote:
>
> According to the documentation:
>
> Name                            Type
> Supports EL?     Description
> selectedRowKeys org.apache.myfaces.trinidad.model.RowKeySet     Yes
> the selection state for this component.
>
> I tried using this attribute for my table like this:
>
> selectedRowKeys="#{inbox.selectedRows}"
>
> Where selected rows exists as a field in my backing bean.
>
> private RowKeySet selectedRows;
>
>     public RowKeySet getSelectedRows() {
>         return selectedRows;
>     }
>
>     public void setSelectedRows(RowKeySet selectedRows) {
>         this.selectedRows = selectedRows;
>     }
>
> The problem is, neither the setter nor the getter is ever called on 
> this field when my form is submitted.
>
> I looked at the source code for
> org.apache.myfaces.trinidad.component.core.data.CoreTable.java and 
> there is no reference in there for this attribute whatsoever.  I also 
> looked at the demo code, but it was not using this attribute at all, 
> and the way the demo worked seemed a bit too low level for my tastes.

> Of course if there is no alternative I will proceed as the demo did, 
> but I was just curious as to why this attribute seemingly is not
functional.
>
>
> JB
>
>
>

Mime
View raw message