日期:2014-05-16 浏览次数:20821 次
Ext.onReady(function(){ var name=new Ext.form.TextField({ name:"name", id:"name", fieldLabel:"房间名称" }); var campus=new Ext.form.TextField({ name:"campus", fieldLabel:"所在校区" }); var buildingno=new Ext.form.TextField({ name:"room.buildingno", fieldLabel:"建筑楼号" }); var floor=new Ext.form.TextField({ name:"floor", fieldLabel:"所在楼层" }); var f=new Ext.form.FormPanel({ url:"/FWGL/room!addRoom", method:"post", title:"房间登记", width:700, height:300, frame:true, renderTo:"main", layout:"form", items:[ {//行1 layout:"column", items:[ { columnWidth:.5, layout:"form", items:[name] }, { columnWidth:.5, layout:"form", items:[campus] } ] }, {//行2 layout:"column", items:[ { columnWidth:.5, layout:"form", items:[buildingno] }, { columnWidth:.5, layout:"form", items:[floor] } ] } ], buttons:[ { text:"提交", handler:function(){ f.getForm().submit({ success:function(form,action){ Ext.Msg.alert("","提交成功!"+action.result.msg); }, failure:function(){ Ext.Msg.alert("","对不起,表单提交失败!"); } }); } }, { text:"重置", handler:function(){ f.getForm().reset(); } }] }); });
String name1=this.request.getParameter("name"); System.out.println("==="+name1);