PDA

View Full Version : Ext 3.1 TabPanel problem



nicobarten
24 Dec 2009, 3:13 AM
Hi all.

I have a TabPanel with 2 tabs. Both are filled using Templates. The TabPanel is in a Window, which got opened by doubleclicking a row in another grid. So each time the Window is opened, it fills via the Template both Tabpages. I use the template function overwrite to write the new values to the template in the tabpage.

This always worked in ExtJS 3.03. Now however, i'm getting this error:

el is null: el.innerHTML = this.applyTemplate(values);\n

When i remove the overwrite function for the second tabpage, it works. So it goes wrong for the second tabpage (which isn't loaded at window.show, the first tabpage is always loaded of course). I'm getting the idea that the second tab isn't rendered yet when the template tries to overwrite its values.

For the TabPanel i have these parameters:

deferredRender: false,
layoutOnTabChange: true,

I tried all possible combinations with these params, but it didn't work...

nicobarten
24 Dec 2009, 3:36 AM
Solved it.

'forceLayout: true' did the trick. :)