Hi everybody,

I'm working with the Trinidad Table component. I was wondering if anyone has
used a ResultSet on the value attribute. Supposedly this attribute takes a
CollectionModel which extends a JSF DataModel. The underlying wrapped data
according to the Javadoc (
http://myfaces.apache.org/core12/myfaces-api/apidocs/javax/faces/model/DataModel.html#getWrappedData())
the data can be a List, Array or ResultSet and when it is specified in the
value attribute it is automatically converted to a CollectionModel.

All of the examples I have seen usually use a List. Since the data I want to
use I am accessing from a local SQL Server, if I could, I would prefer to
use a ResultSet. Something like this:

<tr:table summary="Search Results" rendered="true" partialTriggers="selType"
rowSelection="'single'"
          value="#{searchTable.dbResults}" var="row" rows="10">

...where dbResults is the ResultSet I want to use. But I'm not sure how to
access the columns of each individual row. I've tried this:

<tr:column>
    <f:facet name="header">
        <tr:outputText value="ColumnA"/>
    </f:facet>
    <tr:outputText value="#{row.columna}"/>
</tr:column>

...where columna is the name of a column in the ResultSet. I don't think
this is the way it should work.

Has anyone done this before?

Thanks in advance,

Marco

Reply via email to