PDA

View Full Version : [FIXED] [2.0-rc1] Container - setLayout bug



ocooper
30 Jun 2009, 5:44 AM
Hi,

In the latest version from the repository, setLayout() in Container.java checks whether the layout passed in isn't null and then if it isn't it calls layout.setContainer with null. This results in a null pointer exception in FormLayout at Line 119 as it tries to call addStyleName() with a null Container.

Looking at the revisions looks like this was added in r1576.

Line 555 in Container.java:


protected void setLayout(Layout layout) {
if (this.layout != null) {
this.layout.setContainer(null);
}
this.layout = layout;
layoutNeeded = true;
layout.setContainer(this);
}

sven
30 Jun 2009, 6:52 AM
The change was needed to fix a couple of other issue. I fixed FormLayout.

Fixed in SVN.