Main Page | Packages | Class Tree | Index | Help

xp.events

class ModelChangedEvent

Object
  |
  +--xp.events.Event
        |
        +--xp.events.ModelChangedEvent

All Known Subclasses: XMLModelChangedEvent

class ModelChangedEvent
extends Event

Broadcast when items in the collection have been modified in some way.

Event; broadcast when the collection changes in some way—for example, when items are removed or added to the collection, when the value of an item’s property changes, or when the collection is filtered or sorted.


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary


eventName: String
A string that describes the change that took place.


fieldName: String
The name of the field this event is related to. Only set for updateField.


firstItem: Number
The index (number) of the first item in the collection that was affected by the change.


lastItem: Number
The index (number) of the last item in the collection that was affected by the change (equals firstItem if only one item was affected).


subtype
Deprecated. 


type: String
The type of event, the string "modelChanged".

Fields inherited from class xp.events.Event

bubbles, cancel, currentTarget, handled, target, type

Constructor

public
ModelChangedEvent ( eventName: String, firstItem: Number, lastItem: Number, fieldName: String)
Constructs a new ModelChanged event



Field Documentation

eventName

var eventName: String
A string that describes the change that took place.

This can be one of the following values:
"addItems" A series of items has been added.
"filterModel" The model has been filtered, and the view needs refreshing (reset scroll position).
"removeItems" A series of items has been deleted.
"schemaLoaded" The fields definition of the data provider has been declared.
"sort" The data has been sorted.
"updateAll" The entire view needs refreshing, excluding scroll position.
"updateColumn" An entire field’s definition in the data provider needs refreshing.
"updateField" A field in an item has been changed and needs refreshing.
"updateItems" A series of items needs refreshing.

fieldName

var fieldName: String
The name of the field this event is related to. Only set for updateField.

firstItem

var firstItem: Number
The index (number) of the first item in the collection that was affected by the change.

lastItem

var lastItem: Number
The index (number) of the last item in the collection that was affected by the change (equals firstItem if only one item was affected).

subtype

var subtype
Deprecated. 

A string that describes the change that took place.

type

var type: String
The type of event, the string "modelChanged".


Constructor Documentation

ModelChangedEvent

public function ModelChangedEvent(eventName: String,
 firstItem: Number,
 lastItem: Number,
 fieldName: String)
Constructs a new ModelChanged event

Broadcast when items in the collection have been modified in some way.

Parameters:
eventName
A string that describes the change that took place.
firstItem
The index (number) of the first item in the collection that was affected by the change.
lastItem
The index (number) of the last item in the collection that was affected by the change (equals firstItem if only one item was affected).
fieldName
The name of the field this event is related to. Only set for updateField.

The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc