View Full Version : BorderLayoutRegion starting collapsed?

10 Jul 2009, 10:24 AM
Hi all, Making my first Ext-GWT app, and was having a problem with getting a BorderLayoutRegion to start off already collapsed. I saw some notes on the 1.x forum about using getState() and saveState(), however that is not working for me, no matter where I put it in the order. (On the panel prior to assigning it to the parent panel with the border layout, after, etc...) Thanks for any help.

21 Aug 2009, 2:28 PM
I am having the same problem. Did you find a fix? Thanks!

21 Aug 2009, 2:40 PM
Thought I should post my non working code..... I've tried putting my getState() and saveState() calls both before and after adding my panels to the container. Neither works. :(

private LayoutContainer getHierarchyPanel() {
LayoutContainer container = new LayoutContainer();
final BorderLayout borderLayout = new BorderLayout();
mgtHierarchyPanel = getMgtHierarchyPanel();
durationHierarchyPanel = getDurationHierarchyPanel();

BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.setMargins(new Margins(5, 0, 5, 0));

BorderLayoutData southData = new BorderLayoutData(LayoutRegion.SOUTH, 100);
southData.setMargins(new Margins(0, 5, 5, 5));

container.add(mgtHierarchyPanel, centerData);
container.add(durationHierarchyPanel, southData);

durationHierarchyPanel.getState().put("collapsed", true);

return container;

24 Aug 2009, 12:59 AM
i dont tested it but i think you try to set the items with setStateful and setStateId because the items are not stateful in 2.0 by default. try it first with the borderlayout.

Component stateful default changed to FALSE.