View Full Version : Bottom of AccordionLayout ContentPanel out of view

27 May 2009, 8:57 AM

I have an issue that started when I moved from GXT 2.0 M1 to M2. I've been unable to fix the issue, so I thought I'd ask here before I posted a bug report.

The UI is built roughly so (the app is heavy MVC so the code is spread around, this is the gist):

// creating objects
this.viewport = new Viewport();
this.outer = new ContentPanel();
this.top = new ContentPanel();

this.navigation = new ContentPanel();
this.status = new ContentPanel();
this.center = new ContentPanel();

// setting up the left (navigation) panel
this.navigation.setLayout(new AccordionLayout());
this.CreateInternalPanels(); // creates a special ContentPanel() with appropriate styles for each section and adds them to this.navigation

// ...
// other panels (center, lower, etc) created here
// ...

// adding all panels to the UI
this.viewport.setLayout(new FitLayout());
this.outer.setLayout(new RowLayout(Orientation.VERTICAL));

this.top.setLayout(new RowLayout(Orientation.HORIZONTAL));
this.outer.add(this.top, new RowData(1, 1));

this.top.add(this.navigation, new RowData(200, 1));
this.top.add(this.center, new RowData(1, 1));
this.outer.add(this.status, new RowData(1, 25));

RootPanel.get().add(this.viewport);The correct behavior of the navigation pane is shown in accord_01.jpg (attached). This is what it looked like in M1. What happens now, when the application loads, is shown in accord_02.jpg. Once the browser window is resized, or the "General" panel is collapsed and re-expanded, the UI returns to what is shown in accord_01.jpg. I added scrollbars to the panel to show exactly where the elements were being rendered; see accord_03.jpg.

Any thoughts?

27 May 2009, 12:06 PM
I've found that if I add a timer after CreateInternalPanels():

Timer t = new Timer(){
public void run()
t.schedule(1000);That the panel renders correctly. I have a feeling I'm missing some configuration on the panel or I'm adding children to parents at the wrong time or something like that. If anyone has any tips I'd be appreciative. :)