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

Michael O'Cleirigh commented on WICKET-3426:
--------------------------------------------

I did some more digging and have found the true cause of the phonebook bug.  
The wicket-extensions FilterForm now internally creates the focus tracking 
components instead of users having to do so in wicket 1.4.

The patch I offered looks exactly like how the FilterToolbar is implemented in 
wicket 1.4-SNAPSHOT.  I assume that FilterToolbar was changed due to 
refactoring so the full fix may have to take that into account.

This is the stack trace that is seen when running the phonebook example with 
the current 1.5-SNAPSHOT (without my patch applied):

org.apache.wicket.markup.MarkupException: Unable to find component with id 
'filter' in [WebMarkupContainer [Component id = 1]]. This means that you 
declared wicket:id=filter in your markup, but that you either did not add the 
component to your page at all, or that the hierarchy does not match.
[markup = 
file:/home/mike/git/wicket/wicket-extensions/target/classes/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.html
<span wicket:id="filters">
                        <td wicket:id="filter" class="filter-td">[filter]</td>
                </span>, index = 2, current =  '<td wicket:id="filter" 
class="filter-td">' (line 42, column 4)]
        at 
org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:536)
        at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1437)
        at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1537)
        at 
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1512)
        at 
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1466)
        at 
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:69)
        at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2502)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1475)
        at org.apache.wicket.Component.internalRender(Component.java:2366)
        at org.apache.wicket.Component.render(Component.java:2294)
        at 
org.apache.wicket.markup.repeater.AbstractRepeater.renderChild(AbstractRepeater.java:110)
        at 
org.apache.wicket.markup.repeater.AbstractRepeater.onRender(AbstractRepeater.java:97)
        at org.apache.wicket.Component.internalRender(Component.java:2366)
        at org.apache.wicket.Component.render(Component.java:2294)
        at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
        at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1537)
        at 
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1512)
        at 
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:695)
        at 
org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy.onComponentTagBody(PanelMarkupSourcingStrategy.java:60)
        at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2502)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1475)
        at org.apache.wicket.Component.internalRender(Component.java:2366)
        at org.apache.wicket.Component.render(Component.java:2294)
        at 
org.apache.wicket.markup.repeater.AbstractRepeater.renderChild(AbstractRepeater.java:110)
        at 
org.apache.wicket.markup.repeater.AbstractRepeater.onRender(AbstractRepeater.java:97)
        at org.apache.wicket.Component.internalRender(Component.java:2366)
        at org.apache.wicket.Component.render(Component.java:2294)
        at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
        at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1537)
        at 
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1512)
        at 
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:695)
        at 
org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy.onComponentTagBody(PanelMarkupSourcingStrategy.java:60)
        at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2502)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1475)
        at org.apache.wicket.Component.internalRender(Component.java:2366)
        at org.apache.wicket.Component.render(Component.java:2294)
        at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
        at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1537)
        at 
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1512)
        at 
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1466)
        at 
org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:1546)
        at 
org.apache.wicket.extensions.markup.html.repeater.data.table.filter.FilterForm.onComponentTagBody(FilterForm.java:68)
        at 
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:69)
        at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2502)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1475)
        at org.apache.wicket.Component.internalRender(Component.java:2366)
        at org.apache.wicket.Component.render(Component.java:2294)
        at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
        at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1537)
        at 
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1512)
        at 
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1466)
        at 
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:69)
        at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2502)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1475)
        at org.apache.wicket.Component.internalRender(Component.java:2366)
        at org.apache.wicket.Component.render(Component.java:2294)
        at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
        at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1537)
        at 
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1512)
        at 
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1466)
        at 
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:69)
        at 
org.apache.wicket.Component.internalRenderComponent(Component.java:2502)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1475)
        at org.apache.wicket.Component.internalRender(Component.java:2366)
        at org.apache.wicket.Component.render(Component.java:2294)
        at 
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
        at 
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1537)
        at org.apache.wicket.Page.onRender(Page.java:1054)
        at org.apache.wicket.Component.internalRender(Component.java:2366)
        at org.apache.wicket.Component.render(Component.java:2294)
        at org.apache.wicket.Page.renderPage(Page.java:1203)
        at 
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:145)
        at 
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:253)
        at 
org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:139)
        at 
org.apache.wicket.request.RequestHandlerStack.executeRequestHandler(RequestHandlerStack.java:84)
        at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:205)
        at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:247)
        at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:138)
        at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at 
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
        at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
        at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
        at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
        at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)


> FilterToolbar is broken in 1.5-SNAPSHOT
> ---------------------------------------
>
>                 Key: WICKET-3426
>                 URL: https://issues.apache.org/jira/browse/WICKET-3426
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>            Reporter: Michael O'Cleirigh
>
> A user reported an issue on wicketstuff-core phonebook.  As part of solving 
> that issue I found a bug in FilterToolbar in wicket-extensions that throws a 
> markup not found exception on rendering the component.
> This is because the FilterToolbar was using getId() but its id is now handled 
> differently.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to