开发者

example to override getValueFieldProperties FilterBuilder

开发者 https://www.devze.com 2023-03-21 03:01 出处:网络
I want to override getValueFieldPro开发者_开发百科perties for FilterBuilde. My requirement is for some specific type of field I want to show selection, for Value field instead of simple text box.

I want to override getValueFieldPro开发者_开发百科perties for FilterBuilde. My requirement is for some specific type of field I want to show selection, for Value field instead of simple text box. I have visited following: http://code.google.com/p/smartgwt/source/browse/tags/2.5/main/src/com/smartgwt/client/widgets/form/FilterBuilder.java?r=1796

thanks.


I found the solution for the requirement requirement is, for some specific type of field, I want to show selection, for Value field instead of simple text box.

for (DataSourceField field : dataSource.getFields()) {

    String type = field.getAttribute("serverType");

    if (type!=null && type.equals("SPECIFIC_TYPE")) {

    TreeMap<String, String> map = new TreeMap<String, String>();
    map.put("1", "value 1");
    map.put("2", "value 2");
    field.setValueMap(map);
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消