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

Martin Grigorov edited comment on WICKET-4545 at 1/9/13 4:39 PM:
-----------------------------------------------------------------

A workaround: 
Add 

protected Fragment createFragment(String id, String markupId) {
   return new Fragment(id, markupId, transparentContainer);
}

method to the base page. It should use the TransparentWebMarkupContainer as 
markupProvider. This way all children pages will not know that there is TWMC in 
the hierarchy and Wicket will be still able to lookup the markup for the 
Fragment.
                
      was (Author: mgrigorov):
    A workaround:
add protected #addFragment(String id, String markupId) method to the base page. 
It should use the TransparentWebMarkupContainer as markupProvider. This way all 
children pages will not know that there is TWMC in the hierarchy and Wicket 
will be still able to lookup the markup for the Fragment.
                  
> MarkupNotFoundException for Fragment and TransparentWebMarkupContainer
> ----------------------------------------------------------------------
>
>                 Key: WICKET-4545
>                 URL: https://issues.apache.org/jira/browse/WICKET-4545
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.6
>            Reporter: Dirk Forchel
>         Attachments: quickstart.zip
>
>
> Create a base WebPage with a TransparentWebMarkupContainer to allow 
> subclasses register CSS classes on the body tag. Add a Fragment to one of 
> these subsclasses, the markup of the Fragment is not found. 
> See also 
> http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968.html
> Exception thrown:
> org.apache.wicket.markup.MarkupNotFoundException: No Markup found for 
> Fragment testFragment in providing markup container [Page class = 
> org.foo.HomePage, id = 0, render count = 1]
> at 
> org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:143)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to