EXT gridpanel中实现下拉框 博客分类: ExtJS ext
程序员文章站
2024-03-24 08:54:46
...
afterrender:function(){ var hostId = Ext.getCmp("vCpu_numa_host_id").getValue(); var nodeName = Ext.getCmp("vCpu_numa_node_id").getValue(); ajaxRequest({ url: getContextPath() + '/load.action', params : {'id': hostId, 'nodeName': nodeName}, async: '1', loadMastTarget: Ext.getBody(), complete : function(hCpuList) { if (hCpuList) { Ext.getCmp('vCpu_numa_bind_id').getColumnModel().setRenderer(1,function(value, cellmeta, record) { if (hCpuList == undefined || hCpuList == '') { return "<select id='numaCore_"+record.get("vmCPU") + "' disabled='disabled' >" +"<option value='-1' selected = 'selected'>" + platform_common_select + "</option></select>" } else { var temp = ''; for (var i = 0; i < hCpuList.length; i++) { var pt = hCpuList[i].id; var ptname = hCpuList[i].value; temp = temp + '<option value=\'' + pt + '\'>' + ptname + '</option>'; } return "<select id='numaCore_"+record.get("vmCPU") + "' >" + "<option value='-1' selected = 'selected'>" + platform_common_select + "</option>" + temp + "</select>" } }); } } }); }
select: function(group, value) { var hostId = Ext.getCmp("vCpu_numa_host_id").getValue(); var nodeName = Ext.getCmp("vCpu_numa_node_id").getValue(); ajaxRequest({ url: getContextPath() + '/load.action', params : {'id': hostId, 'nodeName': nodeName}, async: '1', loadMastTarget: Ext.getBody(), complete : function(hCpuList) { if (hCpuList) { for(var i = 0; i < cpuNum; i++) { var str = ''; if (hCpuList == undefined || hCpuList == '') { str = "<select id='numaCore_"+i + "' disabled='disabled' >" +"<option value='-1' selected = 'selected'>" + platform_common_select + "</option></select>" } else { var temp = ''; for (var j = 0; j < hCpuList.length; j++) { var pt = hCpuList[j].id; var ptname = hCpuList[j].value; temp = temp + '<option value=\'' + pt + '\'>' + ptname + '</option>'; } str = "<select id='numaCore_"+i + "' >" + "<option value='-1' selected = 'selected'>" + platform_common_select + "</option>" + temp + "</select>" } var dom = document.getElementById("numaCore_" + i); dom.innerHTML = str; } } } }); }
https://www.cnblogs.com/xdp-gacl/p/3938361.html
https://my.oschina.net/vernon/blog/363693
推荐阅读
-
EXT gridpanel中实现下拉框 博客分类: ExtJS ext
-
【初学EXT】eclipse 部署EXTJS 博客分类: EXT exteclipse
-
【初学EXT】eclipse 部署EXTJS 博客分类: EXT exteclipse
-
ExtJs checkbox radiobox 问题 汇总 博客分类: ext基础 EXTjsonIEF#360
-
IE下ext树根节点没有反色、无选中状态的bug修复方法 博客分类: ExtJS IEEXTCSS
-
IE下ext树根节点没有反色、无选中状态的bug修复方法 博客分类: ExtJS IEEXTCSS
-
Ext4.0 动态修改ComboBox选择项(本地模式) 博客分类: ExtJs extjscombolocal
-
extjs My97DatePicker 整合 博客分类: ext extMy97DatePicker
-
Ext与服务端通信的方法 博客分类: ExtJS EXTAjaxjson数据结构XML
-
angularjs~中的下拉框,以及数据的回显,并且还可以实现下拉框的功能 博客分类: 前端笔记 下拉框