PDA

View Full Version : [INFOREQ][3.0.0] PagingToolbar displayMsg not updating when store is filtered.



shadoi
23 Aug 2009, 2:07 PM
This is a fairly complex scenario to paste a code example, but I think I can describe it easily:


The store that a PagingToolbar uses becomes filtered.
The user clicks next on the PagingToolbar

The page to display has zero records to display because of the filter in 1.

(emptyMsg is displayed).
The filter on the store is changed, or cleared.
From then on the displayMsg is never updated without a full page reload.


I tried forcing the PagingToolbar to doLayout() when the store filter is changed, but this didn't work. I was about to try using the cloneConfig and replacing the component, but this seems clunky/heavy-handed.

evant
23 Aug 2009, 4:19 PM
Since you didn't post a test case I can't be sure, however the paging toolbar works by listening to the load event on the store. If you're filtering data on the store locally it won't update the parameters related to the store.

Is this the case? If so, it's how the PagingToolbar is intended to work.

shadoi
24 Aug 2009, 8:19 AM
Correct. I have a set of checkboxes that filter the store locally. When I first read this I was excited since I thought I could just use the load callback, but was stumped again when I discovered the callback is only available on the method, not the event. I'm not really sure how to do this. At least it's only cosmetic.

evant
24 Aug 2009, 3:58 PM
I'll move this to help then.

igorp
18 Sep 2009, 1:09 AM
Hi,

I also found at least in 2.2.1 version that display message of PagingToolBar is not updated if record(s) has been deleted from the store. In this case it still displays the number of records before the delete operation. I had to call a store.reload() method to solve this problem.
Is it a correct behavior ?