日期:2014-05-16 浏览次数:20726 次
var docListSearchStore = ed.common.getStore({
fields : [{
name : 'docUnitId',
mapping : 'docUnitId'
}, {
name : 'docUnitName',
mapping : 'docUnitName'
}],
url : 'docListPathSearchController',
root : 'docList'
});
ed.common.getStore = function(opts) {
var store = new Ext.data.JsonStore({
autoDestroy : true,
url : 'action/' + opts.url,
method : 'POST',
baseParams : opts.baseParams,
timeout : 900000,
root : opts.root,
fields : opts.fields,
totalProperty : opts.totalProperty,
idProperty : opts.idProperty,
listeners : {
'exception' : {
fn : function(dataProxy, type, action, options, response, arg) {
if (type != 'remote') {
var responseObj = Ext.JSON.decode(response.responseText);
Ext.Msg.alert(ed.message.MES_TIT_ERROR, responseObj.message);
} else {
Ext.Msg.alert(ed.message.MES_TIT_ERROR, ed.resources.NETWORK_ERROR);
}
}
}
}
});
return store;
};