Hello,

I've just come across wicket and started playing around - so far, I encounterd 
some issues:
My first issue is:

Given a table and a Panel:
//SomePage.java
private TablePanel tp;
tp = new TablePanel("tablePanel",columns,new 
PersonBeanProvider(searchFilter),12);

//TablePanel.java
class TablePanel extends Panel{
public TablePanel(String id, final List<IColumn<PersonBean>> columns, 
PersonBeanProvider personBeanProvider, int rowsPerPage) {
        super(id);
         AjaxFallbackDefaultDataTable<PersonBean> table = new 
AjaxFallbackDefaultDataTable<PersonBean>("table", columns,personBeanProvider, 
12);
         add(table);
        }

    }

And the html:
SomePage.html
(...)<span wicket:id="tablePanel"></span>
TablePanel.html:
<wicket:panel>
        <table cellspacing="0" wicket:id="table">[table]</table>
</wicket:panel>

Everything is fine. But: If I introduce a form for modifying "searchFilter" (a 
String to be passed) in this way:
        
searchField.add(new AjaxFormComponentUpdatingBehavior("onChange"){
                        @Override
                        protected void onUpdate(AjaxRequestTarget target) {
                tp = new TablePanel("tablePanel",columns,new 
PersonBeanProvider(searchFilter),12);
                tp.setOutputMarkupId(true);
                target.addComponent(tp);
                        }
                 
         });

I get an error _after_ submitting the form - what may be wrong here? 

Thanks,
Keep smiling
yanosz

WicketMessage: The component(s) below failed to render. A common problem is 
that you have added a component in code but forgot to reference it in the 
markup (thus the component will never be rendered).

1. [MarkupContainer [Component id = tablePanel]]
2. [MarkupContainer [Component id = table]]
3. [MarkupContainer [Component id = body]]
4. [MarkupContainer [Component id = rows]]
5. [MarkupContainer [Component id = 1]]
6. [MarkupContainer [Component id = cells]]
7. [MarkupContainer [Component id = 1]]
8. [MarkupContainer [Component id = cell]]
9. [MarkupContainer [Component id = select]]
10. [MarkupContainer [Component id = 2]]
11. [Component id = cell]
12. [MarkupContainer [Component id = 3]]
13. [Component id = cell]
14. [MarkupContainer [Component id = 4]]
15. [Component id = cell]
16. [MarkupContainer [Component id = topToolbars]]
17. [MarkupContainer [Component id = 1]]
18. [MarkupContainer [Component id = 2]]
19. [MarkupContainer [Component id = toolbar]]
20. [MarkupContainer [Component id = headers]]
21. [MarkupContainer [Component id = 1]]
22. [MarkupContainer [Component id = header]]
23. [Component id = label]
24. [MarkupContainer [Component id = 2]]
25. [MarkupContainer [Component id = header]]
26. [MarkupContainer [Component id = orderByLink]]
27. [MarkupContainer [Component id = _body]]
28. [Component id = label]
29. [MarkupContainer [Component id = 3]]
30. [MarkupContainer [Component id = header]]
31. [MarkupContainer [Component id = orderByLink]]
32. [MarkupContainer [Component id = _body]]
33. [Component id = label]
34. [MarkupContainer [Component id = 4]]
35. [MarkupContainer [Component id = header]]
36. [MarkupContainer [Component id = orderByLink]]
37. [MarkupContainer [Component id = _body]]
38. [Component id = label]
39. [MarkupContainer [Component id = bottomToolbars]]
40. [MarkupContainer [Component id = 1]]

Root cause:

org.apache.wicket.WicketRuntimeException: The component(s) below failed to 
render. A common problem is that you have added a component in code but forgot 
to reference it in the markup (thus the component will never be rendered).

1. [MarkupContainer [Component id = tablePanel]]
2. [MarkupContainer [Component id = table]]
3. [MarkupContainer [Component id = body]]
4. [MarkupContainer [Component id = rows]]
5. [MarkupContainer [Component id = 1]]
6. [MarkupContainer [Component id = cells]]
7. [MarkupContainer [Component id = 1]]
8. [MarkupContainer [Component id = cell]]
9. [MarkupContainer [Component id = select]]
10. [MarkupContainer [Component id = 2]]
11. [Component id = cell]
12. [MarkupContainer [Component id = 3]]
13. [Component id = cell]
14. [MarkupContainer [Component id = 4]]
15. [Component id = cell]
16. [MarkupContainer [Component id = topToolbars]]
17. [MarkupContainer [Component id = 1]]
18. [MarkupContainer [Component id = 2]]
19. [MarkupContainer [Component id = toolbar]]
20. [MarkupContainer [Component id = headers]]
21. [MarkupContainer [Component id = 1]]
22. [MarkupContainer [Component id = header]]
23. [Component id = label]
24. [MarkupContainer [Component id = 2]]
25. [MarkupContainer [Component id = header]]
26. [MarkupContainer [Component id = orderByLink]]
27. [MarkupContainer [Component id = _body]]
28. [Component id = label]
29. [MarkupContainer [Component id = 3]]
30. [MarkupContainer [Component id = header]]
31. [MarkupContainer [Component id = orderByLink]]
32. [MarkupContainer [Component id = _body]]
33. [Component id = label]
34. [MarkupContainer [Component id = 4]]
35. [MarkupContainer [Component id = header]]
36. [MarkupContainer [Component id = orderByLink]]
37. [MarkupContainer [Component id = _body]]
38. [Component id = label]
39. [MarkupContainer [Component id = bottomToolbars]]
40. [MarkupContainer [Component id = 1]]

at org.apache.wicket.Page.checkRendering(Page.java:1181)
at org.apache.wicket.Page.renderPage(Page.java:921)
at 
org.apache.wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:186)
at 
org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:58)
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:1436)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:317)
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:291)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:841)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:639)
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)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to