Hi João,
So I think that you can do this today where you just pass the sort fields as additional fill parameters. Is there a reason you want the sort fields broken out explicitly in the api? Jeff ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of João Fernandes Sent: Thursday, August 30, 2007 4:05 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] FDS and Paging Jeff, I would like to see the custom paging method to be enhanced so it would also pass the sort fields and their order. I say fields because we could sort by multiples columns the paged collection. Once the client sort by n fields, those would be passed to the custom fill method with their corresponding order and it would allow to retrieve any page with any order without having to retrieve all the collection to the client. João Fernandes Jeff Vroom wrote: By default, DS will just page from the client to the server, not from the server to the database. I'd expect it to call fill once, but then the client fetches the data in pages. Starting in LC DS 2.5, we added a mechanism to page directly to the database. Currently it is limited in that you must set autoSyncEnabled=false for it to work before you call fill (though we hope to fix that limitation in the next release). To use this you implement the variant of the fill method which takes the start and count methods: Collection fill(List fillParameters, int startIndex, int numberOfRows); You also must override the "useFillPage" method and have it return "true" for that set of fill parameters. There are two options for determining the size of the collection that the client sees. It will call your assembler's count method with the same fill parameters. If that returns -1, it goes into a dynamic sizing mode where it makes the size of the collection on the client pageSize+1 items, then when that one missing item is fetched it ups the size to pageSize+pageSize+1, etc. until it hits the end. By default when you sort in the data grid (or apply any filters) it will page in all items automatically since the default behavior is to sort on the client. This can be inefficient so you might want to add the sort criteria to the fill parameters. You can then override the sort behavior in the data grid to call fill again rather than paging all of the items. Jeff ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alban Soupper Sent: Wednesday, August 29, 2007 7:27 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] FDS and Paging Hi All, I need some help with FDS and the paging feature. Here is the situation: I have a DataGrid that display a list of managed objects - using DFS and the Assembler strategy. The number of objects is very large and is time consuming to load. I would want to use the paging feature to deal with this situation. I enabled the paging option in the destination descriptor, but the behavior does not change. The client just calls my assembler fill method always in the same way. Did I miss some point? What happens with the paging feature and the sort feature of the Datagrid? Any help is welcomed. Alban. ************************************************************************************ This email and any attachments transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is strictly prohibited. If you have received this email in error please notify the system manager at [EMAIL PROTECTED] or by reply e-mail and immediately and permanently delete this message and any attachments. Thank you. ************************************************************************************