Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Filter

$
0
0
I had code which was working on 4.1p and now in 5.0p eval 27.01 is not working correctly.

The purpose is to intercept the filter action, add a criterion to the filter criteria and filter the listgrid with the new criteria.
After filtering, the text entered in the filter mask disappears! In 4.1p this was not happening.

Code:

ListGrid lg = new ListGrid()
...
lg.addFilterEditorSubmitHandler(new FilterEditorSubmitHandler() {

                        @Override
                        public void onFilterEditorSubmit(FilterEditorSubmitEvent event) {
                                event.cancel();
                                AdvancedCriteria c = new AdvancedCriteria(OperatorId.AND,
                                                new Criterion[] {
                                                                new Criterion("f_username",
                                                                                OperatorId.NOT_EQUAL,
                                                                                "system"),
                                                                lg.getFilterEditorCriteria()
                                                                                .asAdvancedCriteria() });
                                lg.filterData(c, new DSCallback() {

                                        @Override
                                        public void execute(DSResponse dsResponse, Object data,
                                                        DSRequest dsRequest) {
                                                //
                                        }
                                });
                        }
                });


Viewing all articles
Browse latest Browse all 4756

Trending Articles