In general, use AsyncDataProvider/AbstractDataProvider/ListDataProvider when your data is dynamic or you support paging. The DataProviders handle RangeChangeEvents from CellTable and ensures that only the correct data is sent to the CellTable.
Use CellTable#setRowData() when your data is static and you just want to display it on the page. You don't need a data provider if the data is not going to change while the app is running. Thanks, John LaBanca [email protected] On Thu, Jan 27, 2011 at 3:00 AM, Y2i <[email protected]> wrote: > > > I think where we have a complex view which has a number of cell widgets >> displaying different representation of same data, >> or maybe related data, instead of using setRowData, setRowCount on each >> and every one of them, we can use one AsyncDataProvider to provide data for >> them. >> >> > Yes. And a single data provider that provides data for multiple displays > can optimize access to internal cache. If a display requests a range that > has already been served to a different display, the data provider can simply > return cached data instead of making request to a server. > > >> one question, do we need to write event handling code for notifying all >> the cellwidgets that have a common AsyncDataProvider ? >> or AsyncDataProvider will notify them ? >> >> > Typically a user (through a pager or a scrollbar) would initiate > onRangeChange() on the data provider, and the data provider would call the > display back (setRowData/Count) right away (if the data is in the > provider's cache) or from the remote server's callback (if it needs to > request the data form the server). > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
