Page.checkRendering fails after setting BorderBodyContainer visiblity to false
------------------------------------------------------------------------------

                 Key: WICKET-2368
                 URL: https://issues.apache.org/jira/browse/WICKET-2368
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.4-RC5
         Environment:       <groupId>org.apache.wicket</groupId>
      <artifactId>wicket</artifactId>
      <version>1.4-rc5</version>
            Reporter: Michael Frankerl


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() {
                                expanded = !expanded;
                                getBodyContainer().setVisible(expanded);
                        }
                };
                link.add(new Label("titleLabel", titleModel));

                add(link);
        }

}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to