ICEfaces
  1. ICEfaces
  2. ICE-6326

PanelPosition component renders out an escaped comment after first update

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta2
    • Fix Version/s: 2.0.0
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 2 panel position

      Description

      Saw this behaviour while testing in portlets. When the PanelPositioned component is initially rendered as a portlet, it looks fine. The first update after a drag renders out a comment that looks something like this:

      <!-- 165 -->

      The number is somewhat random but it remains rendered after the first update with only the number changing.

        Activity

        Hide
        Deryk Sinotte added a comment -

        Not sure if this is confined to portlets or not but I found this in the PanelPositionedRenderer.encodeBegin method:

        if (isChanged(facesContext))

        { // Force the re rendering of the entire component. This is due to a strange quick with positioned // panel. When an element is moved in the same list then it container element moves with it // When the update occurs the elements are replaced but because the containers have moved // then the result looks the same. (But a refresh shows otherwise) Node node = domContext.createTextNode( "<!-- " + (new Random().nextInt(1000)) + "-->"); root.appendChild(node); }

        It appears that the call to createTextNode is being escaped, leading to the comment actually being displayed.

        Show
        Deryk Sinotte added a comment - Not sure if this is confined to portlets or not but I found this in the PanelPositionedRenderer.encodeBegin method: if (isChanged(facesContext)) { // Force the re rendering of the entire component. This is due to a strange quick with positioned // panel. When an element is moved in the same list then it container element moves with it // When the update occurs the elements are replaced but because the containers have moved // then the result looks the same. (But a refresh shows otherwise) Node node = domContext.createTextNode( "<!-- " + (new Random().nextInt(1000)) + "-->"); root.appendChild(node); } It appears that the call to createTextNode is being escaped, leading to the comment actually being displayed.
        Hide
        Deryk Sinotte added a comment -

        Checked in a change that uses the createTextNodeUnescaped API to prevent escaping and displaying the comment.

        Show
        Deryk Sinotte added a comment - Checked in a change that uses the createTextNodeUnescaped API to prevent escaping and displaying the comment.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: