我想获得filterBuilder.getCriteria()
字段名称和值
final FilterBuilder filterBuilder = new FilterBuilder();
filterBuilder.setDataSource(a.getInstance());
IButton filterButton = new IButton("Filter");
filterButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
// i want to get values of filterBuilder.getCriteria()
//field name and value
}
});
答案 0 :(得分:0)
不确定它是您正在寻找的,而是来自SmartGWT的javadoc http://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/widgets/form/FilterBuilder.html#getCriteria()
看看AdvancedCriteria方法getValues()我想我们可能会这样做。 http://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/data/Criteria.html#getValues()
final FilterBuilder filterBuilder = new FilterBuilder();
filterBuilder.setDataSource(a.getInstance());
IButton filterButton = new IButton("Filter");
filterButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
//field name and value
Map criteria = filterBuilder.getCriteria().getValues();
}
});