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

        Judy Guglielmin created issue -
        Hide
        Judy Guglielmin added a comment -

        test case for this Jira

        Show
        Judy Guglielmin added a comment - test case for this Jira
        Judy Guglielmin made changes -
        Field Original Value New Value
        Attachment menusc.zip [ 16623 ]
        Judy Guglielmin made changes -
        Salesforce Case Reference 5007000000XSrtKAAT
        Hide
        Judy Guglielmin added a comment -

        for targeting and assigning..

        Show
        Judy Guglielmin added a comment - for targeting and assigning..
        Judy Guglielmin made changes -
        Assignee Ken Fyten [ ken.fyten ]
        Hide
        Judy Guglielmin added a comment -

        tried this example with mojarra 2.1.25 and 2.1.26 and neither the user's test case (id's distinct for menuItems) nor mine (id's same for menuItems) work at all. Both cause same exception as 2.1.21 with User's test case. So this workaround is only good for 2.1.21 mojarra.

        Show
        Judy Guglielmin added a comment - tried this example with mojarra 2.1.25 and 2.1.26 and neither the user's test case (id's distinct for menuItems) nor mine (id's same for menuItems) work at all. Both cause same exception as 2.1.21 with User's test case. So this workaround is only good for 2.1.21 mojarra.
        Ken Fyten made changes -
        Summary ace menuItem as menuModel throws exception in ace:dataTable unless id's are all same ace:menuItem as menuModel throws exception in ace:dataTable unless id's are all same
        Hide
        Ken Fyten added a comment -

        Assign to Mircea to evaluate why the newer Mojarra JSF 2.1.26 fails but earlier 2.1.21 sort of works. Possible JSF issue?

        Show
        Ken Fyten added a comment - Assign to Mircea to evaluate why the newer Mojarra JSF 2.1.26 fails but earlier 2.1.21 sort of works. Possible JSF issue?
        Ken Fyten made changes -
        Fix Version/s EE-3.3.0.GA_P02 [ 11371 ]
        Assignee Ken Fyten [ ken.fyten ] Mircea Toma [ mircea.toma ]
        Assignee Priority P2 [ 10011 ]
        Hide
        Mircea Toma added a comment - - edited

        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 is invoked (multiple times per JSF cycle).

        Show
        Mircea Toma added a comment - - edited 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 is invoked (multiple times per JSF cycle).
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        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
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 10770 ]
        Cruz Miraback made changes -
        Comment [ Confirmed fixed using attached war file on ICEfaces4 trunk revision# 39497 and ICEfaces EE-3.3.0-maintenance revision# 39503. ]
        Hide
        Cruz Miraback added a comment - - edited

        Confirmed fixed on ICEfaces4 trunk revision# 39497 using the test app provided. Testing with PARTIAL_STATE_SAVING=true/false with Mojarra 2.1.26 and MyFaces 2.1.12.

        Show
        Cruz Miraback added a comment - - edited Confirmed fixed on ICEfaces4 trunk revision# 39497 using the test app provided. Testing with PARTIAL_STATE_SAVING=true/false with Mojarra 2.1.26 and MyFaces 2.1.12.
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: