You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2011/07/02 19:34:21 UTC

[jira] [Resolved] (WICKET-3843) NPE with wicket:enclosure attribute and hierarchy mismatch

     [ https://issues.apache.org/jira/browse/WICKET-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-3843.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4.18
         Assignee: Igor Vaynberg

> NPE with wicket:enclosure attribute and hierarchy mismatch
> ----------------------------------------------------------
>
>                 Key: WICKET-3843
>                 URL: https://issues.apache.org/jira/browse/WICKET-3843
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.4.17
>            Reporter: Adrian Sandor
>            Assignee: Igor Vaynberg
>             Fix For: 1.4.18
>
>
> Please refer to the example code:
> public class TestPage extends WebPage {
> 	public TestPage() {
> 		add(new WebMarkupContainer("d"));
> 		add(new Label("msg", "hi"));
> 	}
> }
> TestPage.html:
> <html xmlns:wicket>
> <body>
> <div wicket:id="d">
> <div wicket:enclosure="msg"><span wicket:id="msg"></span></div>
> </div>
> </body>
> </html>
> The label is wrongly added to the page instead of the "d" container, but I am expecting wicket to show a nice error message instead of this:
> java.lang.NullPointerException
> 	at org.apache.wicket.markup.html.internal.InlineEnclosure.onAfterRenderChildren(InlineEnclosure.java:81)
> 	at org.apache.wicket.Component.afterRender(Component.java:1039)
> 	at org.apache.wicket.MarkupContainer.onAfterRenderChildren(MarkupContainer.java:1805)
> 	at org.apache.wicket.Component.afterRender(Component.java:1039)
> 	at org.apache.wicket.MarkupContainer.onAfterRenderChildren(MarkupContainer.java:1805)
> 	at org.apache.wicket.Component.afterRender(Component.java:1039)
> 	at org.apache.wicket.Page.renderPage(Page.java:936)
> [...]

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira