Thanks Jeff, I didn't know about the new fill parameters and that client-to-database technique.
As always, very useful! C. 2007/8/30, Alban Soupper <[EMAIL PROTECTED]>: > > Thanks Jeff for this helpful information J > > > > I will now investigate the LC DS 2.5 > > > > Alban. > > > ------------------------------ > > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Jeff Vroom > *Sent:* 29 August 2007 22:51 > *To:* flexcoders@yahoogroups.com > *Subject:* RE: [flexcoders] FDS and Paging > > > > 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. > > > > > ************************************************************************************ > > > > > ************************************************************************************ > > 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. > > > > > ************************************************************************************ > > > > > -- ::| Carlos Rovira ::| http://www.carlosrovira.com ::| http://www.madeinflex.com