HTML Client 5.0.1

Class UpdateItemInfo

Object
   |
   +--UpdateItemInfo

class UpdateItemInfo


Contains all the information related to an update of the field values for an item. It reports all the new and old values of the fields and allows you to add extra fields to the update, 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:


The class constructor, its prototype and any other properties should never be used directly; actually, UpdateItemInfo is not even defined as a global name.
Defined in lspushpage.js

See:


Constructor Summary
UpdateItemInfo ()
            Used by Lightstreamer to provide a value object to each call of the Table.onItemUpdate() event handler.
 
Method Summary
 void addField(<FieldDescriptor> field, <String> value, <boolean> remember)
           Operation method that adds an internally computed extra field to the fields received from the Server for an item.
 void forEachChangedField(<Function> iterator)
           Registers an iterator function that will be called once per each field changed with the last server update.
 String getNewValue(<FieldDescriptor> field)
           Inquiry method that gets the new value for a specified field, as received from the Server with the current update or as previously set, in case an extra field is specified.
 Number getNumFields()
           Inquiry method that gets the number of fields received from the Server with the current update.
 String getOldValue(<FieldDescriptor> field)
           Inquiry method that gets the previous value for a specified field, after the reception of an update from the Server for an item.
 boolean isSnapshot()
           Inquiry method that asks whether the current update belongs to the item snapshot (which carries the current item state at the time of subscription).
 boolean isValueChanged(<FieldDescriptor> field)
           Inquiry method that asks whether the value for a field has changed after the reception of an update from the Server for an item.

Constructor Detail

UpdateItemInfo

UpdateItemInfo()

Method Detail

addField

void addField(<FieldDescriptor> field, <String> value, <boolean> remember)

forEachChangedField

void forEachChangedField(<Function> iterator)

getNewValue

String getNewValue(<FieldDescriptor> field)

getNumFields

Number getNumFields()

getOldValue

String getOldValue(<FieldDescriptor> field)

isSnapshot

boolean isSnapshot()

isValueChanged

boolean isValueChanged(<FieldDescriptor> field)

HTML Client 5.0.1

Lightstreamer HTML Client API
Documentation generated by JSDoc on Tue May 22 11:46:54 2012