Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.4.2
    • Fix Version/s: None
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      linux

      Description

      I believe there is a enclosure related bug in wicket 1.4.2, which stopped me from upgrading Same code works fine with 1.4.1
      Finally I narrowed it down to adding following to quick start (attached to problem):

      2 lines to HomePage.html
      <wicket:enclosure><br/><a wicket:id="logout"><wicket:message key="logout" /></a></wicket:enclosure>
      <wicket:enclosure><a wicket:id="login"><wicket:message key="login" /></a></wicket:enclosure>

      2 lines to HomePage.java
      add(new BookmarkablePageLink<Void>("logout", HomePage.class));
      add(new BookmarkablePageLink<Void>("login", HomePage.class));
      and HomePage.properties
      login=Login
      logout=Logout

      I get following stack trace

      WicketMessage: Could not find child with id: login in the wicket:enclosure

      Root cause:

      org.apache.wicket.WicketRuntimeException: Could not find child with id: login in the wicket:enclosure
      at org.apache.wicket.markup.html.internal.Enclosure.checkChildComponent(Enclosure.java:210)
      at org.apache.wicket.markup.html.internal.Enclosure.ensureAllChildrenPresent(Enclosure.java:249)
      at org.apache.wicket.markup.html.internal.Enclosure.onComponentTagBody(Enclosure.java:169)
      at org.apache.wicket.Component.renderComponent(Component.java:2626)
      at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
      at org.apache.wicket.Component.render(Component.java:2457)
      at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
      at org.apache.wicket.markup.resolver.EnclosureResolver.resolve(EnclosureResolver.java:61)
      at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81)
      at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418)
      at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1528)
      at org.apache.wicket.Page.onRender(Page.java:1545)
      at org.apache.wicket.Component.render(Component.java:2457)
      at org.apache.wicket.Page.renderPage(Page.java:914)
      at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:262)
      at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
      at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
      at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
      at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:468)
      at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:301)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
      at org.mortbay.jetty.Server.handle(Server.java:295)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
      at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
      at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

      1. enclosures.zip
        8 kB
        Igor Vaynberg

        Activity

        Girts Ziemelis created issue -
        Igor Vaynberg made changes -
        Field Original Value New Value
        Link This issue is a clone of WICKET-2519 [ WICKET-2519 ]
        Igor Vaynberg made changes -
        Fix Version/s 1.5-M1 [ 12313078 ]
        Fix Version/s 1.4.4 [ 12314323 ]
        Igor Vaynberg made changes -
        Attachment enclosures.zip [ 12427530 ]
        Hide
        Igor Vaynberg added a comment -

        this usecase is a little crazy. you are relying on the fact that if the parent is invisible you can have components in the parent's markup that have no java counterparts. this happens to work for normal rendering, but by no means is by design.

        if you want to continue to rely on this non-feature you can simply replace the enclosure with a webmarkupcontainer.

        Show
        Igor Vaynberg added a comment - this usecase is a little crazy. you are relying on the fact that if the parent is invisible you can have components in the parent's markup that have no java counterparts. this happens to work for normal rendering, but by no means is by design. if you want to continue to rely on this non-feature you can simply replace the enclosure with a webmarkupcontainer.
        Igor Vaynberg made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]
        Igor Vaynberg made changes -
        Reporter Girts Ziemelis [ girts.ziemelis ] Arnout Engelen [ raboof ]
        Igor Vaynberg made changes -
        Link This issue is a clone of WICKET-2519 [ WICKET-2519 ]
        Hide
        Arnout Engelen added a comment -

        As discussed on IRC, sure, it's probably wrong, but it did work for versions up to wicket 1.4.1, and could be considered a regression.

        Show
        Arnout Engelen added a comment - As discussed on IRC, sure, it's probably wrong, but it did work for versions up to wicket 1.4.1, and could be considered a regression.
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        5h 51m 1 Igor Vaynberg 10/Dec/09 04:40

          People

          • Assignee:
            Igor Vaynberg
            Reporter:
            Arnout Engelen
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development