Details
Description
After toggling visibility of the BorderBodyContainer to false the Page.checkRendering method fails in line 1157, claiming an iterator IllegalStateException. This happens because iterator.remove() is called twice for a child component in the border component, if the body is not visible.
My Code:
public class TogglePanel extends Border {
private boolean expanded = true;
public TogglePanel(String id, IModel<String> titleModel) {
super(id, titleModel);
Link link = new Link("title") {
@Override
public void onClick()
};
link.add(new Label("titleLabel", titleModel));
add(link);
}
}
Markup:
<wicket:border>
<h3 class="collapse" wicket:id="title">
<span class="label" wicket:id="titleLabel">Panel Title</span>
<a class="foldicon"> </a>
</h3>
<wicket:body />
</wicket:border>