ICEfaces
  1. ICEfaces
  2. ICE-2361

Dynamically created menu bar and menu items don't get action listener events.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7DR#2
    • Fix Version/s: 2.0.1, EE-1.8.2.GA_P03
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Facelets, JDK 1.5, tomcat 5.5
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial
    • Workaround Exists:
      Yes
    • Workaround Description:
      Basically, always use explicit ids with the MenuItem components you create with for ice:menuItems, and create them in your bean constructor, so that each call to the bean getter method will return the same components.

      Description

      MenuItems component renders as expected but it is not possible to use the action listener and likely the action attributes. The following stack trace occurs:

      SEVERE: Missing Form - the UIComponent of type [class com.icesoft.faces.component.menubar.MenuItem] requires a containing form.
      java.lang.NullPointerException: Missing Form - the UIComponent of type [class com.icesoft.faces.component.menubar.MenuItem] requires a containing form.
      at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.validateParameters(DomBasicRenderer.java:517)
      at com.icesoft.faces.component.menubar.MenuItemRenderer.decode(MenuItemRenderer.java:79)
      at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:685)
      at com.icesoft.faces.component.menubar.MenuItemBase.processDecodes(MenuItemBase.java:71)
      at com.icesoft.faces.component.menubar.MenuItemBase.decodeRecursive(MenuItemBase.java:88)
      at com.icesoft.faces.component.menubar.MenuItemBase.processDecodes(MenuItemBase.java:69)
      at com.icesoft.faces.component.menubar.MenuBar.decodeRecursive(MenuBar.java:269)
      at com.icesoft.faces.component.menubar.MenuBar.processDecodes(MenuBar.java:253)
      at javax.faces.component.UIForm.processDecodes(UIForm.java:164)
      at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:900)
      at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:900)
      at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:900)
      at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:326)
      at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:99)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
      at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:57)
      at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:45)
      at com.icesoft.faces.webapp.http.core.IDVerifier.service(IDVerifier.java:25)
      at com.icesoft.faces.webapp.http.core.ViewBoundServer.service(ViewBoundServer.java:52)
      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:29)
      at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:117)
      at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
      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:76)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)
      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:613)

        Issue Links

          Activity

            People

            • Assignee:
              yip.ng
              Reporter:
              Patrick Corless
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: