EXT gridpanel中实现下拉框

阅读更多
		    	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	""
		    						}
		    						else
		    						{
		    							var temp = '';
		    							for (var i = 0; i < hCpuList.length; i++)
		    							{
		    								var pt = hCpuList[i].id;
		    								var ptname = hCpuList[i].value;
		    								temp = temp + '';
		    							}
		    							return ""
		    							
		    						}
		    					});
		    					
		    				}
		    				
						}
		    		});
			}





   			    	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 = 	""
			    						}
			    						else
			    						{
			    							var temp = '';
			    							for (var j = 0; j < hCpuList.length; j++)
			    							{
			    								var pt = hCpuList[j].id;
			    								var ptname = hCpuList[j].value;
			    								temp = temp + '';
			    							}
			    							str =  ""
			    						}

			    						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)