[ 
https://issues.apache.org/jira/browse/WICKET-592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Singer updated WICKET-592:
---------------------------------

    Attachment: src.zip

Please try the attached project with Wicket 1.2.6. I'm getting following 
exception:

wicket.markup.MarkupException: Markup does not contain a fragment with 
id=fragmentDeclaration; Component: [MarkupContainer [Component id = 
fragmentUsage, page = pages.Home, path = 0:border:fragmentUsage.Fragment, 
isVisible = true, isVersioned = true]]
     at wicket.markup.html.panel.Fragment.renderFragment(Fragment.java:241)
     at wicket.markup.html.panel.Fragment.onComponentTagBody(Fragment.java:200)
     at wicket.Component.renderComponent(Component.java:1712)
     at wicket.MarkupContainer.onRender(MarkupContainer.java:927)
     at wicket.Component.render(Component.java:1526)
     at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334)
     at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982)
     at wicket.markup.html.border.Border.renderBodyComponent(Border.java:300)
     at wicket.markup.html.border.Border.resolve(Border.java:215)
     at wicket.MarkupContainer.renderNext(MarkupContainer.java:1345)
     at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982)
     at wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:571)
     at wicket.markup.html.border.Border.onComponentTagBody(Border.java:244)
     at wicket.Component.renderComponent(Component.java:1712)
     at wicket.MarkupContainer.onRender(MarkupContainer.java:927)
     at wicket.Component.render(Component.java:1526)
     at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334)
     at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982)
     at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917)
     at wicket.Component.renderComponent(Component.java:1712)
     at wicket.MarkupContainer.onRender(MarkupContainer.java:927)
     at wicket.Component.render(Component.java:1526)
     at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334)
     at wicket.MarkupContainer.renderAll(MarkupContainer.java:944)
     at wicket.Page.onRender(Page.java:860)
     at wicket.Component.render(Component.java:1526)
     at wicket.Page.renderPage(Page.java:408)
     at 
wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:226)
     at 
wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:49)
     at 
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66)
     at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:902)
     at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:929)
     at wicket.RequestCycle.step(RequestCycle.java:1010)
     at wicket.RequestCycle.steps(RequestCycle.java:1084)
     at wicket.RequestCycle.request(RequestCycle.java:454)
     at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
     at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
     at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
     at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
     at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
     at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
     at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
     at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
     at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
     at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
     at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
     at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
     at java.lang.Thread.run(Thread.java:595)

> A fragment will not be found when it is nested, e.g., in a border
> -----------------------------------------------------------------
>
>                 Key: WICKET-592
>                 URL: https://issues.apache.org/jira/browse/WICKET-592
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.2.6
>            Reporter: Thomas Singer
>            Assignee: Juergen Donnerstag
>             Fix For: 1.3.0-rc1
>
>         Attachments: src.zip
>
>
> sketched markup:
>  <div wicket:id="myBorder">
>    ...
>    <wicket:fragment wicket:id="fragmentSource">...</wicket:fragment>
>    ...
>    <tr wicket:id="fragmentTarget">...</tr>
>  </div>
> Following components were added to the page:
>   MyBorder border = new MyBorder("myBorder");
>   border.add(new Fragment("fragmentTarget", "fragmentSource"));
>   this.add(border);
> It always cannot find the "fragmentSource". After debugging the Fragment's 
> renderFragment() method, I guess it is caused by the method call 
> providerMarkupStream.findComponentIndex(null, markupId), because the 
> componentMap in Markup contains no "fragmentSource", but only 
> "myBorder:fragmentSource".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to