Mihai Chira created FLEX-34440:
----------------------------------
Summary: 'Bookmark no longer valid' CursorError caused by
HierarchicalCollectionView's conversion of CollectionEventKind.REPLACE into
CollectionEventKind.REMOVE
Key: FLEX-34440
URL: https://issues.apache.org/jira/browse/FLEX-34440
Project: Apache Flex
Issue Type: Sub-task
Components: Advanced Data Grid, mx: Tree
Affects Versions: Apache Flex 4.13.0
Reporter: Mihai Chira
Assignee: Mihai Chira
Fix For: Apache Flex 4.14.0
*Steps to reproduce*:
# Create a HierarchicalCollectionView with the structure below
# Create a HierarchicalCollectionViewCursor, and call seek(new
CursorBookmark(10));
# 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)
--
This message was sent by Atlassian JIRA
(v6.2#6252)