PDA

View Full Version : ListPagingPlugin doesn't render when store returns empty results on autoLoad.



bobvandell
25 Mar 2011, 1:47 PM
I am building an application that has three log lists that are to show logs in 7 day increments.

I'm using the Ext.plugins.ListPagingPlugin inside an Ext.List.

The problem I'm having is that when an empty result set is successfully returned, the loadMoreText isn't rendered...

I have three lists with three different data types and the two that have records on the first load render fine and continue to render the loadMoreText even when paging returns no records, but the third doesn't display it at all. The data retrieval and rendering are working fine but I wanted to make use of the new ListPagingPlugin and that's what is causing me problems now.

Here's an example of my list and plugin that won't show the loadMoreText.




paging = new Ext.plugins.ListPagingPlugin({loadMoreText: 'Previous 7 days...'});

agentLogsList = new Ext.List(
{
title: 'Agent Log',
disableSelection: true,
pinHeaders: true,
trackOver: true,
itemTpl: logTemplate,
store: agentLogsStore,
scroll: 'vertical',
plugins: [paging],
deferEmptyText: false,
emptyText: '<div style="text-align: center; padding-top: 10px;">No logs to display...</div>'
});



Any help is much appreciated.

bobvandell
28 Mar 2011, 9:17 AM
39 views and not a single reply? What a weekend...

bobvandell
28 Mar 2011, 9:38 AM
Never mind, screw it. I decided to always pre-pend my result set with the date range being returned (even if there are no log entries) as the first record.