| Package | com.developmentarc.framework.controllers |
| Class | public class ActionDelegate |
| Inheritance | ActionDelegate flash.events.EventDispatcher |
| Property | Defined by | ||
|---|---|---|---|
| actions : Array
Defines an Array of IActions that are then registered through the delegate
to the Action's commands Array.
| ActionDelegate | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor.
| ActionDelegate | ||
|
Used to add a single action to to the ActionDelegate.
| ActionDelegate | ||
|
removeAction(action:IAction):void
Removes an action from the ActionDelegate.
| ActionDelegate | ||
| Method | Defined by | ||
|---|---|---|---|
|
handleCommandChange(event:Event):void
When the commands of a registered Action change this method
unregisters exiting commands and then registers the new command list.
| ActionDelegate | ||
|
registerActions(actions:Array):void
Registers the action array and the commands assigned to that action.
| ActionDelegate | ||
|
registerCommands(action:IAction):void
Registers the Action's commands via the EventBroker.
| ActionDelegate | ||
|
unregisterActions(actions:Array):void
Unregisters an Array of IActions from their commands.
| ActionDelegate | ||
|
unregisterCommands(action:IAction, commands:Array):void
Unregisters the Action's commands via the EventBroker.
| ActionDelegate | ||
| actions | property |
actions:Array [read-write]Defines an Array of IActions that are then registered through the delegate to the Action's commands Array. The ActionDelegate can be used in MXML and we encourge this to enable a centralized location for where the Actions and Commands are assigned.
Implementation public function get actions():Array
public function set actions(value:Array):void
<controllers:ActionDelegate>
<controllers:actions>
<mx:Array>
<actiontypes:BasicAction commands="{[BasicCommand.MY_BASIC_COMMAND]}" />
<actiontypes:MultipleCommandAction commands="{[BasicCommand.A_SECOND_COMMAND, BasicCommand.MY_BASIC_COMMAND]}" />
</mx:Array>
</controllers:actions>
</controllers:ActionDelegate>
| ActionDelegate | () | constructor |
public function ActionDelegate()Constructor.
| addAction | () | method |
public function addAction(action:IAction):voidUsed to add a single action to to the ActionDelegate.
Parametersaction:IAction — The action to register.
|
| handleCommandChange | () | method |
protected function handleCommandChange(event:Event):voidWhen the commands of a registered Action change this method unregisters exiting commands and then registers the new command list. This method is important when assigning commands via MXML due to the population order of child tags.
Parametersevent:Event — The change event.
|
| registerActions | () | method |
protected function registerActions(actions:Array):voidRegisters the action array and the commands assigned to that action.
Parametersactions:Array — The array of IActions to register to commands.
|
| registerCommands | () | method |
protected function registerCommands(action:IAction):voidRegisters the Action's commands via the EventBroker.
Parametersaction:IAction — The action to register.
|
| removeAction | () | method |
public function removeAction(action:IAction):voidRemoves an action from the ActionDelegate.
Parametersaction:IAction — The action to remove.
|
| unregisterActions | () | method |
protected function unregisterActions(actions:Array):voidUnregisters an Array of IActions from their commands.
Parametersactions:Array — The Array if IActions to unregister.
|
| unregisterCommands | () | method |
protected function unregisterCommands(action:IAction, commands:Array):voidUnregisters the Action's commands via the EventBroker.
Parametersaction:IAction — The action to unregister.
|
|
commands:Array |