PDA

View Full Version : BorderLayout and Dynamic component adding...



WixSL
4 Feb 2012, 8:52 PM
Does Ext 4.1 allows adding dinamycally regions to a border layout.

If not, how can I solve he following type of situation:

For speed perseption reasons y create an Ext.Window and show it immediatly with a waiting mask, and bring by ajax the json configs with definitions of components to add in the west and center layout. But I could't be able to add them to the regions. The west component is a TreePanel, and the center one TabPanel.

Any sugestions.

Thank you.

mitchellsimoens
5 Feb 2012, 9:49 AM
In 4.1.0 beta1 and later Border layout finally allows you to add/remove direct children. In face, there is an example that does just that that comes in the zip download.

WixSL
5 Feb 2012, 12:18 PM
That's great.
Thank you so much.

I've mark mitchellsimoens answer as the best possible, witch in did it is.

But I still need an Ext 3.4.0 approach since most of my code is written with that version. And it will take a while before I port everything else to Ext 4.1.

Should I open another Q&A post?

WixSL
6 Feb 2012, 7:24 AM
Ok. I've solve it by defining a "fix" border layout skeleton and dynamically adding the components to the regions.