ICEfaces
  1. ICEfaces
  2. ICE-9384

rowSelectListener converting/validating ace:datatable contents

    Details

    • Assignee Priority:
      P1
    • Salesforce Case Reference:
    • Affects:
      Compatibility/Configuration

      Description

      The rowSelectListener method is not executed / silently fails when the ace:dataTable contains cells that fail validation/conversion. According to the ace:datatable tld "Decoding children during feature requests can result in unwanted input submission (during pagination for example), so by default this component suppresses child decoding whenever submitting itself." The rowSelectListener appears to be decoding components in the ace:dataTable.

      To re-create this issue, modify dataTableListener.xhtml name column to the following:
                      <ace:column id="name" headerText="Name">
                          <h:inputText id="nameCell"
                                       value="#{car.name}"
                                       required="true"
                                       size="7">
                          <f:ajax execute="@this" render="@this" />
                          </h:inputText>
                      </ace:column>

      Add a System.out.println to DataTableListener selectListener method.

      When you select rows, you will see the selectListener method executed. Empty one of the name cells (which has required="true") and try selecting a row. You will see the row selection style applied in the browser, but the selectListener will not be executed on the server.

        Activity

        Hide
        Nils Lundquist added a comment - - edited

        What Brad is observing is that the selection state change is performed during decode, while the rowSelectListener is broadcast in some later phase. Since a table child input component fails validation, that later event broadcast phase is skipped like all other phases following validation failure, resulting in the selection occurring but no listener being processed.

        I will be moving the processing of row selection state changes into the updateModel phase.

        Show
        Nils Lundquist added a comment - - edited What Brad is observing is that the selection state change is performed during decode, while the rowSelectListener is broadcast in some later phase. Since a table child input component fails validation, that later event broadcast phase is skipped like all other phases following validation failure, resulting in the selection occurring but no listener being processed. I will be moving the processing of row selection state changes into the updateModel phase.
        Hide
        Nils Lundquist added a comment -

        Revision #36622
        Committed by nils.lundquist
        Moments ago
        ICE-9411 / ICE-9384 - Simplified API for cell selection and unified with other row/cell features in RowState. Reworked selection and expansion so state changes take place in updateModel. Simplified and renamed showcase selection example.

        Now the selection will not take place when there is invalid input.

        Show
        Nils Lundquist added a comment - Revision #36622 Committed by nils.lundquist Moments ago ICE-9411 / ICE-9384 - Simplified API for cell selection and unified with other row/cell features in RowState. Reworked selection and expansion so state changes take place in updateModel. Simplified and renamed showcase selection example. Now the selection will not take place when there is invalid input.
        Hide
        Ken Fyten added a comment -

        Let's make sure we include the note that a validation failure during submit when in client selection mode will result in the selected rows being lost / not selected to the TLD doc.

        Show
        Ken Fyten added a comment - Let's make sure we include the note that a validation failure during submit when in client selection mode will result in the selected rows being lost / not selected to the TLD doc.
        Hide
        Ken Fyten added a comment -

        Let's create a new JIRA to add an immediate mode for client mode row selection to allow the rows to be selected regardless of whether validation fails or not.

        Show
        Ken Fyten added a comment - Let's create a new JIRA to add an immediate mode for client mode row selection to allow the rows to be selected regardless of whether validation fails or not.
        Hide
        Nils Lundquist added a comment -

        Added ICE-9423

        Show
        Nils Lundquist added a comment - Added ICE-9423
        Hide
        Arturo Zambrano added a comment -

        Backported fix to 3.3 EE branch at revision 38848.

        Show
        Arturo Zambrano added a comment - Backported fix to 3.3 EE branch at revision 38848.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Brad Kroeger
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: