PDA

View Full Version : Ext.List consisting of Components?



senchauser2010
8 Dec 2010, 7:11 AM
Is it possible to use Ext.List, where each item is a Component?

I don't want to use itemTpl to render individual items, since the child items are relatively complex and a Component is a much better fit.

Any opinions/suggestions on how to address this?

Steffen Hiller
8 Dec 2010, 8:53 AM
As far as I know you can't.

The way one is usually doing this is something like Ext.each(Ext.select('.item'), function (item) {
button = new Button;
button.renderTo(item);
});
which you execute afterrender and onUpdate. (For the latter is no event I think, you have to extend the method.)

VinylFox
8 Dec 2010, 9:22 AM
Is it possible to use Ext.List, where each item is a Component?

If you need to display a bunch of Components, that would be a Layout. The List is just a Component for displaying data.