日期:2014-05-16 浏览次数:20360 次
//定义一个USERstore
var fields = ["user_no","user_id","user_name","lpwd","shop_no","shop_name","isadmin","lltime","available"];
var USERstore = new Ext.data.GroupingStore({
proxy:new Ext.data.HttpProxy(
{
url:"sys_user_info.aspx",
method:"POST"
}),
reader:new Ext.data.JsonReader(
{
fields:fields,
root:"data",
id:"user_no",
totalProperty:"totalCount"
}),
sortInfo:{field:'user_no',direction: "ASC"}
});
//加载时参数
USERstore.load({params:{start:0,limit:pageSize}});
//增加数据页面提交处理
EditUserInfofp.form.submit({
url:"user_edit.aspx,
params:{dp_datas:jsonData},
method:"POST",
success:function(form,action)
{
Ext.MessageBox.show({
title: '恭喜',
msg:'信息保存成功!',
icon:Ext.MessageBox.INFO
});
//刷新数据集
USERstore.reload();
此处调试过USERstore,的确从后台已经重新加载,数据是最新的,可是引用USERstore,却发现还是之前的数据,而并非最新的数据,why???EditUserInfoWin.hide();
},
failure:function(form,action)
{
Ext.MessageBox.show({
title: '提示',
msg:'保存信息失败!',
icon:Ext.MessageBox.ERROR
});
}
});