当前位置: 代码迷 >> Web前端 >> formpanel column格局
  详细解决方案

formpanel column格局

热度:656   发布时间:2012-10-23 12:12:22.0
formpanel column布局
var form = new Ext.form.FormPanel({
				url : '', // 保存URL
				border : false,
				autoScroll : true,
				labelWidth : 70,
				frame: true,
				defaultType : 'textfield',
				defaults :{
					msgTarget : 'side'//错误提示方式
				},
				padding : "10",
				items : [{
						xtype:'fieldset',
						title:'菜单基本信息',
						//autoHeight:true,
				        items: [{
				        	  layout:'column',
				        	  items:[{
				        	     columnWidth:.98,
				        	     layout:'form',
				        	     defaultType:'textfield',
				        	     items:[{
									 xtype : "hidden",
									 id : "id",
									 name : 'menu.id',
									 fieldLabel : "id"
								  },{
				        	     	id:'go_url',
				        	        name:'menu.go_url',
				        	        fieldLabel:'访问路径',
				        	        anchor:'100%',
				        	        allowBlank:false
				        	     }
				        	     ]
				        	  }]
				             },{
				        	  layout:'column',
				        	  border:'false',
				        	  items:[{
				        	     layout:'form',
				        	     columnWidth:.49,
				        	     defaultType:'textfield',
				        	     items:[{
				        	     	id:'name',
				        	        name:'menu.name',
				        	        fieldLabel:'菜单名称',
				        	        anchor:'100%',
				        	        allowBlank:false,
				        	        maxLength:15
				        	     }]
				        	  },{
				        	     layout:'form',
				        	     defaultType:'textfield',
				        	     columnWidth:.49,
				        	     items:[{
				        	     	id:'cls',
				        	        name:'menu.cls',
				        	        fieldLabel:'菜单图片',
				        	        anchor:'100%',
				        	        allowBlank:false,
				        	        maxLength:20
				        	     }]
				        	  }]
				             },{
				        	  layout:'column',
				        	  border:'false',
				        	  items:[{
				        	     layout:'form',
				        	     defaultType:'textfield',
				        	     columnWidth:.49,
				        	     items:[{
				        	     	id:'parentid',
				        	        name:'menu.parentid',
				        	        fieldLabel:'上级编号',
				        	        anchor:'100%',
				        	        allowBlank:false,
				        	        vtype:'alphanum'
				        	     }]
				        	  },{
				        	     layout:'form',
				        	     defaultType:'textfield',
				        	     columnWidth:.49,
				        	     items:[{
				        	     	id: 'sort',
				        	        name:'menu.sort',
				        	        fieldLabel:'菜单序号',
				        	        anchor:'100%',
				        	        allowBlank:false,
				        	        maxLength:3,
				        	        vtype:'alphanum'
				        	     }]
				        	  }]
				             },{
				        	  layout:'column',
				        	  border:'false',
				        	  items:[{
				        	     layout:'form',
				        	     columnWidth:.98,
				        	     defaultType:'textarea',
				        	     items:[{
				        	     	id:'remark',
				        	        name:'menu.remark',
				        	        fieldLabel:'备注',
				        	        anchor:'100%'
				        	     }]
				        	  }]
				             }]
				             },{
				             xtype:'fieldset',
						     title:'菜单状态',
				             items: [
				              {
								fieldLabel : "是否启用",
								xtype : "radiogroup",
							    id:'status',
								width:120,
								defaults : {
						            name : 'menu.status'
					            },
								items :[{
								    boxLabel:"启用",
								    inputValue:false,
								    checked:true
								},{
								     boxLabel:"禁用",
								     inputValue:true
								     
								}]
							}
				           
				           ] 
				             
			              }] 
			});
  相关解决方案