Packagelc.task
Classpublic class TaskDirectiveModel
InheritanceTaskDirectiveModel Inheritance PresentationModel Inheritance EventDispatcher Inheritance Object

The TaskDirectiveModel class acts as the model for the TaskDirective component.

The TaskDirectiveModel class is responsible for providing the ability for a TaskUserCommand object to be executed with a selected User object.

See also

lc.task.TaskDirective
lc.domain.Task
lc.domain.TaskUserCommand
lc.domain.ForwardCommand
lc.domain.ShareCommand
lc.domain.ConsultCommand


Public Properties
 PropertyDefined By
  command : TaskUserCommand
The command object that drives the model's behavior.
TaskDirectiveModel
  commandInstructions : String
[read-only] Retrieves the localized instructions that are associated with the command.
TaskDirectiveModel
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  errorMessage : Message
The error message when an error occurs.
TaskDirectiveModel
  isAddEnabled : Boolean
[read-only] A flag that indicates whether adding a user based on a certain conditions is satisfied.
TaskDirectiveModel
  isExecuteEnabled : Boolean
[read-only] A flag that indicates whether the condition for executing the task directive has been satisfied.
TaskDirectiveModel
  isRemoveEnabled : Boolean
[read-only] A flag that indicates whether the condition for removing a user is satisfied.
TaskDirectiveModel
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
  selectedUsers : ListCollectionView
The collection of users that have been selected from the UserSearchDataGridModel object.
TaskDirectiveModel
  serviceName : String
The service name of the task.
TaskDirectiveModel
 Inheritedsession : SessionMap
A SessionMap object that stores information relating to the server session.
PresentationModel
 Inheritedstate : String
[read-only] The name of the state the current view is in.
PresentationModel
  userSearchDataGridModel : UserSearchDataGridModel
The UserSearchDataGridModel object provides the results of a user search.
TaskDirectiveModel
Public Methods
 MethodDefined By
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
EventDispatcher
  
Adds the selected users from the UserSearchDataGridModel object to the collection of selectedUsers property.
TaskDirectiveModel
 Inherited
bindProperty(destination:Object, destinationProperty:String, source:Object, sourceChain:Object, commitOnly:Boolean = false):ChangeWatcher
Binds a public property on the destination object from a property or property chain on the source object.
PresentationModel
  
Cancels the command.
TaskDirectiveModel
 Inherited
Dispatches an event into the event flow.
EventDispatcher
  
Invokes the associated command object's execute method.
TaskDirectiveModel
 Inherited
getCSSStyle(declaration:String, styleProperty:String, defaultValue:Object = null):Object
Returns the corresponding cascading style sheet (CSS) property to use based on the specified parameters.
PresentationModel
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
  
Subclasses can override this method, which initializes the presentation model after the view bindings have been processed to prevent view bindings from overriding the initial model state.
TaskDirectiveModel
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
  
Resets the selectdUsers property to an empty value (null).
TaskDirectiveModel
  
Resets the model to the original state and re-initalizes the properties back to default values.
TaskDirectiveModel
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Protected Methods
 MethodDefined By
  
setState(newState:String):void
Sets the 'state' property to a new value and causes a PropertyChangeEvent event.
TaskDirectiveModel
Events
 Event Summary Defined By
 Inherited Dispatched when Flash Player gains operating system focus and becomes active.EventDispatcher
   Dispatched on the request to cancel the command.TaskDirectiveModel
   Dispatched on successful execution of the command.TaskDirectiveModel
 Inherited Dispatched when Flash Player loses operating system focus and is becoming inactive.EventDispatcher
Public Constants
 ConstantDefined By
  STATE_ERROR : String = "errorState"
[static] The model is set into this state upon an error.
TaskDirectiveModel
  STATE_INITIAL : String = "initialState"
[static] The model is set into this state upon construction.
TaskDirectiveModel
  STATE_IN_PROGRESS : String = "inProgressState"
[static] The model is set into this state during a search operation.
TaskDirectiveModel
  STATE_SEARCH_COMPLETE : String = "searchCompleteState"
[static] The model is set into this state upon search completion.
TaskDirectiveModel
Property Detail
commandproperty
command:TaskUserCommand  [read-write]

The command object that drives the model's behavior. Different commands have different instructions and images associated with it.


Implementation
    public function get command():TaskUserCommand
    public function set command(value:TaskUserCommand):void
commandInstructionsproperty 
commandInstructions:String  [read-only]

Retrieves the localized instructions that are associated with the command.

This property can be used as the source for data binding.


Implementation
    public function get commandInstructions():String
errorMessageproperty 
public var errorMessage:Message

The error message when an error occurs.

isAddEnabledproperty 
isAddEnabled:Boolean  [read-only]

A flag that indicates whether adding a user based on a certain conditions is satisfied. A value of true is returned if a user has been selected within the UserSearchDataGridModel object.

This property can be used as the source for data binding.


Implementation
    public function get isAddEnabled():Boolean
isExecuteEnabledproperty 
isExecuteEnabled:Boolean  [read-only]

A flag that indicates whether the condition for executing the task directive has been satisfied. A value of true is returned if a user has been selected within the UserSearchDataGridModel object and the current state of the model is not searching.

This property can be used as the source for data binding.


Implementation
    public function get isExecuteEnabled():Boolean
isRemoveEnabledproperty 
isRemoveEnabled:Boolean  [read-only]

A flag that indicates whether the condition for removing a user is satisfied. A value of true is returned if a user has been selected within the UserSearchDataGridModel object.

This property can be used as the source for data binding.


Implementation
    public function get isRemoveEnabled():Boolean
selectedUsersproperty 
public var selectedUsers:ListCollectionView

The collection of users that have been selected from the UserSearchDataGridModel object.

serviceNameproperty 
public var serviceName:String

The service name of the task.

userSearchDataGridModelproperty 
public var userSearchDataGridModel:UserSearchDataGridModel

The UserSearchDataGridModel object provides the results of a user search.

Method Detail
addUser()method
public function addUser():void

Adds the selected users from the UserSearchDataGridModel object to the collection of selectedUsers property.

cancelCommand()method 
public function cancelCommand():void

Cancels the command. This resets the properties in the model and dispatches an EVENT_COMMAND_CANCEL event.

executeCommand()method 
public function executeCommand():void

Invokes the associated command object's execute method.

initialize()method 
public override function initialize():void

Subclasses can override this method, which initializes the presentation model after the view bindings have been processed to prevent view bindings from overriding the initial model state.
removeUser()method 
public function removeUser():void

Resets the selectdUsers property to an empty value (null).

reset()method 
public function reset():void

Resets the model to the original state and re-initalizes the properties back to default values.

setState()method 
protected override function setState(newState:String):void

Sets the 'state' property to a new value and causes a PropertyChangeEvent event.

Parameters

newState:String — Specifies the new state name.

Event Detail
commandCancel Event
Event Object Type: flash.events.Event
Event.type property = flash.events.Event

Dispatched on the request to cancel the command.

commandComplete Event  
Event Object Type: flash.events.Event
Event.type property = flash.events.Event

Dispatched on successful execution of the command.

Constant Detail
STATE_ERRORConstant
public static const STATE_ERROR:String = "errorState"

The model is set into this state upon an error.

STATE_IN_PROGRESSConstant 
public static const STATE_IN_PROGRESS:String = "inProgressState"

The model is set into this state during a search operation.

STATE_INITIALConstant 
public static const STATE_INITIAL:String = "initialState"

The model is set into this state upon construction.

STATE_SEARCH_COMPLETEConstant 
public static const STATE_SEARCH_COMPLETE:String = "searchCompleteState"

The model is set into this state upon search completion.





 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/common/langref/lc/task/TaskDirectiveModel.html