pkvenu
24 Jan 2012, 9:25 AM
Hi I am trying to use the pull refresh plugin in an mvc architecture and having some issues.
Date.js
var pfLazyLoading = new Ext.data.Store({
model: 'Facility',
remoteFilter: true,
clearOnPageLoad: false,
pageSize: 10,
proxy: {
type: 'scripttag',
url: 'http://stg-parking.511.org/index/M_GetInitialDataByCityLazyLoading?city=San Francisco',
startParam: 'start',
limitParam: 'count',
reader: {
type: 'json',
root: 'Facilities'
}
}
});
In my View(TimeLine.JS)
var timelineList = new Ext.List({
itemTpl: new Ext.XTemplate('<div class="contact"><strong>Space Availability: {SpaceAvailability}</strong><br /> <strong>{ParkingType}<strong></div>'),
cls: 'timeline',
emptyText: '<p class="no-searches">No Tweets found matching that Search</p>',
disableSelection: true,
store: pfLazyLoading,
plugins: [{
ptype: 'listpaging',
autoPaging: false
}, {
ptype: 'pullrefresh'
}],
itemCls: 'tweet'
});
Attach List to a TimeLine Panel:
App.View.TimeLine = Ext.extend(Ext.Panel, {
initComponent: function () {
var config = {
title: 'Result',
id: 'Timeline',
scroll: 'vertical',
fullscreen: true,
items: [filter, timelineList]
};
Ext.apply(this, config);
App.View.TimeLine.superclass.initComponent.call(this);
},
onLoad: function (data) {
console.log('OnLoad TimeLine Called .....');
}
});
Ext.reg('App.View.TimeLine', App.View.TimeLine);
My controller calls this function
var getParkingFacilityByCity = function (cityName) {
mask.show();
pfLazyLoading.load(); // Here i am loading the list
mask.hide();
}
When i send in the request i don't see the Start param and end param values. Can you tell me what i am doing wrong here.
Here is the request which goes out:
http://stg-parking.511.org/index/M_GetInitialDataByCityLazyLoading?city=San Francisco&_dc=1327425640317&count=10&callback=stcCallback1001 (http://stg-parking.511.org/index/M_GetInitialDataByCityLazyLoading?city=San%20Francisco&_dc=1327425640317&count=10&callback=stcCallback1001)
Date.js
var pfLazyLoading = new Ext.data.Store({
model: 'Facility',
remoteFilter: true,
clearOnPageLoad: false,
pageSize: 10,
proxy: {
type: 'scripttag',
url: 'http://stg-parking.511.org/index/M_GetInitialDataByCityLazyLoading?city=San Francisco',
startParam: 'start',
limitParam: 'count',
reader: {
type: 'json',
root: 'Facilities'
}
}
});
In my View(TimeLine.JS)
var timelineList = new Ext.List({
itemTpl: new Ext.XTemplate('<div class="contact"><strong>Space Availability: {SpaceAvailability}</strong><br /> <strong>{ParkingType}<strong></div>'),
cls: 'timeline',
emptyText: '<p class="no-searches">No Tweets found matching that Search</p>',
disableSelection: true,
store: pfLazyLoading,
plugins: [{
ptype: 'listpaging',
autoPaging: false
}, {
ptype: 'pullrefresh'
}],
itemCls: 'tweet'
});
Attach List to a TimeLine Panel:
App.View.TimeLine = Ext.extend(Ext.Panel, {
initComponent: function () {
var config = {
title: 'Result',
id: 'Timeline',
scroll: 'vertical',
fullscreen: true,
items: [filter, timelineList]
};
Ext.apply(this, config);
App.View.TimeLine.superclass.initComponent.call(this);
},
onLoad: function (data) {
console.log('OnLoad TimeLine Called .....');
}
});
Ext.reg('App.View.TimeLine', App.View.TimeLine);
My controller calls this function
var getParkingFacilityByCity = function (cityName) {
mask.show();
pfLazyLoading.load(); // Here i am loading the list
mask.hide();
}
When i send in the request i don't see the Start param and end param values. Can you tell me what i am doing wrong here.
Here is the request which goes out:
http://stg-parking.511.org/index/M_GetInitialDataByCityLazyLoading?city=San Francisco&_dc=1327425640317&count=10&callback=stcCallback1001 (http://stg-parking.511.org/index/M_GetInitialDataByCityLazyLoading?city=San%20Francisco&_dc=1327425640317&count=10&callback=stcCallback1001)