Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-34119 mx.collections.HierarchicalCollectionViewCursor causes CursorError RTE from ListCollectionView when the underlying collections change
  3. FLEX-34440

'Bookmark no longer valid' CursorError caused by HierarchicalCollectionView's conversion of CollectionEventKind.REPLACE into CollectionEventKind.REMOVE

    XMLWordPrintableJSON

Details

    Description

      Steps to reproduce A:
      Run HierarchicalCollectionViewCursor_FLEX_34440_Test.as against a previous version of HierarchicalCollectionViewCursor/HierarchicalCollectionView/LeafNodeCursor.

      Steps to reproduce B:

      1. Create a HierarchicalCollectionView with the structure below
      2. Create a HierarchicalCollectionViewCursor, and call seek(new CursorBookmark(10));
      3. Call setItemAt(new DataNode*("Replaced Node"), 1) on the collection of companies (effectively replacing "Region(2) -> City(1) -> Company(2)TBR" with a new node)

      Expected behaviour: no error.
      Actual behaviour: this runtime error is thrown:
      Error: Bookmark no longer valid.
      at ListCollectionViewCursor/seek()[C:\Users\mihaichira\workspaceFlex\FlexSDKSource\sdk\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:2522]
      at mx.collections::HierarchicalCollectionViewCursor/collectionChangeHandler()[C:\Users\mihaichira\workspaceFlex\TFC-10693\src\mx\collections\HierarchicalCollectionViewCursor.as:1296]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.collections::HierarchicalCollectionView/nestedCollectionChangeHandler()[C:\Users\mihaichira\workspaceFlex\TFC-10693\src\mx\collections\HierarchicalCollectionView.as:1664]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.collections::ListCollectionView/dispatchEvent()[C:\Users\mihaichira\workspaceFlex\FlexSDKSource\sdk\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:1090]
      at mx.collections::ListCollectionView/replaceItemsInView()[C:\Users\mihaichira\workspaceFlex\FlexSDKSource\sdk\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:1822]
      at mx.collections::ListCollectionView/listChangeHandler()[C:\Users\mihaichira\workspaceFlex\FlexSDKSource\sdk\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:1397]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.collections::ArrayList/setItemAt()[C:\Users\mihaichira\workspaceFlex\FlexSDKSource\sdk\frameworks\projects\framework\src\mx\collections\ArrayList.as:371]
      at mx.collections::ListCollectionView/setItemAt()[C:\Users\mihaichira\workspaceFlex\FlexSDKSource\sdk\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:558]
      at HierarchicalCollectionViewCursor_FLEX_34119_SET_Test/performReplacement()[C:\Users\mihaichira\workspaceFlex\TFC-10693\src\HierarchicalCollectionViewCursor_FLEX_34119_SET_Test.as:90]

      * Or whichever data class you use to structure the hierarchical data.

      Structure:
      Region(1)
      Region(2)
      Region(2) -> City(0)
      Region(2) -> City(1)
      Region(2) -> City(1) -> Company(1)
      Region(2) -> City(1) -> Company(2)TBR
      Region(2) -> City(1) -> Company(2)TBR -> Department(1)
      Region(2) -> City(1) -> Company(2)TBR -> Department(2)
      Region(2) -> City(1) -> Company(2)TBR -> Department(2) -> Employee(1)
      Region(2) -> City(1) -> Company(2)TBR -> Department(2) -> Employee(2)
      Region(2) -> City(1) -> Company(2)TBR -> Department(2) -> Employee(3)SEL
      Region(2) -> City(1) -> Company(2)TBR -> Department(3)
      Region(2) -> City(1) -> Company(2)TBR -> Department(3) -> Employee(1)
      Region(2) -> City(1) -> Company(2)TBR -> Department(3) -> Employee(2)
      Region(2) -> City(1) -> Company(2)TBR -> Department(3) -> Employee(3)
      Region(2) -> City(1) -> Company(2)TBR -> Department(3) -> Employee(4)
      Region(2) -> City(1) -> Company(3)
      Region(2) -> City(1) -> Company(3) -> Department(1)
      Region(2) -> City(1) -> Company(3) -> Department(1) -> Employee(1)
      Region(2) -> City(1) -> Company(3) -> Department(2)

      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: