PDA

View Full Version : Ext.carousel.Infinite



hotdp
13 Nov 2012, 5:51 AM
Hi,
Is this component forgotten by the Touch team? It has been private for a very very long time now... Its a very essential feature.

mitchellsimoens
13 Nov 2012, 5:56 AM
It hasn't been forgotten about. 2.1 was mainly about charts, infinite list and performance fixes.

Technically, you can have an infinite list (just not where it wraps). If you have 100 children, it will only have 3 rendered at one time.

hotdp
13 Nov 2012, 5:58 AM
Hi,
I have to render/create them on the fly because its more than 1000 items and i have to fetch data dynamically for each item.
This is not possible right?

mitchellsimoens
13 Nov 2012, 6:01 AM
It will only render 3 at a time. The items will be instantiated yes just not all rendered.

hotdp
13 Nov 2012, 6:04 AM
Hi,
But still, I have to get server data for each item. So with the normal carousel it will get server data for all 1000 items when creating the carousel because the are no dynamics when loading data.
If it is possible please let me know?

mitchellsimoens
13 Nov 2012, 6:07 AM
The carousel doesn't poll the server for data, it will only use what is in the items array so I'm not sure why the question of carousel asking about loading data from a server.

hotdp
13 Nov 2012, 6:20 AM
The carousel doesn't poll the server for data, it will only use what is in the items array so I'm not sure why the question of carousel asking about loading data from a server.

Sure its about the carousel. But I must be VERY bad at explaining I guess...

I can not bind all data to the carousel in the start because the amount of data is way to big. Thats why I need to load the data dynamically when needed. Just like the TouchStyle App does by using infinite and solves the issue.

hotdp
13 Nov 2012, 6:50 AM
Or do I misunderstand the idea behind the dynamic carousel?

hotdp
13 Nov 2012, 8:41 AM
var items = [];

for (var i=0;i< 3600;i++)
{
items.push({
html : 'Item' + i,
style: 'background-color: #5E99CC'
});


}


var car = Ext.create('Ext.Carousel', {
//fullscreen: true,


defaults: {
styleHtmlContent: true
},


items: items
});

Is this awesome? And ok? I will have 3 of those in a card layout. It takes a iPhone 4s 8.1 x 3 seconds