DataTable

App.dataTable. DataTable

new DataTable(input)

To create an instance, use factory method App.dataTable.create

Parameters:
Name Type Description
input

Methods

addRow()

Adds a row to the table based on the passed in data.

adjustModalTableContent()

tableui.js

alignTable()

tableui.js

cellRenderer()

See https://datatables.net/reference/option/columns.render#function

dataHandler(row, type, meta)

See https://datatables.net/reference/option/columns.data#function

Called when to get/set data from a cell.

Parameters:
Name Type Description
row

The current row

type

set or get

meta

Meta data for the data-table

destroy()

Destroys datatable widget instance

expandAndFindRow(objectId, parentIdopt)

Finds the passed in objectId's structure table row among the parent or selected rows' children

Parameters:
Name Type Attributes Default Description
objectId string

Child row to find

parentId string <optional>
First selected object

Parent row to look under (optional), will default to first selected object

exportToCsv()

Export table to CSV

exportToExcel()

Export table to excel

exportToPdf()

Export table to PDF

getAddColumnService()

Adds new column to the table

getMode()

Returns the mode: "VIEW" if no cell is being edited, otherwise "EDIT"

getRenderedRowCount() → {number}

Returns number of rows currently rendered in the table (includes pagination)

Returns:
Type
number

getSelectedObjectIds() → {Array}

Returns a list of currently selected object ids in the table

Returns:

selected object ids or []

Type
Array

loadDataFromSearch(query) → {promise}

Peforms search and loads data into datatable

Parameters:
Name Type Description
query array

search criteria *

Returns:

search promise

Type
promise

performSearch(value)

Searches datatable for value and redraws table with matched criteria

Parameters:
Name Type Description
value string

search criterion

reloadContent()

Reloads the table content

removeSelectedRows()

Remove the selected rows from datatable

selectedObjects() → {Object}

Returns the current selected rows as objects from the client store

Returns:

An object with objectIds as keys and the 'data' property containing the object data

Type
Object

selectedRows() → {Array.<Object>}

Returns the current selected rows.

Returns:

An array containing objects representing the current selected rows

Type
Array.<Object>

toggleAll(markAll)

Parameters:
Name Type Default Description
markAll boolean false

Determines if items in the data is selected or unselected. Passing true will select all items.

updateTableBeanOnServer()

Synch table bean with the one received from client