ICEfaces
  1. ICEfaces
  2. ICE-3885

Duplicate ids are found when state saving is enabled

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8DR#1
    • Fix Version/s: 1.8DR#2, 1.8
    • Component/s: Framework, ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      When state saving is enabled, the JSF reference implementation enforces strict checks for duplicate ids because it would be unable to properly store the state of the component tree otherwise. For reference on the failing behaviour, see ICE-1464 and the associated regression test. I'm unsure of the risk this might pose to existing applications as we have not had duplicate id issues in the past but they may have been there and only start to manifest when the new, stricter checking is enabled.

      Additionally, I've seen the problem manifest in the Component Showcase (Facelets Enhanced version). These are more likely to be page errors but they manifest in the same way and only show up when state saving (with the stricter checking) is enabled. I made manual changes to get by the errors:

      Index: facelets-enh/web/WEB-INF/includes/content/description.jspx
      ===================================================================
      --- facelets-enh/web/WEB-INF/includes/content/description.jspx (revision 18042)
      +++ facelets-enh/web/WEB-INF/includes/content/description.jspx (working copy)
      @@ -77,8 +77,7 @@
                           <f:facet name="header">TLD</f:facet>
                           <c:forEach var="tldResource"
                                      items="#{currentTldResource}">
      - <ice:commandLink id="tldCmdLnk"
      - actionListener="#{applicationController.viewIncludeEvent}"
      + <ice:commandLink actionListener="#{applicationController.viewIncludeEvent}"
                                       value="#{tldResource.label}"
                                       styleClass="docViewNodeSelected#{tldResource.resourceRef.path eq applicationModel.selectedTabState.descriptionContent}">
                                   <f:param name="includePath"
      @@ -90,7 +89,7 @@
               </ui:define>
               <ui:define name="docView">
                   <!-- writes out source code servlet reader-->
      - <h:outputText id="srcFrame" style="display:block;overflow:hidden;width:100%;height:100%"
      + <h:outputText id="descFrame" style="display:block;overflow:hidden;width:100%;height:100%"
                           value="#{applicationController.currentDocumentSource}"
                           escape="false"/>
               </ui:define>

      However, we should ensure that these errors are indeed problems with the page rather than ICEfaces.

        Activity

        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Mark Collette [ mark.collette ]
        Ken Fyten made changes -
        Fix Version/s 1.8 [ 10161 ]
        Assignee Priority P1
        Hide
        Mark Collette added a comment -

        I accidentally committed something along with the fix, intended for debugging, which broke compilation for others. This should fix that.

        Subversion 18086
        icefaces\component\src\com\icesoft\faces\component\datapaginator\DataPaginatorRenderer.java

        Show
        Mark Collette added a comment - I accidentally committed something along with the fix, intended for debugging, which broke compilation for others. This should fix that. Subversion 18086 icefaces\component\src\com\icesoft\faces\component\datapaginator\DataPaginatorRenderer.java
        Mark Collette made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Mark Collette added a comment -

        There was an issue with the dataPaginator, where it was dynamically adding components, so that there would be duplicates over time. That's what was causing the duplicate id issue.

        Subversion 18085
        icefaces\component\src\com\icesoft\faces\component\datapaginator\DataPaginatorRenderer.java

        Show
        Mark Collette added a comment - There was an issue with the dataPaginator, where it was dynamically adding components, so that there would be duplicates over time. That's what was causing the duplicate id issue. Subversion 18085 icefaces\component\src\com\icesoft\faces\component\datapaginator\DataPaginatorRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #18086 Thu Dec 18 14:02:25 MST 2008 mark.collette ICE-3885 : Duplicate ids are found when state saving is enabled
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/datapaginator/DataPaginatorRenderer.java
        Hide
        Mark Collette added a comment -

        I had tested with component-showcase. Now I will test with the ICE-1464 regression test app.

        Show
        Mark Collette added a comment - I had tested with component-showcase. Now I will test with the ICE-1464 regression test app.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #18085 Thu Dec 18 13:30:52 MST 2008 mark.collette ICE-3885 : Duplicate ids are found when state saving is enabled
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/datapaginator/DataPaginatorRenderer.java
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Ken Fyten added a comment -

        Regression test for ICE-1464 is still failing with state-saving on.

        Show
        Ken Fyten added a comment - Regression test for ICE-1464 is still failing with state-saving on.
        Mark Collette made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Mark Collette added a comment -

        I applied the suggested changes, and the app started working. Examination of the necessary changes indicates app error, and not an ICEfaces bug.

        Subversion 18071
        icefaces\samples\component-showcase\facelets-enh\web\WEB-INF\includes\content\description.jspx

        Show
        Mark Collette added a comment - I applied the suggested changes, and the app started working. Examination of the necessary changes indicates app error, and not an ICEfaces bug. Subversion 18071 icefaces\samples\component-showcase\facelets-enh\web\WEB-INF\includes\content\description.jspx
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #18071 Tue Dec 16 13:37:54 MST 2008 mark.collette ICE-3885 : Duplicate ids are found when state saving is enabled
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/facelets-enh/web/WEB-INF/includes/content/description.jspx
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P1
        Assignee Ken Fyten [ ken.fyten ] Mark Collette [ mark.collette ]
        Hide
        Ken Fyten added a comment -

        Need to see if these are simple app. errors causing duplicate IDs.

        Show
        Ken Fyten added a comment - Need to see if these are simple app. errors causing duplicate IDs.
        Deryk Sinotte made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 1.8DR#2 [ 10142 ]
        Assignee Ken Fyten [ ken.fyten ]
        Deryk Sinotte created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: