proxy里的method根本不管用,而且我在API里也找不到method这个配置项
我用的是extjs4,求解 Ext.define("dfl", {
extend: "Ext.data.Model",
fields: [
{name: "dflDm", type: "string"},
{name: "dflMc", type: "string"}
]
});
Ext.create("Ext.form.field.ComboBox", {
renderTo: Ext.getBody(),
store: {
model: "dfl",
proxy: {
url: "http://localhost/yx/dflServlet",
method: "post",
type: "ajax"
}
},
displayField: "dflMc",
valueField: "dflDm"
})
我用的是extjs4,求解 Ext.define("dfl", {
extend: "Ext.data.Model",
fields: [
{name: "dflDm", type: "string"},
{name: "dflMc", type: "string"}
]
});
Ext.create("Ext.form.field.ComboBox", {
renderTo: Ext.getBody(),
store: {
model: "dfl",
proxy: {
url: "http://localhost/yx/dflServlet",
method: "post",
type: "ajax"
}
},
displayField: "dflMc",
valueField: "dflDm"
})
actionMethods: { read: 'POST' },//将提交方式改为post,试试看
var store = Ext.create('Ext.data.Store', {
model : 'MyModel',
autoLoad : true,
proxy : {
type : 'ajax',
url : 'template/list_template.do',
actionMethods: { read: 'POST' },//将提交方式改为post
reader : {
type : 'json',
root : 'data'
}
}
});
我无语掉了,找完了proxy包下的所有类,都没见一个有actionMethods的配置项的,不过确实可以用
文档问题还是什么?受不了
Ext.create("Ext.form.field.ComboBox", {
renderTo: Ext.getBody(),
store: {
model: "dfl",
autoLoad: true,//加这一句
proxy: {
url: "http://localhost/yx/dflServlet",
//method: "post",这句不要了
type: "ajax"
}
},
displayField: "dflMc",
valueField: "dflDm"
})
你在API里面直接搜索actionMethods就可以找到了