Should FilterBuilder fire a FilterChangedEvent when criteria are removed? It doesn't seem to, using a nightly eval 2.5-NIGHTLY-2011-03-16. Tested on FF 3.5 and IE8.
Run the following, add 2 lines to the criteria, remove 1. The FilterChangedHandler is not fired on remove.
Nothing in the console after page loaded.
Run the following, add 2 lines to the criteria, remove 1. The FilterChangedHandler is not fired on remove.
Nothing in the console after page loaded.
Code:
public void onModuleLoad() {
VLayout layout = new VLayout(5);
layout.setMargin(25);
DataSource ds = new SupplyCategoryXmlDS("myds");
final FilterBuilder fb = new FilterBuilder();
fb.setDataSource(ds);
fb.addFilterChangedHandler(new FilterChangedHandler() {
public void onFilterChanged(FilterChangedEvent event) {
SC.say(JSON.encode(fb.getCriteria().getJsObj()));
}
});
layout.addMember(fb);
layout.draw();
}
Comment