You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "smallufo (JIRA)" <ji...@apache.org> on 2009/02/03 18:07:59 UTC

[jira] Commented: (WICKET-1712) Inheritance inside a Container throws WicketRuntimeException

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

smallufo commented on WICKET-1712:
----------------------------------

But if I implement this "Window-like" panel by extending Border
I have no way to notify the collapse/expand events to the containing content
.

In my previous implementation , the AbstractPullDownPanel defines two
methods invisible()/visible() for successor to override , if they want to
handle the collapse / expand events.

But if I implement it in Border , and place the "expand / collapse" link to
the top of the Border .
Because the border is added to the panel , I find no way to notify the
"expand/collapse" events to its containing panel.

I don't know how to gracefully solve this problem just like the
AbstractPullDownPanel ... (define two methods for successor to override)

Does anybody know how to accomplish it ?

Thank you.

2009/2/1 Igor Vaynberg (JIRA) <ji...@apache.org>



> Inheritance inside a Container throws WicketRuntimeException
> ------------------------------------------------------------
>
>                 Key: WICKET-1712
>                 URL: https://issues.apache.org/jira/browse/WICKET-1712
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3, 1.3.4
>         Environment: Linux , resin-3.0.24 , Wicket 1.3.3
>            Reporter: smallufo
>            Assignee: Igor Vaynberg
>         Attachments: AbstractPullDownPanel.html, AbstractPullDownPanel.java, RadioGroupPanel.html, RadioGroupPanel.java, TestPage.html, TestPage.java, TestSession.java
>
>
> This is related to WICKET-1095 , associating discussions can be found here :
> http://www.nabble.com/Inheritance-inside-a-Container-ts16514647.html
> To summarize :
> I want to make a "Widget"  , AbstractPullDownPanel , that I can "collapse / expand" it.
> Any panel extends AbstractPullDownPanel  will have a title bar , with ajax-enabled collapse / expand link in the upper right of the panel.
> When the panel is collapsed , it will leave a title bar there.
> The state of the panel (open / closed) is stored in WebSession
> Now , I have a RadioGroupPanel extends AbstractPullDownPanel .
> If it only contains an empty RadioGroup :
> RadioGroup selectDeselectGroup = new RadioGroup("selectDeselectGroup");
> Everything works fine , no matter the panel is collapsed or expanded , page reloading is ok....
> But if I add Radio(s) inside the RadioGroup , only when the panel is expanded , page-reloading is ok.
> If the panel is collapsed , page reloading will throw WicketRuntimeException :
> 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 = selectDeselectGroup, page = destiny.wicket.test.TestPage, path = 1:radioGroupPanel:selectDeselectGroup.RadioGroup, isVisible = true, isVersioned = false]]
> 2. [MarkupContainer [Component id = selectAll, page = destiny.wicket.test.TestPage, path = 1:radioGroupPanel:selectDeselectGroup:selectAll.Radio, isVisible = true, isVersioned = false]]
> 3. [MarkupContainer [Component id = deselectAll, page = destiny.wicket.test.TestPage, path = 1:radioGroupPanel:selectDeselectGroup:deselectAll.Radio, isVisible = true, isVersioned = false]]
> 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 = selectDeselectGroup, page = destiny.wicket.test.TestPage, path = 1:radioGroupPanel:selectDeselectGroup.RadioGroup, isVisible = true, isVersioned = false]]
> 2. [MarkupContainer [Component id = selectAll, page = destiny.wicket.test.TestPage, path = 1:radioGroupPanel:selectDeselectGroup:selectAll.Radio, isVisible = true, isVersioned = false]]
> 3. [MarkupContainer [Component id = deselectAll, page = destiny.wicket.test.TestPage, path = 1:radioGroupPanel:selectDeselectGroup:deselectAll.Radio, isVisible = true, isVersioned = false]]
> at org.apache.wicket.Page.checkRendering(Page.java:1116)
> at org.apache.wicket.Page.renderPage(Page.java:914)
> at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
> at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
> at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)
> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243)
> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331)
> at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
> at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:363)
> at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
> at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106)
> at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
> at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
> at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:420)
> at com.caucho.server.port.TcpConnection.run(TcpConnection.java:514)
> at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
> at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
> at java.lang.Thread.run(Thread.java:619)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.