PDA

View Full Version : scrollend event on List not working



TDeBailleul
7 Nov 2011, 1:12 PM
Hi everyone,

There is my list definition



app.views.ActualitesList = function (config) {
Ext.apply(this, config);


this.actuGrid = new Ext.List({
store: app.stores.actualites,
itemTpl: app.templates.actualiteList
});


//constructor
app.views.ActualitesList.superclass.constructor.call(this, {
dockedItems: [{
xtype: 'toolbar',
ui:'dark',
title: 'Actualites',
items:[this.resetBtn,{xtype:'spacer'},this.newBtn]
}],
layout: 'fit',
items: [
this.actuGrid
]
});

this.actuGrid.scroller.on("scrollend", this.onActuGridScrollEnd, this) <---- Scrollend listener
};


Ext.extend(app.views.ActualitesList, Ext.Panel, {
initComponent: function() {
app.views.ActualitesList.superclass.initComponent.apply(this, arguments);
},

onActuGridScrollEnd: function(grid,e){
alert("Scrollend");
}
});



When I add the scrollend listener, my application won't work anymore (white screen in iOS Simulator).
Can somebody tell me why ?

Thanks !

TDeBailleul
8 Nov 2011, 12:49 AM
Could you briefly tell me what would be a good format ?

mitchellsimoens
8 Nov 2011, 9:44 AM
This is how the ListPaging plugin does it.


var targetEl = list.getTargetEl();

list.mon(targetEl.getScrollParent(), 'scrollend', someFn, this);

TDeBailleul
8 Nov 2011, 10:34 AM
This method is not working either. This could be because of the code format ? Is there a better way to organize the code ?

TDeBailleul
21 Nov 2011, 6:03 AM
Please, if someone could take a look a this problem. This is really important and I Can't figure out why it does not work.