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

Martin Grigorov commented on WICKET-3590:
-----------------------------------------

The javadoc says that it wont throw exception if a markup cannot be find for 
this container. But actually there is no *page* and thus there is a different 
problem.

> llegalStateException not caught by 
> MarkupContainer.getAssociatedMarkupStream(false)
> -----------------------------------------------------------------------------------
>
>                 Key: WICKET-3590
>                 URL: https://issues.apache.org/jira/browse/WICKET-3590
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.4.16, 1.4.17
>            Reporter: Manos Batsis
>
> The documentation for MarkupContainer..getAssociatedMarkupStream(boolean 
> throwException) says for the param: "If true, throw an exception, if markup 
> could not be found". Contrast to my interpretation of the javadocs, an 
> IllegalStateException is not caught (or wrapped properly to be caught) in my 
> case.
> In my example BasePanel line 188 reads:
> MarkupStream ms = getAssociatedMarkupStream(false);
> BasePanel does not override the method and MarkupContainer's implementation 
> is used. Here's the stacktrace:
> Caused by: java.lang.IllegalStateException: No Page found for component 
> [MarkupContainer [Component id = header]]
>         at org.apache.wicket.Component.getPage(Component.java:1823)
>         at 
> org.apache.wicket.markup.html.WebMarkupContainer.getMarkupType(WebMarkupContainer.java:60)
>         at 
> org.apache.wicket.markup.DefaultMarkupCacheKeyProvider.getCacheKey(DefaultMarkupCacheKeyProvider.java:57)
>         at 
> org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:291)
>         at 
> org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:216)
>         at 
> org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:351)
>         at gr.abiss.calipso.wicket.BasePanel.<init>(BasePanel.java:188)
>         at gr.abiss.calipso.wicket.BasePanel.<init>(BasePanel.java:176)
>         at gr.abiss.calipso.wicket.HeaderPanel.<init>(HeaderPanel.java:72)
>         at 
> gr.abiss.calipso.wicket.CalipsoBasePage.<init>(CalipsoBasePage.java:51)
>         at gr.abiss.calipso.wicket.LoginPage.<init>(LoginPage.java:88)
>         ... 35 more

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

Reply via email to