Ext.onReady(function(){
Ext.define('TbExt', {
extend : 'Ext.data.Model',
fields : [ {
name : 'id',
type : 'int'
}, {
name : 'name',
type : 'int'
}, {
name : 'password',
type : 'string'
} ]
}); var myStore = Ext.create('Ext.data.Store', {
model : 'TbExt',
proxy : {
type : 'ajax',
url : 'extAction!findTbExt.action',
reader : {
type : 'json',
root : 'list'
}
},
autoLoad : true
});
var extwin=Ext.create('Ext.window.Window',{
title:'用户列表',
width:400,
height:280,
layout:'fit',
draggable : false,
closable : false,
resizable : false,
items:[{
xtype : 'grid',
store : myStore,
columns:[
{
header:'id',
dataIndex:'id',
flex:1
},{
header:'号码',
dataIndex:'name',
flex:1
},{
header:'密码',
dataIndex:'password',
flex:1
}
],
buttons:[{
id:'btn',
text:'删除',
handler:function(){}
}]
}],
renderTo : Ext.getBody()
});
extwin.show();
});
Ext.define('TbExt', {
extend : 'Ext.data.Model',
fields : [ {
name : 'id',
type : 'int'
}, {
name : 'name',
type : 'int'
}, {
name : 'password',
type : 'string'
} ]
}); var myStore = Ext.create('Ext.data.Store', {
model : 'TbExt',
proxy : {
type : 'ajax',
url : 'extAction!findTbExt.action',
reader : {
type : 'json',
root : 'list'
}
},
autoLoad : true
});
var extwin=Ext.create('Ext.window.Window',{
title:'用户列表',
width:400,
height:280,
layout:'fit',
draggable : false,
closable : false,
resizable : false,
items:[{
xtype : 'grid',
store : myStore,
columns:[
{
header:'id',
dataIndex:'id',
flex:1
},{
header:'号码',
dataIndex:'name',
flex:1
},{
header:'密码',
dataIndex:'password',
flex:1
}
],
buttons:[{
id:'btn',
text:'删除',
handler:function(){}
}]
}],
renderTo : Ext.getBody()
});
extwin.show();
});
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货