ICEfaces
  1. ICEfaces
  2. ICE-9753

ace:menuItem as menuModel throws exception in ace:dataTable unless id's are all same

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P01
    • Fix Version/s: 4.0.BETA, EE-3.3.0.GA_P02, 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      jsf 2 ace
    • Assignee Priority:
      P2
    • Salesforce Case Reference:

      Description

      Get exception ...will attach test case for ace components that can be built in QA checkout. THe page 12500Theirs is the original and 12500TheirsNoId.xhtml is the one that works (all menu items have same id)

      javax.faces.FacesException: Cannot add the same component twice: f:table:0:Item1_2
      at com.sun.faces.context.StateContext$AddRemoveListener.handleAddRemoveWithAutoPrune(StateContext.java:510)
      at com.sun.faces.context.StateContext$AddRemoveListener.handleAdd(StateContext.java:437)
      at com.sun.faces.context.StateContext$AddRemoveListener.processEvent(StateContext.java:359)
      at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106)
      at com.sun.faces.application.ApplicationImpl.processListenersAccountingForAdds(ApplicationImpl.java:2212)
      at com.sun.faces.application.ApplicationImpl.invokeViewListenersFor(ApplicationImpl.java:2033)
      at com.sun.faces.application.ApplicationImpl.__publishEvent(ApplicationImpl.java:292)
      at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java)
      at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247)
      at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2207)
      at javax.faces.component.UIComponentBase.doPostAddProcessing(UIComponentBase.java:1889)
      at javax.faces.component.UIComponentBase.setParent(UIComponentBase.java:406)
      at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2641)
      at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2613)
      at org.icefaces.ace.component.menu.AbstractMenu.buildMenuFromModel(AbstractMenu.java:49)
      at org.icefaces.ace.component.menu.MenuRenderer.encodeEnd(MenuRenderer.java:52)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:881)
      at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:347)
      at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:342)
      at com.icesoft.faces.component.ext.renderkit.TableRenderer.encodeChildren(TableRenderer.java:902)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
      at org.icefaces.impl.renderkit.RendererWrapper.encodeChildren(RendererWrapper.java:49)
      at org.icefaces.impl.renderkit.RendererWrapper.encodeChildren(RendererWrapper.java:49)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
      at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:148)
      at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:973)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:413)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #39492 Mon Jan 06 05:01:38 MST 2014 mircea.toma ICE-9753 Modified AbstractMenu.buildMenuFromModel method to mark the menu component and its dynamically added children as not being part of the view while recreating the menu components. This is to avoid triggering the JSF component tree regeneration every time the method (multiple times per JSF cycle).
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/menu/AbstractMenu.java

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Judy Guglielmin
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: