[color=darkred][/color]function updateButton(store){
// 获取store中的脏数据
var modified = store.modified.slice(0);
//var view = Ext.getCmp("egp").getView();
var jsonArray = [];
if (modified.length > 0)
{
Ext.each(modified, function(m)
{
jsonArray.push(m.data);
})
Ext.Ajax.request
({
url : 'updateUsers.action',
params :
{
data : Ext.util.JSON.encode(jsonArray)
},
method : 'post',
success : function(response)
{
store.reload();
if(response.success)
{
Ext.Msg.show
({
title : '系统提示',
msg : '保存成功',
width : 200,
multiline : false,
closable : false,
buttons : Ext.MessageBox.OK,
icon : Ext.MessageBox.INFO
});
}
else
{
Ext.Msg.show
({
title : '系统提示',
msg : '不能修改ID 或者 输入的位数太长 保存失败',
width : 200,
multiline : false,
closable : false,
buttons : Ext.MessageBox.OK,
icon : Ext.MessageBox.INFO
});
}
},
failure : function()
{
Ext.Msg.show
({
title : '系统提示',
msg : '保存失败',
width : 200,
multiline : false,
closable : false,
buttons : Ext.MessageBox.OK,
icon : Ext.MessageBox.INFO
});
}
});
}else
{
Ext.Msg.show
({
title : '系统提示',
msg : '您没有修改,不需要保存!',
width : 200,
multiline : false,
closable : false,
buttons : Ext.MessageBox.OK,
icon : Ext.MessageBox.INFO
});
}
};
不管保存是否成功 每次都执行 success里面的else里面的 返回来 true false 都有
怎么改才对啊 求高手指导