[ 
https://issues.apache.org/jira/browse/WICKET-3843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13057192#comment-13057192
 ] 

Adrian Sandor commented on WICKET-3843:
---------------------------------------

Is it going to be fixed in 1.4?

> 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
>
> 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

        

Reply via email to