ICEfaces
  1. ICEfaces
  2. ICE-7143

ace:dataTable - highlighted row doesn't get cleared when changing table list

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 2.1-Beta2, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All
    • Assignee Priority:
      P1

      Description

      Row selection survives data table refresh. We select a row, the row is highlighted. If we refresh the data table without any filter change, all row object are changed although the content is the same. The server recognizes that and does not send any row selection back in the selection hidden field. But the row is still highlighted, which leaves the client in an inconsistent state.

        Activity

        Hide
        Arran Mccullough added a comment -

        Attached test case to reproduce issue. Test case can be deployed on Tomcat (http://localhost:8080/Case10413Example/welcomeICEfaces.jsf).

        Steps to reproduce:

        • Load app
        • Select the first row in the table.
        • Click on Change button.
        • Data in table is change but the first row is still highlighted.
        Show
        Arran Mccullough added a comment - Attached test case to reproduce issue. Test case can be deployed on Tomcat ( http://localhost:8080/Case10413Example/welcomeICEfaces.jsf ). Steps to reproduce: Load app Select the first row in the table. Click on Change button. Data in table is change but the first row is still highlighted.
        Hide
        Nils Lundquist added a comment -

        This issue results from a data table optimization that attempts to perform the least rendering possible in a partial component visit. In this case, it means that each individual output text is rendered with new contents rather than the table undergoing a rerender itself.

        Normally this is desirable, but this handling will require modification to take into consideration changes in our per-row data model.

        In the mean time this handling can be manually worked around by having a column contain an valueExpression as a text node. This is demonstrated in the attached altered war.

        Show
        Nils Lundquist added a comment - This issue results from a data table optimization that attempts to perform the least rendering possible in a partial component visit. In this case, it means that each individual output text is rendered with new contents rather than the table undergoing a rerender itself. Normally this is desirable, but this handling will require modification to take into consideration changes in our per-row data model. In the mean time this handling can be manually worked around by having a column contain an valueExpression as a text node. This is demonstrated in the attached altered war.
        Hide
        Arran Mccullough added a comment -

        There is one issue with the workaround, it displays the class name and memory address into the column. Is there anything else required so it won't show this in the table?

        Show
        Arran Mccullough added a comment - There is one issue with the workaround, it displays the class name and memory address into the column. Is there anything else required so it won't show this in the table?
        Hide
        Nils Lundquist added a comment -

        a little plain HTML wrapping the EL text node with display:none style will hide the output:

        <ace:column sortBy="#

        {tableItem.itemThree}">
        <f:facet name="header">
        <h:outputText value="Column Three" />
        </f:facet>
        <h:outputText value="#{tableItem.itemThree}

        " />
        <div style="display:none;">#

        {tableItem}

        </div>
        </ace:column>

        Show
        Nils Lundquist added a comment - a little plain HTML wrapping the EL text node with display:none style will hide the output: <ace:column sortBy="# {tableItem.itemThree}"> <f:facet name="header"> <h:outputText value="Column Three" /> </f:facet> <h:outputText value="#{tableItem.itemThree} " /> <div style="display:none;"># {tableItem} </div> </ace:column>
        Hide
        Arran Mccullough added a comment -

        Ah yes, thats much better. Thanks!

        Show
        Arran Mccullough added a comment - Ah yes, thats much better. Thanks!
        Hide
        Nils Lundquist added a comment -

        Fixed as a product of reduced customUpdate usage in the data table.

        Show
        Nils Lundquist added a comment - Fixed as a product of reduced customUpdate usage in the data table.
        Hide
        Nils Lundquist added a comment - - edited

        Resolved. Sorting is now refactored to work without customUpdates.

        Expansion refactoring still in progress but could be released at this point since its updates don't effect the rest of the table.

        Show
        Nils Lundquist added a comment - - edited Resolved. Sorting is now refactored to work without customUpdates. Expansion refactoring still in progress but could be released at this point since its updates don't effect the rest of the table.

          People

          • Assignee:
            Nils Lundquist
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: