You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2011/09/01 11:12:09 UTC

[jira] [Commented] (WICKET-4016) MarkupContainer.toString(true) fails with MarkupNotFoundException if the call is made in the component constructor

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

Martin Grigorov commented on WICKET-4016:
-----------------------------------------

The stack trace:

Caused by: org.apache.wicket.markup.MarkupNotFoundException: Can not determine Markup. Component is not yet connected to a parent. [WebMarkupContainer [Component id = c1]]
	at org.apache.wicket.Component.getMarkup(Component.java:731)
	at org.apache.wicket.MarkupContainer.toString(MarkupContainer.java:867)
	at org.apache.wicket.Component.<init>(Component.java:678)
	at org.apache.wicket.MarkupContainer.<init>(MarkupContainer.java:118)
	at org.apache.wicket.markup.html.WebMarkupContainer.<init>(WebMarkupContainer.java:49)
	at org.apache.wicket.markup.html.WebMarkupContainer.<init>(WebMarkupContainer.java:41)
	at com.mycompany.HomePage.<init>(HomePage.java:17)
...

> MarkupContainer.toString(true) fails with MarkupNotFoundException if the call is made in the component constructor
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4016
>                 URL: https://issues.apache.org/jira/browse/WICKET-4016
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC7
>            Reporter: Martin Grigorov
>
> org.apache.wicket.MarkupContainer.toString(boolean) uses "if (getMarkup() != null)" to decide whether to write something for the markup but since recently Component#getMarkup() throws MarkupNotFoundException when there is no markup and doesn't return null.

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