Hi,
I have a DataSource ds for a type of objects, let's call them cars. Now I have a tree that displays groups of cars by colors.
When I click on a node, a ListGrid of the contained cars gets opened. I do using the following code:
Additionally, I want to enable filtering for this ListGrid. So, I let the filter editor appear. When I now use this filter form, I get all cars returned, not only the filtered for the one color.
My question is: How can I append the color as filter criterion, so the cars are also filtered by the color?
I already tried to override the ListGrid's filterData() methods. But they don't seem to be called when the user presses the filter button... And there is nothing like "addFilterEventHandler()". So what do I have to do, to append the criterion automatically everytime the ListGrid gets filtered by the user?
P.s.: The color attribute is hidden. So it is not displayed in the FilterEditor.
I have a DataSource ds for a type of objects, let's call them cars. Now I have a tree that displays groups of cars by colors.
When I click on a node, a ListGrid of the contained cars gets opened. I do using the following code:
Code:
Criteria criteria = new Criteria(); criteria.addCriteria("color", group.getColor()); ds.fetchData(criteria, new DSCallback() { carList.setData(response.getData()); [...]
My question is: How can I append the color as filter criterion, so the cars are also filtered by the color?
I already tried to override the ListGrid's filterData() methods. But they don't seem to be called when the user presses the filter button... And there is nothing like "addFilterEventHandler()". So what do I have to do, to append the criterion automatically everytime the ListGrid gets filtered by the user?
P.s.: The color attribute is hidden. So it is not displayed in the FilterEditor.
Comment