Packageorg.spicefactory.parsley.core.view.lifecycle
Classpublic class CustomEventLifecycle
InheritanceCustomEventLifecycle Inheritance flash.events.EventDispatcher
Implements ViewLifecycle

Implementation of the ViewLifecycle interface that listens to custom events dispatched by the target ("configureView" and "removeView") to demarcate the lifecycle of the target.

This lifecycle implementation gets used per default when no custom lifecycle has been installed for the type of the target and the autoremoveViewRoots or autoremoveComponents is set to false. The former setting is only considered for the actual view roots of a Context, the latter for all other regular components.



Public Methods
 MethodDefined By
  
start(config:ViewConfiguration, context:Context):void
Starts controlling the lifecycle of the view instance contained in the specified configuration instance.
CustomEventLifecycle
  
stop():void
Stops controlling the lifecycle of the view instance.
CustomEventLifecycle
Method Detail
start()method
public function start(config:ViewConfiguration, context:Context):void

Starts controlling the lifecycle of the view instance contained in the specified configuration instance. The primary purpose of this lifecycle instance is to invoke the init and destroy methods of the associated ViewProcessor based on the lifecycle of the view.

Parameters

config:ViewConfiguration — the view configuration that holds the view this lifecycle instance should control
 
context:Context — the Context associated with this view

stop()method 
public function stop():void

Stops controlling the lifecycle of the view instance. After this method has been called this lifecycle instance should no longer invoke the init and destroy methods of the associated ViewProcessor and free all resources it is holding.