|
本帖最后由 nick99 于 2016-11-8 14:18 编辑
BEx5 3.6
1.按钮点击后动态创建了一个gridselect:
- var option = {
- xid : 'dGridSelect',
- optionCfg : {
- data : 'classData',
- value : 'fClassName',
- columns : [ {
- name : 'fClassName'
- } ]
- },
- 'bind-ref' : "mainData.ref('fClassID_1')",
- multiselect : false,
- parentNode : this.getElementByXid("col30")
- };
- new gridSelect(option);
复制代码
2.按钮点击后删除了该组件:- justep.Component.removeComponent(this.comp("dGridSelect"));
复制代码
3.第一次执行1步,选择下拉组件的某值,然后执行第2移除该组件,一切正常,无报错。再次执行第一个按钮创建gridselect后,如果下拉选择的值为原值,则不报错,如果下拉选择了新值,则报jgrid错误,但填写框内能获得选择后的数值。TypeError: Cannot read property 'jqGrid' of null at constructor.setSelection (eval at <anonymous> (http://localhost:8080/x5/UI2/v_afa61e5b89e84f328dac9e092c9375ffl_zh_CNs_desktopd_pc/system/core.min.js:71:17978), <anonymous>:207:345635) at constructor.eval (eval at <anonymous> (http://localhost:8080/x5/UI2/v_afa61e5b89e84f328dac9e092c9375ffl_zh_CNs_desktopd_pc/system/core.min.js:71:17978), <anonymous>:207:344302) at constructor.fire (http://localhost:8080/x5/UI2/v_afa61e5b89e84f328dac9e092c9375ffl_zh_CNs_desktopd_pc/system/core.min.js:71:236440) at constructor.fireEvent (http://localhost:8080/x5/UI2/v_afa61e5b89e84f328dac9e092c9375ffl_zh_CNs_desktopd_pc/system/core.min.js:71:237604) at constructor.to (http://localhost:8080/x5/UI2/v_b90d4d24fe2d4e6daefe0e5ca792cefcl_zh_CNs_desktopd_pc/system/common.min.js:15:38831) at HTMLTableElement.onSelectRow (eval at <anonymous> (http://localhost:8080/x5/UI2/v_afa61e5b89e84f328dac9e092c9375ffl_zh_CNs_desktopd_pc/system/core.min.js:71:17978), <anonymous>:207:328667) at HTMLTableElement.eval (eval at <anonymous> (http://localhost:8080/x5/UI2/v_afa61e5b89e84f328dac9e092c9375ffl_zh_CNs_desktopd_pc/system/core.min.js:71:17978), <anonymous>:207:106166) at Function.each (http://localhost:8080/x5/UI2/v_afa61e5b89e84f328dac9e092c9375ffl_zh_CNs_desktopd_pc/system/core.min.js:71:18328) at h.each (http://localhost:8080/x5/UI2/v_afa61e5b89e84f328dac9e092c9375ffl_zh_CNs_desktopd_pc/system/core.min.js:71:16173) at h.setSelection (eval at <anonymous> (http://localhost:8080/x5/UI2/v_afa61e5b89e84f328dac9e092c9375ffl_zh_CNs_desktopd_pc/system/core.min.js:71:17978), <anonymous>:207:105106)
关闭
求助,是否移除gridselect的写法有问题,还有其他绑定组件需要处理?
|
|