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

[jira] [Comment Edited] (WICKET-4654) FragmentMarkupSourcingStrategy doesn't see fragment markup which is declared in subclassed panel.

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

Anton edited comment on WICKET-4654 at 7/12/12 5:05 PM:
--------------------------------------------------------

One more condition: <wicket:child> must be inside wicket component (see below). 

The final markup of subpanel looks like this:
   <-- base panel -->
   <wicket:panel>
       <div wicket:id="container">
            <-- subpanel -->
            <wicket:extend>
                <wicket:fragment wicket:id="fragment">fragment inside subpanel</wicket:fragment>
            </wicket:extend>
       </div>
   </wicket:panel>

MarkupFragment.find("fragment") returns null because it skips "container" tag contents (a place where fragment is situated).
                
      was (Author: apechinsky):
    One more condition: <wicket:child> must be inside wicket component (see below). 

The final markup of subpanel looks like this:
{noformat}
   <-- base panel -->
   <wicket:panel>
       <div wicket:id="container">
            <-- subpanel -->
            <wicket:extend>
                <wicket:fragment wicket:id="fragment">fragment inside subpanel</wicket:fragment>
            </wicket:extend>
       </div>
   </wicket:panel>
{noformat}

MarkupFragment.find("fragment") returns null because it skips "container" tag contents (a place where fragment is situated).
                  
> FragmentMarkupSourcingStrategy doesn't see fragment markup which is declared in subclassed panel.
> -------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4654
>                 URL: https://issues.apache.org/jira/browse/WICKET-4654
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.7
>         Environment: Ubuntu 12.04 x64
> JDK 1.6.0_30
>            Reporter: Anton
>         Attachments: FragmentInInheritedPanel.zip
>
>
> Steps to reproduce:
> - Create class ParentPanel extending Panel
> - Create class ChildPanel extending ParentPanel
> - Create fragment in ChildPanel
> - launch app
> Result:
> MarkupNotFoundException: No Markup found for Fragment fragmentDef in providing markup container 
> Sample app attached.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira