Class ScreenTableHelper
Object
|
+--ScreenTableHelper
- class
ScreenTableHelper
Helper class that can be used in order to relieve the framework
from searching throughout the page DOM for the HTML cells that make up
a screen table.
When a data table is brought to "running" state through PushPage.addTable(), the screen table to be used to display its values
is also determined, based on the supplied id. This requires a search
throughout the page DOM for all the HTML cells that declare the
specified id as their screen table id. This search operation may be
inefficient.
If, however, a ScreenTableHelper instance for the specified screen
table id has been created, populated and notified through PushPage.addScreenTableHelper(), then the cell pointers provided to this
helper are used and no search is performed.
Hence, using helper objects is recommended when a huge number
of PushPage.addTable() calls is performed and populating the
helper objects can be made in an efficient way.
Dynamically changing screen tables are supported. When new HTML
cells are created for a screen table, their pointers can be added
through the addCell() method. HTML cells that are removed from
the page, on the other hand, don't need to be notified. Note, however,
that the HTML cells, once attached to the page, can only be accessed
by Lightstreamer. So, they are bound to their screen table until they
are detached from the page. Also note that the cell pointers used to
populate the helper object can no longer be used afterwards. Detaching
a cell from the page should only be performed by removing its parent
node.
The ScreenTableHelper helper can only be used with basic screen
tables, that is, screen tables suitable for association to
OverwriteTable, ScrollTable or MetapushTable
data tables.
Defined in lspushpage.js
|
Constructor Summary |
ScreenTableHelper
(<String> id, <Array> tableCells)
Creates a helper object that collects all the pointers to the cells
that make up a screen table.
|
|
Method Summary |
void
|
addCell(<DOMElement> cellElement)
Operation method that adds an HTML cell pointer to a screen table
helper.
|
ScreenTableHelper
ScreenTableHelper(<String> id, <Array> tableCells)
Creates a helper object that collects all the pointers to the cells
that make up a screen table.
Parameters:
tableCells - An array that contains the DOM pointers to the HTML cells that currently make up the screen table. A null value is allowed, as addCell() can be used as an alternative way to populate the object.
The specified HTML cells should be "legal" cells for the screen table with the specified id (i.e. should be defined according with the requirements for the cells of that screen table).
addCell
void addCell(<DOMElement> cellElement)
Operation method that adds an HTML cell pointer to a screen table
helper.
Lifecycle: Cell pointers can be added to the related
screen table helper at any time.
However, if a pointer is added while the screen table is currently
associated to a data table in "running" state, then it will not be used
until the next association of a data table (possibly the same) to the
screen table through a new PushPage.addTable() call.
Parameters:
cellElement - A DOM pointer to an HTML cell. The specified HTML cell should be a "legal" cell for the managed screen table (i.e. should be defined according with the requirements for the cells of that screen table).
Lightstreamer Web Client API
Documentation generated by
JSDoc on Wed Mar 5 11:49:21 2008