View Full Version : [FIXED] Filter in paging grids

6 Feb 2012, 5:23 AM
In a paging grid, when filters are added the result is a useless grid: it shows as many pages as initially but all of them are empty but those that have a row that matches the pattern. This is useless from the usability point of view.
What I think it should do is group all rows that match the pattern of the filter an then paginate those rows.
In fact, I think the right way to implement this is by adding the filtering information in the loading system just as you do with the sorting. This way the server-side could do the filtering so the client did not have to do that effort.
It is to say, add a field in a class that extends from ListLoadConfig that has the filtering information, just as you have for the 2.x version (FilterPagingLoadConfig)

16 Feb 2012, 11:57 AM
How did you get a paging grid working with filtering? When I bind the loader on my paging tool bar it complains about the signature.

Here's what I have:

RpcProxy<FilterPagingLoadConfig, PagingLoadResult<M>> proxy =
new RpcProxy<FilterPagingLoadConfig, PagingLoadResult<M>>() {

public void load(FilterPagingLoadConfig loadConfig,
AsyncCallback<PagingLoadResult<M>> callback) {
proxyCallback.execute(loadConfig, callback); // my own invocation...

final PagingLoader<FilterPagingLoadConfig, PagingLoadResult<M>> loader =
new PagingLoader<FilterPagingLoadConfig, PagingLoadResult<M>>(proxy);
loader.addLoadHandler(new LoadResultListStoreBinding<FilterPagingLoadConfig, M, PagingLoadResult<M>>(this.listStore));

PagingToolBar pagingToolBar = new PagingToolBar(20);
pagingToolBar.getElement().getStyle().setProperty("borderBottom", "none");
pagingToolBar.bind(loader); // compiler error

The error is:

bind(PagingLoadConfig) cannot be applied to bind(FilterPagingLoadConfig). A cast did not fix the issue - probably because a FilterPagingLoadConfig is a PagingLoadConfig.



Colin Alworth
16 Feb 2012, 1:50 PM
icfantv: The generics issue should be better in beta3 - give that a try, see if that helps.

paucarre: can you post a simple entrypoint that is wiring up the paging/filtering and drawing blank pages - the example at http://sencha.com/examples-dev/#ExamplePlace:remotefiltergrid seems to be doing this, though there are only two pages, filtering a column reduces it to one column. An example you can offer demonstrating this issue would be helpful for us.

16 Feb 2012, 2:09 PM

Beta3 fixed this. Thanks.