extjs struts2 convention 注解
?
struts2-convention.plugin 插件与extjs 整合.
?
??注:..其实这种struts2 的注解方式也可以与jquery,ajax?结合...
在www.shoujicaipiao.com.cn这个网站中就用到了jquery+struts2-convention-plugin
?
技术结构:
struts2+spring+jpa+extjs+mysql
?
包结构:
?
运行界面:
?
?
web.xml 省略.
?
struts.xml
?
?
?
applicationContext.xml?
?
?
ManagerAction
?
?
??manager.js--简单的grid实现
?
?
var store = new Ext.data.Store( {proxy : new Ext.data.HttpProxy( {url : 'manager/0/getManager'}),reader : new Ext.data.JsonReader( {root : 'managerList',totalProperty : 'totalProperty',id : 'id'}, [ {name : 'categoryname',mapping : 'categoryname',type : 'string'}, {name : 'cardcost',mapping : 'cardcost',type : 'int'}, {name : 'salefetchmethod',mapping : 'salefetchmethod',type : 'string'}, {name : 'salefetchmoney',mapping : 'salefetchmoney',type : 'int'}, {name : 'fundfetchmethod',mapping : 'fundfetchmethod',type : 'string'}, {name : 'fundfetchmoney',mapping : 'fundfetchmoney',type : 'int'} ])});store.load( {params : {start : 0,limit : 15}});var cm = new Ext.grid.ColumnModel( [ {header : '卡类型名称',dataIndex : 'categoryname',sortable : true,width : 100}, {header : '卡的基本费用',dataIndex : 'cardcost',sortable : true,width : 100}, {header : '售卡提成方式',dataIndex : 'salefetchmethod',sortable : true,width : 100}, {header : '售卡提成金额',dataIndex : 'salefetchmoney',sortable : true,width : 100}, {header : '充值提成方式',dataIndex : 'fundfetchmethod',sortable : true,width : 100}, {header : '充值提成金额',dataIndex : 'fundfetchmoney',sortable : true,width : 100} ]);cm.defaultSortable = true;var grid = new Ext.grid.GridPanel( {border : false,store : store,loadMask : true,cm : cm, region:'center', autoExpandColumn:true, stripeRows:true, tbar : new Ext.PagingToolbar( {store : store,pageSize : 15,displayInfo : true,displayMsg : "本页显示第{0}条到第{1}条的记录,一共{2}条",emptyMsg : "没有记录"})});Ext.onReady(function() {Ext.QuickTips.init();grid.render(new Ext.getDom("sadf"));});?
?jquery+struts2-convention..
?
?
?