ICEfaces
  1. ICEfaces
  2. ICE-11268

ace:colorEntry dynamic example causes duplicate update to client/browser

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.2
    • Fix Version/s: EE-4.2.0.GA
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ace tabSet
    • Assignee Priority:
      P2

      Description

      When using the dynamic swatches example in showcase (there are three examples for ace:colorEntry-> Swatches each in a tabPane, the dynamic example is in the third or last tabPane):-
      choose up to 4 colors and click on CreateSwatch button.
      a new colorEntry component appears with the Swatch created from the up to 4 input colorEntry components previously.
      Choose a color and it shows the selected color as it should.
      Click on "Reset" button and perform the same steps again (choose different or more or less colors but make sure the color is different than the last one chosen or the value change will not fire!)>
      Create new swatch
      Now choose a color from the new swatch created and a response containing the update returns from the server and not only is the ace:colorEntry component updated, but a duplicate is created too.

      I'll attach an screenshot, but tried, ace:tabPane cache="none" as well as various attributes on the ace:tabSet. Tried tabSetProxy with forms within the tabSet, ace:ajax with various execute and render values. Replaced c:forEach with individual components.....
      still get the update duplicated into the client.

      After commenting out the ace:tabSet and ace:tabPanes, I was able to reproduce the same issue. After reload of the page, the duplicate disappears.... leading me to wonder if the original markup should be destroyed before a re-render can occur in some cases by the javascript(?)

        Activity

        Judy Guglielmin created issue -
        Judy Guglielmin made changes -
        Field Original Value New Value
        Summary ace:colorEntry dynamic example in ace:tabSet causes duplicate update to client/browser ace:colorEntry dynamic example causes duplicate update to client/browser
        Description When using the dynamic swatches example in showcase (there are three examples for ace:colorEntry-> Swatches each in a tabPane, the dynamic example is in the third or last tabPane):-
        choose up to 4 colors and click on CreateSwatch button.
        a new colorEntry component appears with the Swatch created from the up to 4 input colorEntry components previously.
        Choose a color and it shows the selected color as it should.
        Click on "Reset" button and perform the same steps again (choose different or more or less colors but make sure the color is different than the last one chosen or the value change will not fire!)>
        Create new swatch
        Now choose a color from the new swatch created and a response containing the update returns from the server and not only is the ace:colorEntry component updated, but a duplicate is created too.

        I'll attach an screenshot, but tried, ace:tabPane cache="none" as well as various attributes on the ace:tabSet. Tried tabSetProxy with forms within the tabSet, ace:ajax with various execute and render values. Replaced c:forEach with individual components.....
        still get the update duplicated into tabSet.
        When using the dynamic swatches example in showcase (there are three examples for ace:colorEntry-> Swatches each in a tabPane, the dynamic example is in the third or last tabPane):-
        choose up to 4 colors and click on CreateSwatch button.
        a new colorEntry component appears with the Swatch created from the up to 4 input colorEntry components previously.
        Choose a color and it shows the selected color as it should.
        Click on "Reset" button and perform the same steps again (choose different or more or less colors but make sure the color is different than the last one chosen or the value change will not fire!)>
        Create new swatch
        Now choose a color from the new swatch created and a response containing the update returns from the server and not only is the ace:colorEntry component updated, but a duplicate is created too.

        I'll attach an screenshot, but tried, ace:tabPane cache="none" as well as various attributes on the ace:tabSet. Tried tabSetProxy with forms within the tabSet, ace:ajax with various execute and render values. Replaced c:forEach with individual components.....
        still get the update duplicated into the client.

        After commenting out the ace:tabSet and ace:tabPanes, I was able to reproduce the same issue. After reload of the page, the duplicate disappears.... leading me to wonder if the original markup should be destroyed before a re-render can occur in some cases by the javascript(?)
        Judy Guglielmin made changes -
        Assignee Judy Guglielmin [ judy.guglielmin ]
        Judy Guglielmin made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #51303 Thu Mar 09 15:40:42 MST 2017 judy.guglielmin ICE-11268 fixed markup to remove extra hashcode span which was causing extra update to client on dynamic update of page.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/colorentry/ColorEntryRenderer.java
        Ken Fyten made changes -
        Fix Version/s EE-4.2.0.GA [ 13071 ]
        Ken Fyten made changes -
        Affects Version/s EE-4.2.0.GA [ 13071 ]
        Ken Fyten made changes -
        Security Private [ 10001 ]
        Hide
        Judy Guglielmin added a comment -

        reopening the component is not available now as the component is not re-initialized properly.

        Show
        Judy Guglielmin added a comment - reopening the component is not available now as the component is not re-initialized properly.
        Judy Guglielmin made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Judy Guglielmin made changes -
        Assignee Judy Guglielmin [ judy.guglielmin ] Mircea Toma [ mircea.toma ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #51308 Fri Mar 10 15:50:03 MST 2017 judy.guglielmin ICE-11268 backed out change to data hashcode since the domdiff is causing the script to not be rendered without it.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/colorentry/ColorEntryRenderer.java
        Ken Fyten made changes -
        Assignee Priority P2 [ 10011 ]
        Hide
        Mircea Toma added a comment -

        Ok, I now can reproduce and understand what the problem is.

        Show
        Mircea Toma added a comment - Ok, I now can reproduce and understand what the problem is.
        Hide
        Judy Guglielmin added a comment -

        two screen shots ...one showing correct rendering and the incorrect one showing the duplicated update to the page.

        Show
        Judy Guglielmin added a comment - two screen shots ...one showing correct rendering and the incorrect one showing the duplicated update to the page.
        Judy Guglielmin made changes -
        Attachment ICE-11268 correct.png [ 22493 ]
        Attachment ICE-11268 incorrect.png [ 22494 ]
        Hide
        Mircea Toma added a comment -

        The issue is caused by ColorEntryRenderer because is rendering two elements with the exact same "id" attribute.

        Modified the renderer to assign an ID attribute value for the swatch markup that does not coincide with the ID of the root element.

        Show
        Mircea Toma added a comment - The issue is caused by ColorEntryRenderer because is rendering two elements with the exact same "id" attribute. Modified the renderer to assign an ID attribute value for the swatch markup that does not coincide with the ID of the root element.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #51396 Thu Mar 30 09:30:20 MDT 2017 mircea.toma ICE-11268 Assign an ID attribute value for the swatch markup that does not coincide with the ID of the root element.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/colorentry/ColorEntryRenderer.java
        Hide
        Carmen Cristurean added a comment -

        Verified ICEfaces4 trunk r 51396 on MsEdge, IE11, FF49 and Tomcat7.

        Show
        Carmen Cristurean added a comment - Verified ICEfaces4 trunk r 51396 on MsEdge, IE11, FF49 and Tomcat7.
        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: