PDA

View Full Version : Endless Ext.List with Ext.data.JsonStore



Josa
26 Nov 2010, 4:31 AM
I am new to Sencha Touch development, so I might miss something really basic here.

I have Ext.List with a Ext.data.JsonStore. And I am trying to load new Items / Records when the end of the list is reached. I can't find any Event for that?

jay@moduscreate.com
26 Nov 2010, 7:48 AM
I think you're going to have to listen to the scroll events from the scroller element.

Josa
26 Nov 2010, 10:45 AM
Thank you for your reply!
Where would I find the scroller element? I cannot find anything about that in the API Documentation.

herkulano
26 Nov 2010, 11:01 AM
You can find it here:
http://dev.sencha.com/deploy/touch/docs/?class=Ext.util.Scroller

Josa
29 Nov 2010, 4:12 AM
Thank you!

The Solution seems to be:


list.scroller.addListener('scrollend', function(scroller, offset){
if((list.el.dom.scrollHeight-offset.y)== list.height) {
console.log('listend');
}
});

sidds.moona
1 Jan 2013, 10:00 PM
Hello,

I am new to Extjs. Even I am trying to implement an endless scroller on my grid with json data.

Kindly guide where and how I should be using the code given by you above.

Many thanks for the help.