Class Qww.Table.Mgr
Class to manage communication with a QlikView straight table or table control.
Defined in: <JavaScript\QWW\QwwJs_TableMgr.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Qww.Table.Mgr(cfg)
Constructs a new Qww.Table.Mgr instance.
|
| Field Attributes | Field Name and Description |
|---|---|
|
Caption for text object.
|
|
|
Reference to the configuration object which was used to create construct the object.
|
|
|
Returns the current page number which the TableMgr holds data for.
|
|
|
Whether the table is enabled (visible) within the QlikView application.
|
|
|
Collection of header columns for the table.
|
|
|
Number of rows in the current page of data (note that it may be less than the PageSize if it's the last page of data).
|
|
|
Number of rows in the current page of data (note that it may be less than the PageSize if it's the last page of data).
|
|
|
Page offset of the current page of data.
|
|
|
Number of rows per page of data received for the table.
|
|
|
Total number of rows in the table.
|
| Method Attributes | Method Name and Description |
|---|---|
|
GetRow(rowNumber)
Returns the specified row for the table.
|
|
|
Returns a html string summary of the main properties of the TableMgr.
|
|
|
PageDown()
Moves to the next page of data in the table.
|
|
|
PageUp()
Moves to the previous page of data in the table.
|
|
|
SelectSingleRecord(recordNumber, selectColumn)
Selects a single row and column in the table.
|
|
|
SetInputField(columnIndex, rowIndex, value, isFinal)
Selects a single row and column in the table.
|
|
|
SetPage(pageNumber)
Moves to the page number specified.
|
|
|
Sort(headerSortIndex, resetToFirstPage)
Sort the table data.
|
Class Detail
Qww.Table.Mgr(cfg)
Constructs a new Qww.Table.Mgr instance.
var tblMgr = new Qww.Table.Mgr(
{
// ObjectID of the underlying Table Box
// in QlikView
ObjectID: "TBDEMO_RESULTS",
// The number of results to download for
// each page.
PageSize: 30,
// Function to call whenever the data updates.
OnUpdate: showResults
});
- Parameters:
- {Object} cfg
- JSON object to configure Qww.Table.Mgr.
- {String} cfg.ObjectID
- Id of the table in the QlikView application.
- {String} cfg.ApplicationID Optional, Default: null
- Id/Name of the QlikView application. Note this is only necessary when multiple QlikView documents are being used on the same web page and should otherwise be set to null.
- {Int} cfg.PageSize Optional, Default: 50
- Number of rows to return in a single page of data.
- {Bool} cfg.DoNotInitialise Optional, Default: false
- Set this to false if you do not want this particular object to initialise the underlying object with QlikView Server. Use this option for example if you are already using another object or control which will have already initialised this. In this mode this object will simply parse the existing data for this object as it comese from QlikView Server.
- {Function} cfg.OnUpdate Optional
- Function to call whenever the data is updated.
- Returns:
- {Qww.Table.Mgr} Qww.Table.Mgr
Field Detail
{Qww.ObjectCaption}
Caption
Caption for text object.
{Object}
Cfg
Reference to the configuration object which was used to create construct the object. This
allows certain properties to be updated after initial instantiation.
{Int}
CurrentPage
Returns the current page number which the TableMgr holds data for.
{Bool}
Enabled
Whether the table is enabled (visible) within the QlikView application. This can be dependent,
for example, upon show and hide conditions set for the object in QlikView.
{Qww.Table.Header[]}
Headers
Collection of header columns for the table.
{Int}
NoPages
Number of rows in the current page of data (note that it may be less than the PageSize if it's the last page of data).
{Int}
NoRows
Number of rows in the current page of data (note that it may be less than the PageSize if it's the last page of data).
{Int}
PageOffset
Page offset of the current page of data.
{Int}
PageSize
Number of rows per page of data received for the table.
{Int}
TotalSize
Total number of rows in the table.
Method Detail
{Qww.Table.Row}
GetRow(rowNumber)
Returns the specified row for the table.
- Parameters:
- {Int} rowNumber
- Index of the row in the table to return. Note this row must be present in the current page of data.
- Returns:
- {Qww.Table.Row} Object representing the table row.
GetSummary()
Returns a html string summary of the main properties of the TableMgr.
{Bool}
PageDown()
Moves to the next page of data in the table.
- Returns:
- {Bool} Returns true if the page was changed (if the table was already set to the last page then false will be returned).
{Bool}
PageUp()
Moves to the previous page of data in the table.
- Returns:
- {Bool} Returns true if the page was changed (if the table was already set to the first page then false will be returned).
SelectSingleRecord(recordNumber, selectColumn)
Selects a single row and column in the table. Note the .SelectSingleRecord method of the Qww.Ctls.FlexiGrid.Mgr
delegates to this method when a TableMgr is being used as a dataprovider for the flexi grid.
- Parameters:
- {Int} recordNumber
- Record number to select.
- {Int} selectColumn Optional, Default: 0
- Column to select.
SetInputField(columnIndex, rowIndex, value, isFinal)
Selects a single row and column in the table.
- Parameters:
- {Int} columnIndex
- Column index of input field.
- {Int} rowIndex
- Row index of input field.
- {String|Number} value
- Value to set input field to.
- {Bool} isFinal Optional, Default: true
- If this is the final command in this set to send to QlikView Server. Set this to false if you intend to call some methods on other objects and would like all the commands to be sent in one request.
SetPage(pageNumber)
Moves to the page number specified. Note that the first page is 1.
- Parameters:
- {Int} pageNumber
- Page number to move to.
Sort(headerSortIndex, resetToFirstPage)
Sort the table data.
- Parameters:
- {Int} headerSortIndex
- Column index to sort on.
- {Bool} resetToFirstPage Optional, Default: true
- Whether to reset the view to the first page.
