Success! Looks like we've fixed this one. According to our records the fix was applied for
Sencha Premium Member
Does BorderLayoutContainer require collapsible areas to contain ContentPanel
I have been adding GXT components to my existing GWT application.
When I tried to use BorderLayoutContainer to create hidable areas, I ran into the exception:
Caused by: java.lang.ClassCastException: com.sencha.gxt.widget.core.client.container.BorderLayoutContainer cannot be cast to com.sencha.gxt.widget.core.client.ContentPanel
When I looked at the code, it appears that BorderLayoutContainer requires the top level component of the area to be a ContentPanel. Once I put ContentPanel into my areas, things work.
I do see ContentPanel being used in the BorderLayoutContainer.
But I see nothing in any documentation I have found that says that the North/South/East/West areas must contain a ContentPanel for them to have the ability to be hidden.
My questions: Is it correct that ContentPanel is required? If so, why is this not explicitly stated in the javadoc and other documentation (examples are nice but they are not a substitute for documentation particularly when something is required)?
In short, yes, it is required - without a header, there is no room to render the collapse icon.
You are correct that we should have better javadocs in this area. It might also be reasonable to emit a warning in the case where a layout data is passed in that uses a feature that is incompatible with the child widget being used. I've moved this thread to the bugs section and filed it internally to make sure that we follow up on this.
Sencha - Support Team
Just an update, this issue has been fixed and is merged into the 3.1 beta branch.