I suppose it's intended for the situation where you know at least a rough estimate of the count before requesting the data e.g. paging. Another example could be passing the category item count down along with the category name etc. when requesting the category list, assuming a list of categories is what is swapping out the data in the table. I agree it struggles in the case of requesting a completely arbitrary set of data, maybe a method like setRowCountUnknown() would "clean it up".
On Tue, May 15, 2012 at 5:38 PM, Jens <[email protected]> wrote: >> You need to make sure that the cell-widget thinks the current page >> size is non-zero e.g. setRowCount(x) (where x > 0). You're basically >> trying to convince this method to enter the LOADING state - >> >> private void updateLoadingState() { >> int cacheSize = getVisibleItemCount(); >> int curPageSize = isRowCountExact() ? getCurrentPageSize() : >> getPageSize(); >> if (cacheSize >= curPageSize) { >> view.setLoadingState(LoadingState.LOADED); >> } else if (cacheSize == 0) { >> view.setLoadingState(LoadingState.LOADING); >> } else { >> view.setLoadingState(LoadingState.PARTIALLY_LOADED); >> } >> } > > > Ok I have now: > > list.setVisibleRangeAndClearData(list.getVisibleRange(), true); > list.setRowCount(1); > > and it works for empty data in the CellList as well as with data. But to me > it seems really "hackish". > > -- J. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-web-toolkit/-/rjiC8vRwQ3kJ. > > 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. -- 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.
