【问题标题】:Select Item in grid在网格中选择项目
【发布时间】:2011-01-07 20:12:57
【问题描述】:

我在 windows 系统上使用 smart gwt2.2,浏览器 Mozilla。 在 smart gwt 中,我使用 ListGrid。在该 ListGrid 中,我已将编辑器类型设置为 Select Item。

SelectItem item = new SelectItem(); ListGridField field = new ListGridField("Field", "Field"); field.setEditorType(item);

我的问题是我将简单的字符串值映射设置为 Select Item 然后它工作正常,但是当来自服务器端的相同列表并且我尝试设置时它给出了这个错误,

http://127.0.0.1:8888/nextenders/sc/modules/ISC_Forms.js 第 1831 行中未捕获的 JavaScript 异常 [this.formItem 未定义]

我不知道我在哪个地方做错了。

【问题讨论】:

    标签: gwt smartgwt


    【解决方案1】:

    尝试为 SelectItem 和 ListGridField 赋予相同的字段名称

     SelectItem item = new SelectItem("fieldName");
     ListGridField field = new ListGridField("fieldName", "title");
     field.setEditorType(item); 
    

    【讨论】:

    • 检查 DataSource "fieldName" 是否也与 ListGridField "fieldName" 匹配
    猜你喜欢
    • 2012-08-23
    • 2022-07-08
    • 2021-12-30
    • 2015-02-03
    • 2023-04-04
    • 2019-02-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多