PDA

View Full Version : Problem with Viewport



vamshigurudu
27 Dec 2010, 11:43 PM
Hi All,

I am using extjs viewport, i have one problem with viewport panels.
I have one table with some content in the table, and below that in another table i need to insert viewport panels.
But when i am using viewport panels, panels are coming properly, but above table content is not appearing, that means viewport is hiding the above table.
Any suggestions please.

Thanks.

Condor
28 Dec 2010, 12:56 AM
Your description isn't clear enough.

Could you post the code you have now and maybe include a sketch of the layout you want?

vamshigurudu
28 Dec 2010, 1:25 AM
Your description isn't clear enough.

Could you post the code you have now and maybe include a sketch of the layout you want?

below is my code, there some links in the table, clicking on them dynamically i am adding panels, when panel is added in viewport, the above table is moving up side i am unable to use them again.


<body >
<table><tr><td>some links.....<td></tr></table>
<div id='jsonDiv' style='width:200px;height:200px;'></div>
</body>

var viewport = new Ext.Viewport({
autoshow:true,
layout:'border',
items:[{
xtype:'portal',
region:'center',
margins:'35 5 5 0',
renderTo:'jsonDiv',
boxMaxHeight: 600,
items: [{
....
}]

}]
});

Condor
28 Dec 2010, 1:37 AM
You can't use renderTo inside a viewport! A viewport always takes up the whole browser window and any component inside is rendered by the layout and not to a specific element.

What exactly would you like to do with that <table> and <div id="jsonDiv">?

vamshigurudu
28 Dec 2010, 1:47 AM
But renderTo is working fro me and viewport is also displayed with dynamic panels.
In the table i have some menus and links.

Thanks

Condor
28 Dec 2010, 2:13 AM
1. Remove the <div id="jsonDiv"> and the renderTo (you don't need it).
2. Can you give the <table> and id?
3. Where should that table be displayed? In a portlet or in a west region of the border layout?