Packagecom.lightstreamer.as_client.events
Classpublic class NonVisualItemUpdateEvent
InheritanceNonVisualItemUpdateEvent Inheritance TableItemEvent Inheritance TableEvent Inheritance flash.events.Event

Dispatched whenever an update pertaining to an item in the NonVisualTable reaches the client. It reports all the new and old values of the fields, though it does not allow you to alter the values received from the Server.
If the involved table behaves with a "COMMAND logic", then the old values for the current update are meant as relative to the same key.
Moreover, if the involved table behaves in "MultiMetapush logic", then each update may be associated with either a first-level or a second-level item. In this case, the reported fields are always the union of the first-level and second-level fields and each single update can only change either the first-level or the second-level fields (but for the "command" field, which is first-level and is always set to "UPDATE" upon a second-level update); note that the second-level field values are always null until the first second-level update occurs).
With "MultiMetapush logic" behaviour, in all methods where a field descriptor has to be supplied, the following convention should be followed:



Public Properties
 PropertyDefined by
 Inheriteditem : *
The item name or item index which this event is related to.
TableItemEvent
 Inheritedtable : Table
The table which this event is related to.
TableEvent
Public Methods
 MethodDefined by
  
getFieldValue(field:*):*
Inquiry method that gets the new value for a specified field, as received from the Server with the current update or "UNCHANGED" if the field is not changed.
NonVisualItemUpdateEvent
  
getNumFields():uint
Inquiry method that gets the number of fields received from the Server with the current update.
NonVisualItemUpdateEvent
  
getOldFieldValue(field:*):*
TODO commento
NonVisualItemUpdateEvent
  
isFieldChanged(field:*):Boolean
Inquiry method that asks whether the value for a field is changed after the reception of an update from the Server for an item.
NonVisualItemUpdateEvent
Public Constants
 ConstantDefined by
  NON_VISUAL_ITEM_UPDATE : String = "nonVisualItemUpdate"
[static] Define the value of the type property of a NonVisualItemUpdate event object.
NonVisualItemUpdateEvent
Method detail
getFieldValue()method
public function getFieldValue(field:*):*

Inquiry method that gets the new value for a specified field, as received from the Server with the current update or "UNCHANGED" if the field is not changed.

Parameters
field:* — String field name or a Number representing a field position.

Returns
* — "UNCHANGED" if the value is unchanged, the received value otherwise. TODO
getNumFields()method 
public function getNumFields():uint

Inquiry method that gets the number of fields received from the Server with the current update. The value, however, is the same across all updates pertaining to the same item, because it is determined by the schema associated to the item at subscription. The fields received from the Server are always associated to consecutive field numbers starting from 1.
Only in case the related data table behaves in "MultiMetapush logic", it may not be possible to determine the correct number of fields of the data table. This only happens when a schema identifier is used as the schema descriptor for the second-level schema and no update for any second-level item has been received yet.

Returns
uint — The number of fields received from the Server, or 0 if the total number of fields cannot be determined (see above).
getOldFieldValue()method 
public function getOldFieldValue(field:*):*

TODO commento

Parameters
field:*

Returns
*
isFieldChanged()method 
public function isFieldChanged(field:*):Boolean

Inquiry method that asks whether the value for a field is changed after the reception of an update from the Server for an item.

Parameters
field:* — String field name or a Number representing a field position.

Returns
Boolean — true if the value is changed; false otherwise.
Constant detail
NON_VISUAL_ITEM_UPDATEconstant
public static const NON_VISUAL_ITEM_UPDATE:String = "nonVisualItemUpdate"

Define the value of the type property of a NonVisualItemUpdate event object.