Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6116

Exception 'A child already exists' when backing to a page with some markups in a Border

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.2.0
    • Fix Version/s: 7.3.0, 8.0.0-M1
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      MacBook Pro, OS X 10.11.3

      Description

      The problem is easy to simulate and I am sending an example.
      It occurs when you have a page with border containing an img tag.
      Just leave the page and press the back button and the exception is thrown.

      java.lang.IllegalArgumentException: A child 'TransparentWebMarkupContainer' with id 'wicket_relative_path_prefix_1' already exists:
      [BorderBodyContainer [Component id = myborder_body]]
      at org.apache.wicket.MarkupContainer.add(MarkupContainer.java:234)
      at org.apache.wicket.markup.html.border.Border.add(Border.java:227)
      at org.apache.wicket.markup.html.border.Border.add(Border.java:140)
      at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:312)
      at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1513)
      at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1759)
      at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1734)
      at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:797)
      at org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.renderAssociatedMarkup(AssociatedMarkupSourcingStrategy.java:77)
      at org.apache.wicket.markup.html.panel.BorderMarkupSourcingStrategy.onComponentTagBody(BorderMarkupSourcingStrategy.java:46)
      at org.apache.wicket.Component.internalRenderComponent(Component.java:2565)
      at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1698)
      at org.apache.wicket.Component.internalRender(Component.java:2380)
      at org.apache.wicket.Component.render(Component.java:2308)
      at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1524)
      at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1759)
      at org.apache.wicket.Page.onRender(Page.java:879)
      at org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:141)
      at org.apache.wicket.Component.internalRender(Component.java:2380)
      at org.apache.wicket.Component.render(Component.java:2308)
      at org.apache.wicket.Page.renderPage(Page.java:1018)
      at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:124)
      at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:195)
      at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
      at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895)
      at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
      at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
      at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
      at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
      at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
      at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
      at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284)

        Attachments

        1. bordersample.zip
          28 kB
          GLEDSON BEZERRA DE OLIVEIRA RABELO

          Activity

            People

            • Assignee:
              bitstorm Andrea Del Bene
              Reporter:
              gledson@gmail.com GLEDSON BEZERRA DE OLIVEIRA RABELO
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: