Packagecom.adobe.portfolio.components.supportClasses
Classpublic class NavContainerDataGroup
InheritanceNavContainerDataGroup Inheritance spark.components.DataGroup

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The NavContainerDataGroup class extends DataGroup to provide functionality specific to Portfolio navigators.

Default MXML PropertydataProvider



Public Properties
 PropertyDefined By
  restoreScrollPositionsOnFolderChange : Boolean
NavContainerDataGroup
Protected Properties
 PropertyDefined By
  currentFolder : IAttachment
NavContainerDataGroup
  verticalScrollPositionDictionary : Dictionary
NavContainerDataGroup
Public Methods
 MethodDefined By
  
Constructor.
NavContainerDataGroup
Protected Methods
 MethodDefined By
  
[override] DataGroup's commitProperties resets the horizontal and vertical scroll positions to 0 when the dataprovider changes.
NavContainerDataGroup
  
An event listener to respond to events from the collectionManager.
NavContainerDataGroup
  
setVerticalScrollPosition(value:Number):void
NavContainerDataGroup
Public Constants
 ConstantDefined By
  collectionManager : CollectionManager
The navigator's CollectionManager instance.
NavContainerDataGroup
Property Detail
currentFolderproperty
protected var currentFolder:IAttachment

restoreScrollPositionsOnFolderChangeproperty 
restoreScrollPositionsOnFolderChange:Boolean

This property can be used as the source for data binding.


Implementation
    public function get restoreScrollPositionsOnFolderChange():Boolean
    public function set restoreScrollPositionsOnFolderChange(value:Boolean):void
verticalScrollPositionDictionaryproperty 
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.

onHostEvent()method 
protected function onHostEvent(event:CollectionManagerEvent):void

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).

Parameters

event:CollectionManagerEvent

setVerticalScrollPosition()method 
protected function setVerticalScrollPosition(value:Number):void

Parameters

value:Number

Constant Detail
collectionManagerConstant
public const collectionManager:CollectionManager

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The navigator's CollectionManager instance. All host interaction should go through this instance, rather than the INavigatorHost directly.