ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
com.adobe.icc.dc.domain 

TargetInstance  - AS3 Asset Composer

Packagecom.adobe.icc.dc.domain
Classpublic class TargetInstance
InheritanceTargetInstance Inheritance EventDispatcher Inheritance Object
Implements IContainerInstance, IValidation

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

This class is the runtime representation of the target area associated with the letter.



Public Properties
 PropertyDefined By
  allowFreeText : Boolean
[read-only] True if the free text can be added to target instance.
TargetInstance
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  contents : IList
[read-only] List of the contents associated with this Container instance.
TargetInstance
  contentVariables : IList
[read-only] Bindable/Read-only.
TargetInstance
  formSomExpression : String
[read-only] The SOM Expression of the target.
TargetInstance
  hasContentRemoved : Boolean
[read-only] True if the Target has one or more content removed from it, than what was originall assigned.
TargetInstance
  isNewTarget : Boolean = false
[Applicable during reload] True if this is a new container target, that did not exist when the Letter was submitted.
TargetInstance
  name : String
[read-only] The name of the target.
TargetInstance
  open : Boolean
[read-only] True if the container is open to extra content; false if it only allows content that was explicitly assigned to it in the letter.
TargetInstance
  order : int
[read-only] The target's depth-first order.
TargetInstance
  ordered : Boolean
[read-only] True if the container's contents order is fixed; false if its contents can be re-ordered.
TargetInstance
  valid : Boolean
[read-only] Boolean indicating whether the content is valid
TargetInstance
Public Methods
 MethodDefined By
  
TargetInstance(targetData:com.adobe.icc.dc.data:TargetData, reloadTarget:com.adobe.icc.dc.data.reload:ReloadTarget = null)
Constructor.
TargetInstance
 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
  
addRawModule(dataModule:DataModule, position:int = -1):IModuleInstance
Inserts the specified raw DataModule into the list's contents as extra selected content if list is open.
TargetInstance
 Inherited
Dispatches an event into the event flow.
EventDispatcher
 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
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
  
moveContent(sourceModule:IModuleInstance, moveUp:Boolean):void
Moves the specified item within the list's content one position in the specified direction.
TargetInstance
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
Refresh should be called when item is selected.
TargetInstance
  
Removes the specified item from the list's collection if the item is found in the collection and is non mandatory
TargetInstance
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
  
The function checks for the valid state of the Module instances and accordingly updates the valid flag.
TargetInstance
 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
  
Everytime when contentVariables list is updated, it removes variable change listeners in old varaibleInstance and add variable change listeners in new variableInstance.
TargetInstance
Events
 Event Summary Defined By
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active.EventDispatcher
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive.EventDispatcher
Property Detail

allowFreeText

property
allowFreeText:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

True if the free text can be added to target instance.



Implementation
    public function get allowFreeText():Boolean

contents

property 
contents:IList  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

List of the contents associated with this Container instance.

This property can be used as the source for data binding. When this property is modified, it dispatches the propertyChange event.



Implementation
    public function get contents():IList

contentVariables

property 
contentVariables:IList  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

Bindable/Read-only. The set of active variables for the module. Empty if there are none.

This property can be used as the source for data binding. When this property is modified, it dispatches the propertyChange event.



Implementation
    public function get contentVariables():IList

formSomExpression

property 
formSomExpression:String  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

The SOM Expression of the target.



Implementation
    public function get formSomExpression():String

hasContentRemoved

property 
hasContentRemoved:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

True if the Target has one or more content removed from it, than what was originall assigned. [Relevant when reloading]



Implementation
    public function get hasContentRemoved():Boolean

isNewTarget

property 
public var isNewTarget:Boolean = false

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

[Applicable during reload] True if this is a new container target, that did not exist when the Letter was submitted.

The default value is false.

name

property 
name:String  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

The name of the target.



Implementation
    public function get name():String

open

property 
open:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

True if the container is open to extra content; false if it only allows content that was explicitly assigned to it in the letter.



Implementation
    public function get open():Boolean

order

property 
order:int  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

The target's depth-first order.



Implementation
    public function get order():int

ordered

property 
ordered:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

True if the container's contents order is fixed; false if its contents can be re-ordered.



Implementation
    public function get ordered():Boolean

valid

property 
valid:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

Boolean indicating whether the content is valid

This property can be used as the source for data binding. When this property is modified, it dispatches the validChange event.



Implementation
    public function get valid():Boolean
Constructor Detail

TargetInstance

()Constructor
public function TargetInstance(targetData:com.adobe.icc.dc.data:TargetData, reloadTarget:com.adobe.icc.dc.data.reload:ReloadTarget = null)

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

Constructor.

Parameters
targetData:com.adobe.icc.dc.data:TargetData — The TargetData object associated with this TargetInstance.
 
reloadTarget:com.adobe.icc.dc.data.reload:ReloadTarget (default = null) — Reload Target for the case of correspondence reload.
Method Detail

addRawModule

()method
public function addRawModule(dataModule:DataModule, position:int = -1):IModuleInstance

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

Inserts the specified raw DataModule into the list's contents as extra selected content if list is open.

Parameters

dataModule:DataModule — dataModule The module to select/insert.
 
position:int (default = -1) — The absolute position at which to insert the module into the contents list. The dataModule becomes the new element at that position in the list. If position is less than zero or beyond the end of the list, the content is appended. If the list is fixed-order, then module is appended at end.

Returns
IModuleInstance

moveContent

()method 
public function moveContent(sourceModule:IModuleInstance, moveUp:Boolean):void

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

Moves the specified item within the list's content one position in the specified direction.

Parameters

sourceModule:IModuleInstance — The item to move.
 
moveUp:Boolean — True to move up, false to move down.

refresh

()method 
public function refresh():void

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

Refresh should be called when item is selected. This is useful in case when the the item is deselcted. In that case, if there is any change in variable value/ field value etc., those changes may not be propagated to module.

removeContent

()method 
public function removeContent(sourceModule:IModuleInstance):void

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

Removes the specified item from the list's collection if the item is found in the collection and is non mandatory

Parameters

sourceModule:IModuleInstance — The item to be removed.

setContentVariables

()method 
protected function setContentVariables(value:IList):void

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

Everytime when contentVariables list is updated, it removes variable change listeners in old varaibleInstance and add variable change listeners in new variableInstance.

Parameters

value:IList — The list of VariableInstance objects.

validate

()method 
public function validate():void

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

The function checks for the valid state of the Module instances and accordingly updates the valid flag.