You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Michael Frankerl (JIRA)" <ji...@apache.org> on 2009/07/14 15:16:15 UTC

[jira] Created: (WICKET-2368) Page.checkRendering fails after setting BorderBodyContainer visiblity to false

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.


[jira] Updated: (WICKET-2368) Page.checkRendering fails after setting BorderBodyContainer visiblity to false

Posted by "Michael Frankerl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Frankerl updated WICKET-2368:
-------------------------------------

    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() {
				expanded = !expanded;
				getBodyContainer().setVisible(expanded);
			}
		};
		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">&nbsp;</a>
	</h3>
	<wicket:body />
</wicket:border>



  was:
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);
	}

}


> 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);
> 	}
> }
> Markup:
> <wicket:border>
> 	<h3 class="collapse" wicket:id="title">
> 		<span class="label" wicket:id="titleLabel">Panel Title</span>
> 		<a class="foldicon">&nbsp;</a>
> 	</h3>
> 	<wicket:body />
> </wicket:border>

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


[jira] Updated: (WICKET-2368) Page.checkRendering fails after setting BorderBodyContainer visiblity to false

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag updated WICKET-2368:
---------------------------------------

    Attachment: wicket-2368.patch

I attached a test case which I wanted to add to the existing once to prevent the problem from happening in the future again. But actually it doesn't fail. May be you can have a look at it and modify it so that it fails. It seems something is missing in your story.

> 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
>         Attachments: wicket-2368.patch
>
>
> 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);
> 	}
> }
> Markup:
> <wicket:border>
> 	<h3 class="collapse" wicket:id="title">
> 		<span class="label" wicket:id="titleLabel">Panel Title</span>
> 		<a class="foldicon">&nbsp;</a>
> 	</h3>
> 	<wicket:body />
> </wicket:border>

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


[jira] Resolved: (WICKET-2368) Page.checkRendering fails after setting BorderBodyContainer visiblity to false

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag resolved WICKET-2368.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4-RC8
         Assignee: Juergen Donnerstag

fixed. Thanks

> 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
>            Assignee: Juergen Donnerstag
>             Fix For: 1.4-RC8
>
>         Attachments: wicket-2368.patch
>
>
> 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);
> 	}
> }
> Markup:
> <wicket:border>
> 	<h3 class="collapse" wicket:id="title">
> 		<span class="label" wicket:id="titleLabel">Panel Title</span>
> 		<a class="foldicon">&nbsp;</a>
> 	</h3>
> 	<wicket:body />
> </wicket:border>

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