PDA

View Full Version : dynamically add panel to viewport east region already one panel present in this.



javapurna
11 Apr 2013, 8:35 PM
hi every one ,
dynamically add panel to viewport east region when click on button in my footer section. in east region already one panel preset (like vbox layout ).is it possible to add. and how to get view port in another view.

slemmon
13 Apr 2013, 12:05 PM
If you have an east panel already you can add a second east panel.
viewport.add({east panel config including region: east});

You can't have more than one viewport at a time as the viewport takes up the entire available space in a web page.

What are you trying to accomplish when you say you want a second viewport?

javapurna
14 Apr 2013, 8:49 PM
thank you very much slemmon (http://www.sencha.com/forum/member.php?67514-slemmon) .



i have one view port .in east region i want to show two panels they are not present when viewport initialization. after render view port my footer having two links . when i am click on links showing east region one panel and click on another link open same east region another panel (previous show panel present). it is done with show hide panels but is it correct way or i want to get viewport with east region and add items to that region how and achive this please replay me.

slemmon
15 Apr 2013, 11:59 AM
If you have an east panel in your viewport and it's empty to start you can add components to it using the links from the footer. Just make sure the east panel has a layout specified so it knows how to lay out the components when they're added to it.


eastpanel.add({
xtype: 'panel'
, title: 'Just added panel'
});