Packagelc.attachments
Classpublic class AttachmentHeaderModel
InheritanceAttachmentHeaderModel Inheritance PresentationModel Inheritance EventDispatcher Inheritance Object

The AttachmentsHeaderModel class acts as the model for the AttachmentsHeader component.

See also

lc.attachments.AttachmentHeader


Public Properties
 PropertyDefined By
  attachmentPermissions : ArrayCollection
An array of the possible combinations of the AttachmentPermissions object that can be associated with an AttachmentHeader component.
AttachmentHeaderModel
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  errorString : String
The error string.
AttachmentHeaderModel
  file : FileReference
The FileReference object used to display the file Browse dialog box.
AttachmentHeaderModel
  fileName : String
The name of the attachment being added.
AttachmentHeaderModel
  note : String
The text contained in the note.
AttachmentHeaderModel
  permissionIndex : int
The index of the AttachmentPermissions object associated with the current Task object in the model's attachmentPermissions array.
AttachmentHeaderModel
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
 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
  task : Task
The process management task that the attachments are associated with.
AttachmentHeaderModel
  taskACL : TaskACL
The TaskACL object associated with the current task.
AttachmentHeaderModel
  title : String
The text contained in the note title.
AttachmentHeaderModel
Public Methods
 MethodDefined By
  
Constructor.
AttachmentHeaderModel
  
Adds the file property to the current Task object, with the specified AttachmentPermissions object set.
AttachmentHeaderModel
 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 title and note properties to the current Task object, with the specified AttachmentPermissions object set.
AttachmentHeaderModel
 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
  
Reinitializes the model's properties.
AttachmentHeaderModel
 Inherited
Dispatches an event into the event flow.
EventDispatcher
  
Displays a File Browse dialog box from which a user can select the attachment file to add.
AttachmentHeaderModel
 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
 Inherited
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.
PresentationModel
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
  
Dispatches when the taskACL property changes on the Task object.
AttachmentHeaderModel
 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
  
Retrieves the label associated with the AttachmentPermissions object that was passed in.
AttachmentHeaderModel
  
Changes the state of this component to the AttachmentHeaderModel.STATE_ADD_ATTACHMENT state.
AttachmentHeaderModel
  
Changes the state of this component to the AttachmentHeaderModel.STATE_ADD_NOTE state.
AttachmentHeaderModel
 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
 Inherited
setState(newState:String):void
Sets the 'state' property to a new value and causes a PropertyChangeEvent event.
PresentationModel
Events
 Event Summary Defined By
 Inherited Dispatched when Flash Player gains operating system focus and becomes active.EventDispatcher
 Inherited Dispatched when Flash Player loses operating system focus and is becoming inactive.EventDispatcher
Public Constants
 ConstantDefined By
  NOTE_TITLE_MAXSIZE : int = 255
[static] The maximum size of the title for a note.
AttachmentHeaderModel
  STATE_ADD_ATTACHMENT : String = "addAttachmentState"
[static] The model is set into this state when it is possible to add both notes and attachments.
AttachmentHeaderModel
  STATE_ADD_ATTACHMENT_ONLY : String = "addAttachmentOnlyState"
[static] The model is set into this state when it is only possible to add attachments.
AttachmentHeaderModel
  STATE_ADD_NOTE : String = "addNoteState"
[static] The model is set into this state when it is in the STATE_ADD_ATTACHMENT state and the user chooses to add a note.
AttachmentHeaderModel
  STATE_ADD_NOTE_ONLY : String = "addNoteOnlyState"
[static] The model is set into this state when it is only possible to add a note.
AttachmentHeaderModel
Property Detail
attachmentPermissionsproperty
public var attachmentPermissions:ArrayCollection

An array of the possible combinations of the AttachmentPermissions object that can be associated with an AttachmentHeader component.

errorStringproperty 
public var errorString:String

The error string.

fileproperty 
public var file:FileReference

The FileReference object used to display the file Browse dialog box.

fileNameproperty 
public var fileName:String

The name of the attachment being added.

noteproperty 
public var note:String

The text contained in the note.

permissionIndexproperty 
public var permissionIndex:int

The index of the AttachmentPermissions object associated with the current Task object in the model's attachmentPermissions array.

taskproperty 
public var task:Task

The process management task that the attachments are associated with.

taskACLproperty 
public var taskACL:TaskACL

The TaskACL object associated with the current task. The TaskACL object contains the settings from an AttachmentPermissions object associated with the current task and controls the state in which this component is viewed.

See also

titleproperty 
public var title:String

The text contained in the note title.

Constructor Detail
AttachmentHeaderModel()Constructor
public function AttachmentHeaderModel()

Constructor.

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

Adds the file property to the current Task object, with the specified AttachmentPermissions object set.

Views typically call this method when the user clicks the OK button to add an attachment.

addNote()method 
public function addNote():void

Adds the title and note properties to the current Task object, with the specified AttachmentPermissions object set.

Views typically call this method when the user clicks the OK button to add a note.

clearFields()method 
public function clearFields():void

Reinitializes the model's properties. The following properties are reinitialized:

  • The file property is set to a value of null.
  • The note, title, fileName, and errorString properties are set to an empty string.
  • The permissionIndex property is set to a value of zero.
  • getAttachmentFile()method 
    public function getAttachmentFile():void

    Displays a File Browse dialog box from which a user can select the attachment file to add.

    onTaskChangeHandler()method 
    public function onTaskChangeHandler(taskACL:TaskACL):void

    Dispatches when the taskACL property changes on the Task object. It is used to properly set the state of the AttachmentHeader component based on the value of the taskACL object.

    Parameters

    taskACL:TaskACL — The ACL (access control list) associated with the current task.

    selectLabel()method 
    public function selectLabel(item:Object):String

    Retrieves the label associated with the AttachmentPermissions object that was passed in.

    Parameters

    item:Object — The permissions of an attachment.

    Returns
    String — The associated label of an item.
    setAddAttachmentState()method 
    public function setAddAttachmentState():void

    Changes the state of this component to the AttachmentHeaderModel.STATE_ADD_ATTACHMENT state.

    This state allows the user to add an attachment through this component.

    setAddNoteState()method 
    public function setAddNoteState():void

    Changes the state of this component to the AttachmentHeaderModel.STATE_ADD_NOTE state.

    This state allows the user to add a note through the AttachmentHeader component.

    Constant Detail
    NOTE_TITLE_MAXSIZEConstant
    public static const NOTE_TITLE_MAXSIZE:int = 255

    The maximum size of the title for a note.

    STATE_ADD_ATTACHMENTConstant 
    public static const STATE_ADD_ATTACHMENT:String = "addAttachmentState"

    The model is set into this state when it is possible to add both notes and attachments.

    STATE_ADD_ATTACHMENT_ONLYConstant 
    public static const STATE_ADD_ATTACHMENT_ONLY:String = "addAttachmentOnlyState"

    The model is set into this state when it is only possible to add attachments.

    STATE_ADD_NOTEConstant 
    public static const STATE_ADD_NOTE:String = "addNoteState"

    The model is set into this state when it is in the STATE_ADD_ATTACHMENT state and the user chooses to add a note.

    STATE_ADD_NOTE_ONLYConstant 
    public static const STATE_ADD_NOTE_ONLY:String = "addNoteOnlyState"

    The model is set into this state when it is only possible to add a note.





     

    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/attachments/AttachmentHeaderModel.html