AccordionLayoutContainer

AccordionLayoutContainer

I'm not sure if the AccordionLayout is still under development - errors included, or if I'm using it totally wrong:

--------------------------------

When I create an AccordionLayout like in
gxt-3.0.0-dp5\examples-src\com\sencha\gxt\explorer\client\layout\AccordionLayoutExample.java
and add it to the west panel of a BorderLayoutContainer, I see the Accordion but I get the following error:

When I later add any other ContentPanel to the Accordion with: [..] con.add(cp5);

Code:

Caused by: java.lang.AssertionError: Method must be called before the widget is rendered
at com.sencha.gxt.widget.core.client.Component.assertPreRender(Component.java:1175)
at com.sencha.gxt.widget.core.client.ContentPanel.setCollapsible(ContentPanel.java:348)
at com.sencha.gxt.widget.core.client.container.AccordionLayoutContainer.onInsert(AccordionLayoutContainer.java:206)
at com.sencha.gxt.widget.core.client.container.Container.insert(Container.java:380)
at com.sencha.gxt.widget.core.client.container.InsertResizeContainer.insert(InsertResizeContainer.java:22)
at com.sencha.gxt.widget.core.client.container.Container.add(Container.java:86)

-----------------------------

Furthermore I couldn't figure out how to get the ChildWidgetIndex of the current expanded child.

The other issue is now gone as well. I didn't realized that even with uibinder the BorderLayoutData has to be passed with the container.setNorthWidget() call and not just in the XML.

The last remaining issue, from my initial questions was: java.lang.AssertionError: Method must be called before the widget is rendered
The error happens when I add new Content Panels to the accordion after the according was already created. This is my code: