Class: ViewManager

ViewManager()

ViewManager

Extends

  • EventDispatcher

Constructor

new ViewManager()

ViewManager manages ViewNavigator.It Subscribe to EventBroadcaster's Navigation channel to receive navigation change events. ViewManager find ViewNavigator based on Path Routes data and it match route info received in navigation change event.
Source:

Members

Name Description
routes Here path is routeID, navigatorID is viewNavigatorId, parentId is DOM Element Id or ViewId in case of Nested View Navigators By Default Main DOM Element have id="root"


Methods

Name Description
addNavigator ViewManager maintains navigators object in Key, Value form. Where key is viewNavigatorID and value is ViewNavigator Object Instance
createNavigator ViewManager calls createNavigator method when ViewNavigator is not created yet.
destroyAll
findRouteNavigator
getNavigator
getNavigatorParent
initialize Implement by subclass to initialise
removeNavigator removes ViewNavigator object instance from navigators array.


addNavigator(_navigator, _navigatorId)

ViewManager maintains navigators object in Key, Value form. Where key is viewNavigatorID and value is ViewNavigator Object Instance
Parameters:
Name Type Description
_navigator Object ViewNavigator
_navigatorId string ViewNavigatorID
Source:

createNavigator(_navigatorId, _parentId) → {Object}

ViewManager calls createNavigator method when ViewNavigator is not created yet.
Parameters:
Name Type Description
_navigatorId string ViewNavigatorId
_parentId string ParentId is DOM Element id or ViewID
Source:
Returns:
- New Instance of ViewNavigator
Type
Object

destroyAll()

Source:
To Do:
  • Implment destroy method

findRouteNavigator(_route) → {Array}

Parameters:
Name Type Description
_route string Path Route Name
Source:
Returns:
- NavigatorID Array
Type
Array

getNavigator(_navigatorId) → {Object}

Parameters:
Name Type Description
_navigatorId string ViewNavigatorID
Source:
Returns:
- ViewNavigator Object Instance by ViewNavigatorId.
Type
Object

getNavigatorParent(_navigatorId) → {string}

Parameters:
Name Type Description
_navigatorId string ViewNavigatorID
Source:
Returns:
- ParentID of ViewNavigator
Type
string

initialize()

Implement by subclass to initialise
Source:

removeNavigator(_navigatorId)

removes ViewNavigator object instance from navigators array.
Parameters:
Name Type Description
_navigatorId String NavigatorId
Source: