SGWT 2.5 (08/31/2011)
http://www.smartclient.com/smartgwt/showcase/#grid_autofit_filter
If I add the following hander and press the filter Button multiple times, it can be seen that the FilterEditor accumulates the undesiredCriteria.
Is this a bug/is there a way to obtain ***only*** those values that FilterEditor is actually showing without the historical ones?
Thanks
fatzopilot
http://www.smartclient.com/smartgwt/showcase/#grid_autofit_filter
If I add the following hander and press the filter Button multiple times, it can be seen that the FilterEditor accumulates the undesiredCriteria.
Code:
countryGrid.addFilterEditorSubmitHandler(new FilterEditorSubmitHandler() { @Override public void onFilterEditorSubmit(FilterEditorSubmitEvent event) { Criteria filterEditorCriteria = countryGrid.getFilterEditorCriteria(); LinkedHashMap<String, Object> criteriaMap = (LinkedHashMap<String, Object>) filterEditorCriteria.getValues(); for(Entry<String, Object> entry : criteriaMap.entrySet()){ //Object is either String or ArrayList System.out.println("key="+entry.getKey() + "/" + "value="+entry.getValue()+" ("+entry.getKey().getClass()+"/"+entry.getValue().getClass()+")"); } Criteria undesiredCriteria = new Criteria(); undesiredCriteria.addCriteria("undesiredCriteria", "XYZ"); Criteria queryCriteria = DataSource.combineCriteria(filterEditorCriteria.asAdvancedCriteria(), undesiredCriteria.asAdvancedCriteria()); event.cancel(); countryGrid.fetchData(queryCriteria); } });
Thanks
fatzopilot
Comment