RecordWidget

parasql.widget. RecordWidget

Used for working with editable data. A Record widget may have multiple Record widgets nested within it.

Extends

Methods

addIndividualRecord()

Clears any existing records and creates a new single record.

Description:
  • Clears any existing records and creates a new single record.

addRecordAtBottom()

Adds a new record after the last record in the list.

Description:
  • Adds a new record after the last record in the list.

addRecordAtTop()

Adds a new record before the first record in the list.

Description:
  • Adds a new record before the first record in the list.

clearRecords()

Clears all rows in this.dataTable.

Description:
  • Clears all rows in this.dataTable. If the transaction set is dirty the user is prompted to save before clearing.

Inherited From:

clearRecordsDiscardChanges()

Clears all rows in this.dataTable.

Description:
  • Clears all rows in this.dataTable. If the transaction set is dirty the changes are silently discarded.

Inherited From:

discardChanges()

Discards the changes for this RecordWidget and all children.

Description:
  • Discards the changes for this RecordWidget and all children. Silently ignored if this RecordWidget is not the root data widget.

getActiveQuery() → {parasql.widget.util.Query}

Inherited From:
Returns:

Returns the currently active query object, or null if there is no active query.

Type
parasql.widget.util.Query

getDataTable() → {parasql.schema.DataTable}

Inherited From:
Returns:

The DataTable containing the data for this object.

Type
parasql.schema.DataTable

getFirstValue(tableName, columnName) → (nullable) {parasql.schema.DataValue}

Inherited From:
Parameters:
Name Type Description
tableName string
columnName string
Returns:

Returns the value of the specified field in the first visible record, or null if there is no such record. The first visible record is determined by this object's cursor and may NOT be the first row in the underlying data table if this is a child DataWidget.

Type
parasql.schema.DataValue

getQueries() → {Array.<parasql.widget.util.Query>}

You can change the active query via the setActiveQuery() method.

Description:
  • You can change the active query via the setActiveQuery() method.

Inherited From:
Returns:

Returns the array of Query objects owned by this DataWidget.

Type
Array.<parasql.widget.util.Query>

getQueryById(queryId) → (nullable) {parasql.widget.util.Query}

Inherited From:
Parameters:
Name Type Description
queryId string
Returns:

Returns the Query object with the specified queryId, or null if no query with that ID exists.

Type
parasql.widget.util.Query

getQueryByName(queryName) → (nullable) {parasql.widget.util.Query}

Inherited From:
Parameters:
Name Type Description
queryName string
Returns:

Returns the Query object with the specified queryName, or null if no query with that name exists.

Type
parasql.widget.util.Query

getSelectedRowIndex() → {number}

Inherited From:
Returns:

Returns the index of the currently selected row; if no row is selected returns -1. The first row is 0.

Type
number

getTransactionSet() → {parasql.schema.TransactionSet}

Inherited From:
Returns:
Type
parasql.schema.TransactionSet

getWidgetId() → (non-null) {string}

Inherited From:
Returns:

Returns an immutable string that uniquely identifies this widget.

Type
string

insertRecordAt(index)

Inserts a record at the specified index.

Description:
  • Inserts a record at the specified index.

Parameters:
Name Type Description
index number

The location to add the record. The first record is 0.

isDisabled() → {boolean}

Inherited From:
Returns:
Type
boolean

printWidget()

Causes this widget to print itself.

Description:
  • Causes this widget to print itself.

Inherited From:

redisplay()

Redisplays this widget.

Description:
  • Redisplays this widget.

Inherited From:

refreshQuery()

Executes the currently active query.

Description:
  • Executes the currently active query. To change the active query call the setActiveQuery() method.

Inherited From:

saveRecords()

Saves any changes made to the DataTable of this RecordWidget and its child data objects.

Description:
  • Saves any changes made to the DataTable of this RecordWidget and its child data objects.

setActiveQuery(queryObject)

Sets the active query but does not run it.

Description:
  • Sets the active query but does not run it. To run the active query call the refreshQuery() method.

Inherited From:
Parameters:
Name Type Description
queryObject parasql.widget.util.Query

A valid query object.

setDisabled(flag)

WARNING: Subclasses overriding this method must not trigger a redisplay (causes an infinite loop).

Description:
  • WARNING: Subclasses overriding this method must not trigger a redisplay (causes an infinite loop).

Inherited From:
Parameters:
Name Type Description
flag boolean

If true, this widget will be rendered as disabled.

setSelectedRowIndex(index)

Inherited From:
Parameters:
Name Type Description
index number

The index of the row to select; the first row is 0. A value of -1 causes no row to be selected.