Web Client 4.3

Class MultiDynaMetapushTable

Object
   |
   +--Table
         |
         +--VisualTable
               |
               +--DynaMetapushTable
                     |
                     +--MultiDynaMetapushTable

class MultiDynaMetapushTable
extends DynaMetapushTable


A data table that can be fed with real-time data delivered by Lightstreamer Server and displayed into a screen table according to ADD, UPDATE and DELETE commands received as pushed values, which instruct the data table to either add a row, just modify values on a row or delete a row. However, the values for each data table row are provided:

In synthesis, each time a new row is created, an underlying data table is also created and subscribed automatically to feed fields not handled by the first-level updates. This table is a mono-item table, where the item name that is used is the key value associated to the row. The item is subscribed to in "MERGE" mode, with snapshot request and with the same maximum frequency setting as for the first-level items (including the "unfiltered" case). All other subscription properties are left as the default. When the row is deleted, the underlying data table is also removed.
We call this a "MultiMetapush logic" behaviour, which is hence a two-level extension of the "COMMAND logic" behavior.
The class contains the subscription details and the event handlers needed to allow Lightstreamer to manage both first-level and second-level items and to display the real-time data.
A screen table suitable for the visualization of pushed values is dynamically maintained by Lightstreamer, starting from an HTML hidden template row, containing cells. The template row can be provided as any HTML element owning the "source='Lightstreamer'" special attribute, while the element "ID" attribute defines the screen table id. The association is made when the data table is brought to the "running" state, through the identifier supplied to PushPage.addTable(), that must match the screen table id. The contained cells are defined as DIV or SPAN elements owning the "source='Lightstreamer'" special attribute, together with a "field" attribute.
For each pushed update, the involved row is determined and each value is displayed in a cell that is associated to the involved row and field. If necessary, new rows are cloned from the hidden template and attached after it, or existing rows are dropped. The cell/field association depends on the value specified in the "field" attribute of each cell, which should be a valid field descriptor. Only one cell for each field is supported in the template.
Note: The template element can contain an arbitrary HTML structure and should contain HTML cells to be used to display the row field values. However, it should not contain elements to which an ID has been assigned, because the elements will be cloned and the HTML specification prescribes that an ID must be unique in the document. (The ID of the template element, required by Lightstreamer, is not cloned).
More visualization actions can be performed through the provided event handlers.
Note: Using MultiDynaMetapushTable requires that the client browser supports DOM level 1 functions.
See:Defined in lspushpage.js


Constructor Summary
MultiDynaMetapushTable (<GroupDescriptor> tGroup, <SchemaDescriptor> tSchema, <String> tSubscriptionMode, <SchemaDescriptor> tUnderSchema)
            Creates an object to be used to describe a data table to be managed with a "MultiMetapush logic" behaviour.
 
Method Summary
 void setUnderDataAdapter(<String> dataAdapter)
           Setter method that sets the name of the underlying Data Adapter (within the Adapter Set used by the current session) that supplies all the second-level items.
 
Methods inherited from class DynaMetapushTable
setMetapushFields, setMetapushSort, getMetapushSortField, getMetapushSortFieldName, isDescendingSort, isNumericSort, isCommaAsDecimalSeparator, setMaxDynaRows, getMaxDynaRows, setAutoScroll, goToPage, getDisplayedPage, getCurrentPages, onChangingValues, onCurrentPagesChanged
   
Methods inherited from class VisualTable
setPushedHtmlEnabled, isPushedHtmlEnabled, setClearOnDisconnected, setClearOnRemove, setClearOnAdd, showValues
   
Methods inherited from class Table
setItemsRange, setSnapshotRequired, setRequestedMaxFrequency, setRequestedBufferSize, setSelector, setDataAdapter, getId, getClassName, onItemUpdate, onLostUpdates, onEndOfSnapshot, onStart
 

Constructor Detail

MultiDynaMetapushTable

MultiDynaMetapushTable(<GroupDescriptor> tGroup, <SchemaDescriptor> tSchema, <String> tSubscriptionMode, <SchemaDescriptor> tUnderSchema)

Method Detail

setUnderDataAdapter

void setUnderDataAdapter(<String> dataAdapter)

Web Client 4.3

Lightstreamer Web Client API
Documentation generated by JSDoc on Fri Sep 19 14:49:42 2008