ICEfaces
  1. ICEfaces
  2. ICE-3383

ice:menuPopup: allow to position the ice:menuPopup component anywhere on page

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Invalid
    • Affects Version/s: 1.7.1
    • Fix Version/s: 1.7.1
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      any

      Description

      Currently the menuPopup component has to be placed to its closest parent component. Placing it somewhere else on the page causes the following exception:

      SystemError java.lang.IllegalArgumentException: Could not find the MenuPopup

      In some cases it might be useful to place the component somewhere else on the page or even to separate it on a template page. The component should still be referenced via its id attribute.

        Activity

        Michael Thiem created issue -
        Michael Thiem made changes -
        Field Original Value New Value
        Support Case References https://www.icesoft.ca:4443/supportilla/show_bug.cgi?id=5084
        Michael Thiem made changes -
        Priority Major [ 3 ] Minor [ 4 ]
        Michael Thiem made changes -
        Issue Type Improvement [ 4 ] Bug [ 1 ]
        Michael Thiem made changes -
        Description Currently the menuPopup component has to be placed to its closest parent component. Placing it somewhere else on the page causes the following exception:

        SystemError java.lang.IllegalArgumentException: Could not find the MenuPopup

        In some cases it might be useful to place the component somewhere else on the page or even to separate it and put it on another jspx page. The component should still be referenced via its id attribute.
        Currently the menuPopup component has to be placed to its closest parent component. Placing it somewhere else on the page causes the following exception:

        SystemError java.lang.IllegalArgumentException: Could not find the MenuPopup

        In some cases it might be useful to place the component somewhere else on the page or even to separate it on a template page. The component should still be referenced via its id attribute.
        Hide
        Michael Thiem added a comment -

        placing the menuPopup somewhere else on the page causes the following exception (see attached test case):

        java.lang.IllegalArgumentException: Could not find the MenuPopup UIComponent referenced by attribute menuPopup="popupLayer" in UIComponent of type: com.icesoft.faces.component.ext.HtmlPanelGroup with id: "_id17"
        at com.icesoft.faces.component.menupopup.MenuPopupHelper.findMenuPopup(MenuPopupHelper.java:77)
        at com.icesoft.faces.component.menupopup.MenuPopupHelper.renderMenuPopupHandler(MenuPopupHelper.java:20)
        at com.icesoft.faces.component.ext.renderkit.GroupRenderer.encodeBegin(GroupRenderer.java:148)
        at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:675)
        at com.icesoft.faces.component.util.CustomComponentUtils.renderChild(CustomComponentUtils.java:337)
        at com.icesoft.faces.component.tree.TreeNodeRenderer.encodeEnd(TreeNodeRenderer.java:76)
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:712)
        at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:362)
        at com.icesoft.faces.component.tree.TreeRenderer.encodeNode(TreeRenderer.java:574)
        at com.icesoft.faces.component.tree.TreeRenderer.encodeParentAndChildNodes(TreeRenderer.java:276)
        at com.icesoft.faces.component.tree.TreeRenderer.encodeChildren(TreeRenderer.java:229)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
        at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:352)
        at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:92)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:550)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
        at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
        at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:161)
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
        at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18)
        at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCyclePartial(ReceiveSendUpdates.java:64)
        at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:40)
        at com.icesoft.faces.webapp.http.core.ViewBoundServer.service(ViewBoundServer.java:65)
        at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:44)
        at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
        at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
        at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
        at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
        at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:139)
        at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
        at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
        at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
        at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:82)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:46)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:619)

        Show
        Michael Thiem added a comment - placing the menuPopup somewhere else on the page causes the following exception (see attached test case): java.lang.IllegalArgumentException: Could not find the MenuPopup UIComponent referenced by attribute menuPopup="popupLayer" in UIComponent of type: com.icesoft.faces.component.ext.HtmlPanelGroup with id: "_id17" at com.icesoft.faces.component.menupopup.MenuPopupHelper.findMenuPopup(MenuPopupHelper.java:77) at com.icesoft.faces.component.menupopup.MenuPopupHelper.renderMenuPopupHandler(MenuPopupHelper.java:20) at com.icesoft.faces.component.ext.renderkit.GroupRenderer.encodeBegin(GroupRenderer.java:148) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:675) at com.icesoft.faces.component.util.CustomComponentUtils.renderChild(CustomComponentUtils.java:337) at com.icesoft.faces.component.tree.TreeNodeRenderer.encodeEnd(TreeNodeRenderer.java:76) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:712) at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:362) at com.icesoft.faces.component.tree.TreeRenderer.encodeNode(TreeRenderer.java:574) at com.icesoft.faces.component.tree.TreeRenderer.encodeParentAndChildNodes(TreeRenderer.java:276) at com.icesoft.faces.component.tree.TreeRenderer.encodeChildren(TreeRenderer.java:229) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693) at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:352) at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:92) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:550) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554) at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282) at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:161) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117) at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18) at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCyclePartial(ReceiveSendUpdates.java:64) at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:40) at com.icesoft.faces.webapp.http.core.ViewBoundServer.service(ViewBoundServer.java:65) at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:44) at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50) at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19) at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19) at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63) at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:139) at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53) at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52) at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29) at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:82) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:619)
        Hide
        Michael Thiem added a comment -

        test case demonstrating the issue

        Show
        Michael Thiem added a comment - test case demonstrating the issue
        Michael Thiem made changes -
        Attachment Test_MenuPopup.war [ 11184 ]
        Ken Fyten made changes -
        Assignee Priority P2
        Assignee Mark Collette [ mark.collette ]
        Hide
        Mark Collette added a comment -

        All you have to do is add the appropriate number of colons before the menuPopup's id. In this case, I believe it would be 4.

        ...
        <ice:panelGroup style="display: inline" menuPopup="::::popupLayer">
        ...
        <ice:menuPopup id="popupLayer">
        ...

        Show
        Mark Collette added a comment - All you have to do is add the appropriate number of colons before the menuPopup's id. In this case, I believe it would be 4. ... <ice:panelGroup style="display: inline" menuPopup="::::popupLayer"> ... <ice:menuPopup id="popupLayer"> ...
        Mark Collette made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.7.1 [ 10122 ]
        Resolution Invalid [ 6 ]
        Hide
        Mark Collette added a comment -

        For example, I made a change to the component showcase to mimic the attached WAR. Using Firebug, I found the panelGroup's rendered DIV's id, and the menuPopup's rendered DIV's id, which are, respectively:
        iceform:tree:n-2-0:j_id197
        iceform:mrkmnu

        So, we start with two colons, because that's the special escape sequence to tell findComponent to search upwards. If the menuPopup had been a peer of the panelGroup, then its DIV's id would have been "iceform:tree:n-2-0:mrkmnu". But since I located it just inside the form, it's two levels up. So that's two more colons, for a total of four.

        Show
        Mark Collette added a comment - For example, I made a change to the component showcase to mimic the attached WAR. Using Firebug, I found the panelGroup's rendered DIV's id, and the menuPopup's rendered DIV's id, which are, respectively: iceform:tree:n-2-0:j_id197 iceform:mrkmnu So, we start with two colons, because that's the special escape sequence to tell findComponent to search upwards. If the menuPopup had been a peer of the panelGroup, then its DIV's id would have been "iceform:tree:n-2-0:mrkmnu". But since I located it just inside the form, it's two levels up. So that's two more colons, for a total of four.
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P2
        Assignee Mark Collette [ mark.collette ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Michael Thiem
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: