users@woodstock.java.net

Re: Woodstock - TableRowGroup

From: Indu Kurup <indukurup_at_gmail.com>
Date: Wed, 19 Sep 2007 14:53:09 -0700

This is what I was trying to implement where *backingBean.itemsList* is just
a list of item objects.


<webuijsf:tableRowGroup id="rowGroup1" sourceData="#{backingBean.itemsList}"
sourceVar="item">

<webuijsf:tableColumn id="col2">

<webuijsf:staticText text="#{item.itemName}"/>

</webuijsf:tableColumn>

</webuijsf:tableRowGroup>



And I am getting this exception

javax.faces.FacesException: javax.el.PropertyNotFoundException:
/searchResults.xhtml @32,125 text="#{item.itemName}": Property
'itemName' not found on type
com.sun.data.provider.impl.TableRowDataProvider

        at javax.faces.component.UICommand.getValue(UICommand.java:236)
Am I missing something here?

Thanks !

Date: Wed, 19 Sep 2007 10:28:47 -0400
From: Dan Labrecque <Dan.Labrecque_at_Sun.COM>
Subject: Woodstock - TableRowGroup

In addition to a DataProvider, you can also provide a array, List, or
Object. The TableRowGroup will simply wrap that in either a
ObjectListDataProvider or ObjectArrayDataProvider. (TableRowGroup always
uses a DataProvider to access data.) You can obtain the underlying
DataProvider by calling the getTableDataProvider() of TableRowGroup.

Dan

Indu Kurup wrote:
>
> I was trying to implement a simple table using Woodstock components.
> Could anyone please tell me if it is always a requirement to have a
> TableDataProvider instance as the sourceData, isn't there a way by
> which I can simply call a collection in the tableRowGroup? I
> appreciate any help.
>
> Thanks.