Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-34424

HierarchicalCollectionViewCursor.current returns null when previous sibling is removed

    XMLWordPrintableJSON

Details

    Description

      Steps to reproduce A: run HierarchicalCollectionViewCursor_FLEX_34424_Test - ideally with a previous version of HierarchicalCollectionViewCursor, HierarchicalCollectionView and LeafNodeCursor, to see how it fails.

      Steps to reproduce B:

      1. Create a HierarchicalCollectionView with a hierarchical structure with at least 2 levels of depth. See structure at the end of the ticket for example.
      2. Create a HierarchicalCollectionViewCursor via HierarchicalCollectionView.createCursor().
      3. Call HierarchicalCollectionViewCursor.seek(11), which (correctly) makes HierarchicalCollectionViewCursor.current == "Region(2) -> City(1) -> Company(2) -> Department(2) -> Employee(3)"
      4. Remove "Region(2) -> City(1) -> Company(2) -> Department(2) -> Employee(1)" from its collection

      Actual behaviour: HierarchicalCollectionViewCursor.current becomes null.
      Desired behaviour: HierarchicalCollectionViewCursor.current stays "Region(2) -> City(1) -> Company(2) -> Department(2) -> Employee(3)".

      Example structure:
      Region(1)
      Region(2)
      Region(2) -> City(1)
      Region(2) -> City(1) -> Company(1)
      Region(2) -> City(1) -> Company(2)
      Region(2) -> City(1) -> Company(2) -> Department(1)
      Region(2) -> City(1) -> Company(2) -> Department(1) -> Employee(1)
      Region(2) -> City(1) -> Company(2) -> Department(1) -> Employee(2)
      Region(2) -> City(1) -> Company(2) -> Department(2)
      Region(2) -> City(1) -> Company(2) -> Department(2) -> Employee(1)
      Region(2) -> City(1) -> Company(2) -> Department(2) -> Employee(2)
      Region(2) -> City(1) -> Company(2) -> Department(2) -> Employee(3)
      Region(2) -> City(1) -> Company(2) -> Department(3)
      Region(2) -> City(1) -> Company(2) -> Department(3) -> Employee(1)
      Region(2) -> City(1) -> Company(2) -> Department(3) -> Employee(2)
      Region(2) -> City(1) -> Company(2) -> Department(3) -> Employee(3)
      Region(2) -> City(1) -> Company(2) -> Department(3) -> Employee(4)
      Region(2) -> City(1) -> Company(3)

      Attachments

        Issue Links

          Activity

            People

              evolverine Mihai Chira
              evolverine Mihai Chira
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: