Packagecom.endeca.tools.pagebuilder.events
Classpublic class ContentModelEvent
InheritanceContentModelEvent Inheritance flash.events.Event

Indicates that a change has occured in the Editor API content model.

See also

ContentModelEventKind


Public Properties
 PropertyDefined by
  items : Array
[read-only] When the kind is ContentModelEventKind.ADD or ContentModelEventKind.REMOVE the items property is an Array of added/removed items.
ContentModelEvent
  kind : String
Indicates the kind of event that occurred.
ContentModelEvent
  location : int
[read-only] When the kind value is ContentModelEventKind.ADD, ContentModelEventKind.MOVE, ContentModelEventKind.REMOVE, or ContentModelEventKind.REPLACE, this property is the zero-base index in the collection of the item(s) specified in the items property.
ContentModelEvent
  newValue : Object
When the kind value is ContentModelEventKind.UPDATE, this is the value of the property after the change.
ContentModelEvent
  oldLocation : int
[read-only] When the kind value is ContentModelEventKind.MOVE, this property is the zero-based index in the target collection of the previous location of the item(s) specified by the items property.
ContentModelEvent
  oldValue : Object
When the kind value is ContentModelEventKind.UPDATE, this is the value of the property before the change.
ContentModelEvent
  property : Object
When the kind value is ContentModelEventKind.UPDATE, this is a String, QName, or int specifying the property that changed.
ContentModelEvent
  source : Object
The object on which the change occured.
ContentModelEvent
Public Methods
 MethodDefined by
  
ContentModelEvent(type:String, kind:String = null, collectionEvent:CollectionEvent = null, property:Object = null, oldValue:Object = null, newValue:Object = null, source:Object = null)
Constructor.
ContentModelEvent
  
clone():Event
Creates and returns a copy of this event.
ContentModelEvent
  
[static] Returns a ContentModelEvent of type ContentModelEvent.UPGRADE.
ContentModelEvent
Public Constants
 ConstantDefined by
  CHANGE : String = "contentModelChange"
[static] The ContentModelEvent.CHANGE constant defines the value of the type property of the event object for an event that is dispatched when the content model has changed.
ContentModelEvent
  UPGRADE : String = "contentUpgrade"
[static] The ContentModelEvent.UPGRADE constant defines the value of the type property of the event object for an event that is dispatched when the content model has been upgraded.
ContentModelEvent
Property detail
itemsproperty
items:Array  [read-only]

When the kind is ContentModelEventKind.ADD or ContentModelEventKind.REMOVE the items property is an Array of added/removed items.

When the kind is ContentModelEventKind.REPLACE or ContentModelEventKind.UPDATE the items property is an Array of PropertyChangeEvent objects with information about the items affected by the event.

When a value changes, query the newValue and oldValue fields of the PropertyChangeEvent objects to find out what the old and new values were.

When the kind is ContentModelEventKind.REFRESH, ContentModelEventKind.REMOVE, ContentModelEventKind.RESET, or null this array has zero length.

The default value is [ ].

Implementation
    public function get items():Array

See also

mx.events.PropertyChangeEvent
ContentModelEventKind
kindproperty 
kind:String  [read-write]

Indicates the kind of event that occurred. The property value can be one of the values in the ContentModelEventKind class, or null, which indicates that the kind is unknown.

The default value is null.

Implementation
    public function get kind():String
    public function set kind(value:String):void

See also

locationproperty 
location:int  [read-only]

When the kind value is ContentModelEventKind.ADD, ContentModelEventKind.MOVE, ContentModelEventKind.REMOVE, or ContentModelEventKind.REPLACE, this property is the zero-base index in the collection of the item(s) specified in the items property.

The default value is -1.

Implementation
    public function get location():int

See also

newValueproperty 
newValue:Object  [read-write]

When the kind value is ContentModelEventKind.UPDATE, this is the value of the property after the change.

The default value is null.

Implementation
    public function get newValue():Object
    public function set newValue(value:Object):void

See also

oldLocationproperty 
oldLocation:int  [read-only]

When the kind value is ContentModelEventKind.MOVE, this property is the zero-based index in the target collection of the previous location of the item(s) specified by the items property.

The default value is -1.

Implementation
    public function get oldLocation():int

See also

oldValueproperty 
oldValue:Object  [read-write]

When the kind value is ContentModelEventKind.UPDATE, this is the value of the property before the change.

The default value is null.

Implementation
    public function get oldValue():Object
    public function set oldValue(value:Object):void

See also

propertyproperty 
property:Object  [read-write]

When the kind value is ContentModelEventKind.UPDATE, this is a String, QName, or int specifying the property that changed.

The default value is null.

Implementation
    public function get property():Object
    public function set property(value:Object):void

See also

sourceproperty 
source:Object  [read-write]

The object on which the change occured.

The default value is null.

Implementation
    public function get source():Object
    public function set source(value:Object):void
Constructor detail
ContentModelEvent()constructor
public function ContentModelEvent(type:String, kind:String = null, collectionEvent:CollectionEvent = null, property:Object = null, oldValue:Object = null, newValue:Object = null, source:Object = null)

Constructor.

Parameters
type:String — The event type; indicates the action that triggered the event.
 
kind:String (default = null) — Indicates the kind of event that occured. The parameter value can be one of the values in the ContentModelEventKind class, or null, which indicates that the kind is unknown.
 
collectionEvent:CollectionEvent (default = null) — If this ContentModelEvent was caused by a change in a collection, the resulting CollectionEvent may be used to initialize this event.
 
property:Object (default = null) — When the kind value is ContentModelEventKind.UPDATE, this is a String, QName, or int specifying the property that changed.
 
oldValue:Object (default = null) — When the kind value is ContentModelEventKind.UPDATE, this is the value of the property before the change.
 
newValue:Object (default = null) — When the kind value is ContentModelEventKind.UPDATE, this is the value of the property after the change.
 
source:Object (default = null) — The object on which the change occured.

See also

QName
mx.events.CollectionEvent
mx.events.PropertyChangeEvent
Method detail
clone()method
public override function clone():Event

Creates and returns a copy of this event.

Returns
Event — The copy
createContentModelUpgradeEvent()method 
public static function createContentModelUpgradeEvent(source:Object):ContentModelEvent

Returns a ContentModelEvent of type ContentModelEvent.UPGRADE.

Parameters
source:Object — The object on which the upgrade occured.

Returns
ContentModelEvent
Constant detail
CHANGEconstant
public static const CHANGE:String = "contentModelChange"

The ContentModelEvent.CHANGE constant defines the value of the type property of the event object for an event that is dispatched when the content model has changed.

UPGRADEconstant 
public static const UPGRADE:String = "contentUpgrade"

The ContentModelEvent.UPGRADE constant defines the value of the type property of the event object for an event that is dispatched when the content model has been upgraded.