With GWT 2.5, looking into HasDataPresenter.updateLoadingState, I realized 
I also had to set the page size to see the loading indicator when loading 
on an empty table.  My my "hack" was:

setRowCount(1);
setPageSize(1);
setVisibleRangeAndClearData(getVisibleRange(), true);
 


On Wednesday, 16 May 2012 02:38:35 UTC+10, 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 view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/X-xqKn8uFQsJ.
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.

Reply via email to