有些人可以告诉我,如何把数据从控制器传送到塞察触点的数据储存。
观点守则
var select = new Ext.form.Select({
id: selectCity ,
store: parking.stores.city,
displayField: Name ,
valueField: Name ,
placeHolder: Choose City ,
cls: select
});
var citySearchButton = new Ext.Button({
cls: citySearch ,
text: Search ,
handler: function () {
Ext.dispatch({
controller: parking.controllers.controller,
action: showMapBasedOnCity ,
id: Ext.getCmp( selectCity ).getValue()
});
}
});
从我的观点看,我能够把价值传给控制员。
showMapBasedOnCity: function (options) {
var city = options.id;
//var data = parking.stores.parkingFacilityByCity.setId(city);
// parking.views.map.addMap(city);
parking.views.viewport.setActiveItem(
parking.views.map, options.animation
);
},
The problem is how to pass the value from here to the data store : I need the parameter from controller (the city value) to pass to my jsonp query to get the desired result back).
parking.stores.parkingFacilityByCity = new Ext.data.Store({
model: PF ,
proxy: Ext.util.JSONP.request({
url: http://parking.511.org/index/M_GetParkingFacilityByCity ,
callbackKey: callback ,
parmas: { city: },
scope: this,
callback: function (data) {
var list = data.Root;
parking.stores.parkingFacilityByCity.loadData(data.Root);
}
})
});
任何帮助都将受到高度赞赏。
Thanks, Pawan