【问题标题】:example to override getValueFieldProperties FilterBuilder覆盖 getValueFieldProperties FilterBuilder 的示例
【发布时间】:2019-09-20 18:37:13
【问题描述】:

我想覆盖 FilterBuilde 的 getValueFieldProperties。 我的要求是我想要显示选择的某些特定类型的字段,用于值字段而不是简单的文本框。 我访问过以下内容: http://code.google.com/p/smartgwt/source/browse/tags/2.5/main/src/com/smartgwt/client/widgets/form/FilterBuilder.java?r=1796

谢谢。

【问题讨论】:

    标签: smartgwt


    【解决方案1】:

    我找到了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);
        }
    }
    

    【讨论】:

      猜你喜欢
      • 2016-02-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多