PDA

View Full Version : Eager loading in accordion



stevanicus
12 Jun 2012, 12:03 AM
Hi there.

If you preload an accordion using

My accordion


requires:['...']
...
{
xtype:'myxtype'
}

Firebug shows that the required elements are loaded/ready in a collapsed accordion on page load.

However, how can I get the same result if I add elements after an accordion is rendered using


myaccordion.add(mypanel);

Firebug shows the body content of the accordion empty and is only loaded/filled when expanded.

I have tried methods such as


myaccordion.doLayout()

after adding a component.

I need it loaded on page load because of the number of component. If they are loaded on the fly - this slows down the browser the first time a user expands the accordion.

Thanks in advance

stevanicus
13 Jun 2012, 4:24 AM
*bump*

stevanicus
18 Jun 2012, 5:37 AM
*bump*

There has to be a way to force the rendering of items after .add() on a collapsed accordion?!

scottmartin
23 Jun 2012, 2:13 PM
You can add content on expand event and have dynamic panel

Scott.