This property can be used as the source for data binding.
Implementation public function get restoreScrollPositionsOnFolderChange():Boolean public function set restoreScrollPositionsOnFolderChange(value:Boolean):void
verticalScrollPositionDictionary
property
protected var verticalScrollPositionDictionary:Dictionary
Constructor Detail
NavContainerDataGroup
()
Constructor
public function NavContainerDataGroup()
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Constructor.
Method Detail
commitProperties
()
method
override protected function commitProperties():void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
DataGroup's commitProperties resets the horizontal and vertical scroll positions to 0 when the dataprovider changes.
It also resets the horizontal and vertical scroll positions to 0 when the dataProvider's IList is refreshed or reset.
The dataProvider's IList (in our case, collection manager's attachments) is reset for a number of reasons, such as
when the sort order changes, or the user edits and changes a field value. Since we don't want to scroll to the
beginning of the list after actions like changing the sort order or editing a field, prevent commitProperties from
resetting the horizontal and vertical scroll positions to 0.
An event listener to respond to events from the collectionManager.
In this case we are only interested in the "ITEMS_DID_CHANGE" event,
which occurs after a folder change. When this happens, we save the
vertical scroll position of the current folder (or root) and then set
up a delayed call to set/restore the vertical scroll position of
the new folder (or root).