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

        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.
        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
        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.
        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.
        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
        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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: