| Package | com.jadbox.flashmvc2 |
| Class | public class SuperAction |
| Property | Defined by | ||
|---|---|---|---|
| actionRef : Class | SuperAction | ||
| enabled : Boolean
Tells if an action is enabled.
| SuperAction | ||
| isBusy : Boolean [read-only]
Tells if an action of this type is currently running.
| SuperAction | ||
| lastSuperEvent : SuperEvent
[read-only]
Returns the last SuperEvent fired after completing an action.
| SuperAction | ||
| superModel : SuperModel | SuperAction | ||
| Method | Defined by | ||
|---|---|---|---|
|
SuperAction(actionRef:Class, eventRef:Class = null)
The constuctor
| SuperAction | ||
|
addCompleteListener(onSuccess:Function = null, onFail:Function = null):void
This is a shorthand for addEventListener.
| SuperAction | ||
|
addEventListener(type:String, listener:Function):void
Listener for when an action completes and other statuses (see SuperEvent).
| SuperAction | ||
|
bindVars(... REST):void
This method looks at the SuperEvent fired from the completed action, and copies properties to the SuperModel from the SuperEvent.
| SuperAction | ||
|
runEvent(e:SuperEvent = null):void
This method will run the SuperAction with the SuperEvent as its model.
| SuperAction | ||
| actionRef | property |
public var actionRef:Class
| enabled | property |
enabled:Boolean [read-write]Tells if an action is enabled. If an action is disabled, it will not be dispatched.
Implementation public function get enabled():Boolean
public function set enabled(value:Boolean):void
| isBusy | property |
isBusy:Boolean [read-only]Tells if an action of this type is currently running.
Implementation public function get isBusy():Boolean
| lastSuperEvent | property |
lastSuperEvent:SuperEvent [read-only]Returns the last SuperEvent fired after completing an action. Use this with caution as it is not as reliable as just listening for the SuperEvent.COMPLETE. Remember that you will need to cast this property to a specific SuperEvent type.
Implementation public function get lastSuperEvent():SuperEvent
| superModel | property |
public var superModel:SuperModel
| SuperAction | () | constructor |
public function SuperAction(actionRef:Class, eventRef:Class = null)The constuctor
ParametersactionRef:Class — Class reference to the class that does an action.
|
|
eventRef:Class (default = null) — The event class reference that the action class uses for its first parameter.
|
| addCompleteListener | () | method |
public function addCompleteListener(onSuccess:Function = null, onFail:Function = null):voidThis is a shorthand for addEventListener. It raps the Event.Complete for when the SuperEvent is successful or not.
ParametersonSuccess:Function (default = null) — OnSucces function listener
|
|
onFail:Function (default = null) — OnFail function listener
|
| addEventListener | () | method |
public function addEventListener(type:String, listener:Function):voidListener for when an action completes and other statuses (see SuperEvent).
Parameterstype:String — The event name (like SuperEvent.COMPLETE)
|
|
listener:Function — The listener function (the function will need a handler for SuperEvent)
|
| bindVars | () | method |
public function bindVars(... REST):voidThis method looks at the SuperEvent fired from the completed action, and copies properties to the SuperModel from the SuperEvent. Example: bindVars("email") would sync the SuperEvent's "email" property to its SuperModel property "email". This method is ideal for linking several SuperEvents that have a similair property to be copied to SuperModel for global reference.
Parameters... REST — The properties on the SuperEvent to copy over to SuperModel once the action completes.
|
| runEvent | () | method |
public function runEvent(e:SuperEvent = null):voidThis method will run the SuperAction with the SuperEvent as its model.
Parameterse:SuperEvent (default = null) — The SuperEvent that the view wants to run an action on.
|