This works for me as well with DataGrid and AsyncDataProvider and 2.5rc1.
I'll take hackish over not showing the loading indicator at all. Thanks
guys.
On Tuesday, May 15, 2012 12:38:35 PM UTC-4, Jens 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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.