incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Bond" <>
Subject Re: tr:table & pagin
Date Wed, 20 Dec 2006 09:03:28 GMT
Thanks for the reply,
So is the way of doing this to extend a dataModel class and implement my own 
getRowCount() method?

>From: "Adam Winer" <>
>Subject: Re: tr:table & pagin
>Date: Mon, 11 Dec 2006 08:45:59 -0800
>On 12/11/06, Marcus Bond <> wrote:
>>>From what I can gather, in Trinidad the total number of records in a table
>>is automatically 'known' by the  number of rows in the model. However, 
>>if you don't want to fetch the whole set of data from the database and 
>>prefer to only fetch the required rows from the database for each page?
>No, not the case.  Just like in Tomahawk and with h:dataTable,
>we support the DataModel API.  If you don't know how many rows
>there are, then return -1 from getRowCount().  The only requirement -
>which applies to all users of the JSF DataModel API - is that if
>someone calls setRowIndex(...), isRowAvailable() has to figure
>out if that row really exists.
>The Trinidad CollectionModel API extends DataModel to add support
>for sorting and identifying-rows-by-keys-instead-of-indices - but
>the same rules apply.  So you could extend CollectionModel instead
>of DataModel if you want those add-on features, but we support
>both DataModel and CollectionModel.
>-- Adam
>>I only want to query for a small number of records (1 page) at a time but
>>need some way of informing the table component that there are in fact a 
>>more records in the database.
>>This would require setting a variable that represents the total number of
>>rows available from the database, but there doesn't appear any longer to 
>>this facility.
>>Is there a straightforward way of doing this? (eg: like the dataScroller 
>>It's Hotmail's 10th Birthday! Come and play Pass the Parcel

It's Hotmail's 10th Birthday! Come and play Pass the Parcel

View raw message