-
5 May 2012 4:21 AM #1
BorderLayoutContainer, toolbuttons not applied when components are added after render
BorderLayoutContainer, toolbuttons not applied when components are added after render
Required Information Version(s) of Ext GWT Ext GWT 3.0-GPL
Browser versions and OS (and desktop environment, if applicable)- Firefox 11, W7
- Chrome 20, W7
- ..probably others
Description Widgets added to the BorderLayoutContainer after the BorderLayoutContainer has beed rendered (RootLayoutPanel.get().add(..)) does not get the collapse toolbutton applied, and thus cannot be collapsed..
Run mode Both
Steps to reproduce the problem- Start running in development mode in Eclipse
- Open app in browser
Actual result
No button
Test caseHelpful Information Screenshot or video Live test Debugging already doneCode:public class TestCase implements EntryPoint { @Override public void onModuleLoad() { BorderLayoutContainer borderLayoutContainer = new BorderLayoutContainer(); BorderLayoutData northData = new BorderLayoutData(100); northData.setMargins(new Margins()); BorderLayoutData westData = new BorderLayoutData(180); westData.setMargins(new Margins(0, 3, 0, 0)); westData.setCollapsible(true); westData.setSplit(true); MarginData centerData = new MarginData(); BorderLayoutData eastData = new BorderLayoutData(250); eastData.setMargins(new Margins(0, 0, 0, 3)); eastData.setCollapsible(true); eastData.setSplit(true); BorderLayoutData southData = new BorderLayoutData(180); southData.setMargins(new Margins(3, 0, 0, 0)); southData.setCollapsible(true); eastData.setSplit(true); ContentPanel west = new ContentPanel(); ContentPanel north = new ContentPanel(); borderLayoutContainer.setWestWidget(west, westData); borderLayoutContainer.setNorthWidget(north, northData); Viewport viewport = new Viewport(); viewport.setWidget(borderLayoutContainer); RootLayoutPanel.get().add(viewport); ContentPanel east = new ContentPanel(); ContentPanel south = new ContentPanel(); ContentPanel center = new ContentPanel(); borderLayoutContainer.setEastWidget(east, eastData); borderLayoutContainer.setSouthWidget(south, southData); borderLayoutContainer.setCenterWidget(center, centerData); } }- BorderLayoutContainer.onInsert line 984 c.isRendered() will return true when the BorderLayoutContainer is rendered
-
10 May 2012 3:03 PM #2
Thanks for the report and the test case. I'm able to reproduce this issue. I've filed a bug against the team and will update this thread with any changes we make.
-
15 Nov 2012 10:19 AM #3
If you add items to a container after that container has been rendered, you will need a call to that container's doLayout or forceLayout in order to have it render correctly. This is not a bug in the framework.
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote