When I add a ChildPanel to the page, I get an error message:
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. [Form [Component id = myForm]] 2. [DropDownChoice [Component id = referenceType]] 3. [TextField [Component id = referenceNumber]] 4. [CheckBox [Component id = referenceReqChk]] 5. [ [Component id = saveRefNumButton]] 6. [ [Component id = cancelRefNumButton]] at org.apache.wicket.Page.checkRendering(Page.java:693) at org.apache.wicket.Page.onAfterRender(Page.java:849) at org.apache.wicket.markup.html.WebPage.onAfterRender(WebPage.java:213) at org.apache.wicket.Component.afterRender(Component.java:950) at org.apache.wicket.Component.render(Component.java:2298) at org.apache.wicket.Page.renderPage(Page.java:1041) at org.apache.wicket.request.handler.render. WebPageRenderer.renderPage(WebPageRenderer.java:105)
I can clearly see that the components in question are being added to the markup in my AbstractParentPanel, which my ChildPanel extends. It's strange if I make AbstractParentPanel a non-abstract class, I can add this panel without problems.
Why am I getting this error?
NOTE. I have already found the answer to this question. I am adding it to SO to help others, since I spent more time than I should have for such a simple check. If you were burned by this post and this answer helped you, think about voting this JIRA ticket
source share