PDA

View Full Version : How can I add a panel to existing web page



Cem
11 Mar 2010, 3:01 AM
Hi all,

I have a problem about a existing web page. In this page there is a menu which is rendered for all pages. In one of the item in these menu, I want to render a panel with border layout. The parent of the this panel has a 100% height. My code is like this:



var myPanel = new Ext.Panel({
layout:'border',
renderTo:'content',
// height: 800,
items:[accordion, tabs]
});


I also used viewport but it is rendered at the body which is not suitable for me. By the way, when I use static height like 800 at above, it is working as I expected. But I want to dymanically set this value like viewport.

Thanks

11 Mar 2010, 6:49 AM
set autoHeight : true

Cem
11 Mar 2010, 7:43 AM
set autoHeight : true

I tried this too, but I did not work...

11 Mar 2010, 7:45 AM
OK, then set a height.

VegasRaab
25 Mar 2010, 3:34 PM
Cem, EXTJS does a horrible job rendering to existing DOM elements unless you specify a fixed height. Mixing autoHeight with an EXTJS layout usually leads to disaster as well. The only success I've had in this area is by getting the height of the DOM element during the Ext.onReady event, then creating my Ext panel by setting the panel to a specific height.

Cem
25 Mar 2010, 3:38 PM
VegasRaab thanks for your suggestion. I have done exactly the thing what you suggested. Actually It is pity that for such a tiny matter we have to add manual js codes.

Anyway thank you very much.

Cem