View Full Version : collapsed:true, possible bug.
10 Jan 2012, 11:24 PM
The problem is very easy to reproduce. Just try to add a region to an existing Viewport like this:
html: 'South Central'
The whole Viewport becomes a mess. just by setting collapsed to true. IF collapsed is false, everything works great.
10 Jan 2012, 11:39 PM
From the docs:
The regions of a BorderLayout are fixed at render time and thereafter, its child Components may not be removed or added
11 Jan 2012, 6:20 AM
I thought they were made dynamic in 4.1. Don presented this info at senchacon. See the border layout section of the linked slide set...
11 Jan 2012, 8:05 AM
Agreed. Adding regions like this is listed in the 'Other Goodies' section of the blog post discussing what to expect from 4.1:
15 Jan 2012, 10:12 AM
Exactly. I also read that adding components dynamically to Border Layout was one of the hottest features of 4.1.
In the process of working on layouts, border layout in particular benefited from some internal restructuring. It has always been a very popular layout, but it has also suffered from some long-standing limitations:
You could only have one region that is north, south, east or west. If you needed multiple south regions, you needed to use nested border layouts.
You could not configure the layout such that an east or west region had priority over a north or south region. To achieve this, again, you needed to use nested border layouts.
Components could not be added to the container after creation.
Components could not be removed from the container after creation.
The point is that adding components (regions) actually works. Yes, I can add components dynamically. The only problem is that setting "collapsed:true" gives a rendering problem.
Fixing that issue, everything will work as expected.
I hope some of you guys give me a more detailed explanation.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.