ICEfaces
  1. ICEfaces
  2. ICE-11330

ace:expansionToggler, ExpansionChangeEvent.isExpanded() returns opposite value

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P04, 4.2
    • Fix Version/s: 4.3
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Any
    • Assignee Priority:
      P2
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration

      Description

      When expanding or collapsing a row and invoking the 'changeListener' method specified, the result of calling isExpanded() on the ExpansionChangeEvent object that is passed to the listener is the opposite of the new state. If the row was just expanded, the result will be false, and if the row was just collapsed, the result will be true. This can also be viewed as returning the previous state of the row. It is more natural to think that the result should reflect the new state of the row and not the previous one.

        Activity

        Hide
        Ken Fyten added a comment -

        We will only fix this for 4.3 to avoid possible backwards compatibility issues with EE 3.3.0.GA.

        Show
        Ken Fyten added a comment - We will only fix this for 4.3 to avoid possible backwards compatibility issues with EE 3.3.0.GA.
        Hide
        Arturo Zambrano added a comment -

        r51966: modified ace:expansionToggler so that ExpansionChangeEvent.isExpanded() returns the correct value, which reflects the new state of the row

        Show
        Arturo Zambrano added a comment - r51966: modified ace:expansionToggler so that ExpansionChangeEvent.isExpanded() returns the correct value, which reflects the new state of the row
        Hide
        Arturo Zambrano added a comment -

        The reason why this was returning the opposite value was because the ExpansionToggler component class was creating the ExpansionChangeEvent during the decoding phase, and at that moment in the JSF lifecycle the row state map is not updated yet with the new states. This was fixed by creating the ExpansionChangeEvent with the opposite 'expanded' value, which should reflect the new state. This is done once the row is verified to be expandable.

        Show
        Arturo Zambrano added a comment - The reason why this was returning the opposite value was because the ExpansionToggler component class was creating the ExpansionChangeEvent during the decoding phase, and at that moment in the JSF lifecycle the row state map is not updated yet with the new states. This was fixed by creating the ExpansionChangeEvent with the opposite 'expanded' value, which should reflect the new state. This is done once the row is verified to be expandable.
        Hide
        Liana Munroe added a comment -

        Verified ICEfaces 4 trunk r51969, Tomcat 8. No regressions found in ace:dataTable or ace:panel expansion tests.

        Show
        Liana Munroe added a comment - Verified ICEfaces 4 trunk r51969, Tomcat 8. No regressions found in ace:dataTable or ace:panel expansion tests.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arturo Zambrano
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: