Packageorg.servebox.foundry.view
Classpublic class ViewLocator

ViewLocator implements Singleton design pattern , this class is designed to store references to the ViewHelper of an application



Public Methods
 MethodDefined by
  
Creates a new ViewLocator object.
ViewLocator
  
[static] Returns the instance of the ViewLocator.
ViewLocator
  
Gets a reference to a viewHelper with an id
ViewLocator
  
registerViewHelper(id:String, view:ViewHelper):void
Registers a ViewHelper to the ViewLocator.
ViewLocator
  
unregisterViewHelper(id:String):void
Unregisters a ViewHelper from the ViewLocator.
ViewLocator
Constructor detail
ViewLocator()constructor
public function ViewLocator()

Creates a new ViewLocator object.

Method detail
getInstance()method
public static function getInstance():ViewLocator

Returns the instance of the ViewLocator. It is an implementation of Singleton Pattern.

Returns
ViewLocator
getViewHelper()method 
public function getViewHelper(id:String):ViewHelper

Gets a reference to a viewHelper with an id

Parameters
id:String — give the id of the required ViewHelper

Returns
ViewHelper
registerViewHelper()method 
public function registerViewHelper(id:String, view:ViewHelper):void

Registers a ViewHelper to the ViewLocator.

Parameters
id:String
 
view:ViewHelper
unregisterViewHelper()method 
public function unregisterViewHelper(id:String):void

Unregisters a ViewHelper from the ViewLocator.

Parameters
id:String