PDA

View Full Version : Creating a component with tpl html which grows with new items.



safiire
13 Jan 2011, 5:27 PM
I have created a Panel:

missionList = new Ext.Panel({
scroll: 'vertical',
title: 'All Missions',
tpl: [
'<tpl for=".">',
'<div class="mission">',
// A bunch of omitted html.
'</div>',
'</tpl>']
});

When Sencha is displaying this panel, and I call missionList.update( /* with data */), the items are visibly added correctly, but size of the Panel stays constant, and does not (virtually) grow when templated html items should stretch it, so when try to scroll through it, it always acts as though all the content is only as big as the viewport into that Panel. So you can only see the first few items. It does scroll, but it just does that elastic like jump back that it does when something is at the end of it's scrolling all the time.

How can I make it so a person can scroll through and view any number of templated html items within this control. Thank you very much, in advance to anyone who may be able to help.