Extends
Members
(readonly) attributes
- Description:
Returns the object attributes
- Source:
- Inherited From:
Returns the object attributes
(readonly) container
- Description:
The swat object top-level parent, usually a window or dialog object
- Source:
- Inherited From:
The swat object top-level parent, usually a window or dialog object
(readonly) controller :*
- Description:
The object's legacy API controller. Used for JavaScript calls from TypeScript.
- Source:
- Inherited From:
The object's legacy API controller. Used for JavaScript calls from TypeScript.
Type:
- *
Example
window.akioma.myFunction(eventSource.controller);
(readonly) dynObject :*
- Description:
The object's legacy API dynObject. Used for JavaScript calls from TypeScript.
- Source:
- Inherited From:
The object's legacy API dynObject. Used for JavaScript calls from TypeScript.
Type:
- *
Example
window.akioma.myFunction(eventSource.dynObject);
(readonly) hasMessages :boolean
Returns if there are messages from the previous save
Type:
- boolean
(readonly) name :string
- Description:
The object name
- Source:
- Inherited From:
The object name
Type:
- string
(readonly) parent :SwatObject
- Description:
The swat object direct parent
- Source:
- Inherited From:
The swat object direct parent
Type:
refreshSchemePayload
Method used for getting the refresh scheme payload
(readonly) screen
- Description:
The swat object inner screen (container)
- Source:
- Inherited From:
The swat object inner screen (container)
(readonly) topScreen
- Description:
The swat object top screen (container), usually a window or dialog object
- Source:
- Inherited From:
The swat object top screen (container), usually a window or dialog object
type :string
- Description:
Used for retriving the object type
- Source:
- Inherited From:
Used for retriving the object type
Type:
- string
(readonly) window :Window
- Description:
The swat object top-level window object. Note: Desktop windows are windows not frames so the window property of a child object in a desktop window will return the desktop window unlike the container property which will return the main desktop window for the application. Note: If the object is a window then it will returns itself.
- Source:
- Inherited From:
The swat object top-level window object. Note: Desktop windows are windows not frames so the window property of a child object in a desktop window will return the desktop window unlike the container property which will return the main desktop window for the application. Note: If the object is a window then it will returns itself.
Type:
Methods
addFilter(name, operator, value, unique)
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The field name (case-insensitive) |
operator |
string | The filter operator |
value |
string | The filter value |
unique |
boolean | If true, adds a new unique condition that will overwrite any conditions with the same field name. If false, just adds a new condition |
addRecord()
clearFilter()
clearSort()
closeQuery()
deleteRecord(options) → {Promise.<void>}
Parameters:
Name | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | Delete options Properties
|
Returns:
- Type
- Promise.<void>
fetch() → {Promise.<unknown>}
Parameters:
Name | Type | Description |
---|---|---|
opts.repositionTo |
string | The handle used to position a record in Grid. Can be a comma-separated list of handles when using a multiselect Grid. |
Returns:
Returns a promise with the reponse
- Type
- Promise.<unknown>
getBeforeData() → {*}
Returns:
- Type
- *
getCurrentRecord() → {*}
Returns:
Returns the current record
- Type
- *
getData() → {Object}
Returns:
Returns an object containing the locally stored data
- Type
- Object
getFilter(name) → {Array.<Object>|null}
- Description:
Returns the filter conditions from a given field name. (top level AND filter)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The field name (case-insensitive) |
Returns:
- Type
- Array.<Object> | null
getLink(link) → {SwatObject}
- Description:
Gets the object's link source or target object
- Source:
- Inherited From:
Example
myForm.getLink("DISPLAY:SRC")
Parameters:
Name | Type | Description |
---|---|---|
link |
string | The link name separated by ":" and SRC/TRG points e.g. "DATA:TRG" |
Returns:
- Type
- SwatObject
getLinks(link) → {SwatObject}
- Description:
Gets the object's link source or target objects
- Source:
- Inherited From:
Example
myDataSource.getLinks("DISPLAY:TRG")
Parameters:
Name | Type | Description |
---|---|---|
link |
string | The link name separated by ":" and SRC/TRG points e.g. "DATA:TRG" |
Returns:
[]
- Type
- SwatObject
getLoadedRecords() → {*}
Returns:
Returns an array with all the loaded records
- Type
- *
getObject(name) → {SwatObject}
- Description:
Gets a descendant object by name
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The object name (case-insensitive) |
Returns:
- Type
- SwatObject
getSort()
getUpdatedRecords() → {*}
Returns:
Returns an array with all the updated records
- Type
- *
getValue(name) → {*}
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The field name (case-insensitive) |
Returns:
- Type
- *
hasChanges() → {boolean}
Returns:
- Type
- boolean
hasFilter(name, operator, value) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The field name (case-insensitive) |
operator |
string | The filter operator |
value |
string | The filter value |
Returns:
- Type
- boolean
hasFilters(name) → {boolean}
- Description:
Check if there are any filters for a field (top level AND filter)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The field name (case-insensitive) |
Returns:
- Type
- boolean
hasSort(name, direction)
- Description:
Checks if a field (and optional direction) are in the datasource sorting. Returns true if the field exists at any level not just the first level.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
name |
The field name (case-insensitive). If no field name is passed, checks if there is any sorting. |
|
direction |
"asc" for ascending or "desc" for descending. If no direction is passed, check if only field name exists. |
openQuery(callback)
- Description:
Deprecated method to execute the query
- Source:
- Deprecated:
- Use fetch() instead
Parameters:
Name | Type | Description |
---|---|---|
opts.repositionTo |
string | The handle used to position a record in Grid. Can be a comma-separated list of handles when using a multiselect Grid. |
callback |
function | The callback function to be called at the AfterFill event. |
removeFilter(name, operator, value)
- Description:
Removes an existing filter condition (top level AND filter)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The field name (case-insensitive) |
operator |
string | The filter operator |
value |
string | The filter value |
saveRecord() → {Promise.<void>}
Returns:
- Type
- Promise.<void>
setApplyQueryFilters(bApply)
- Description:
Sets the businessEntity to perform queries that include both filters and NamedQuery params
- Source:
Parameters:
Name | Type | Description |
---|---|---|
bApply |
boolean | The parameter that sets the apply all filters flag |
setFilter(name, operator, value, uniqueopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | The field name (case-insensitive) |
|
operator |
string | The filter operator |
|
value |
string | The filter value |
|
unique |
boolean |
<optional> |
If true, adds a new unique condition that will overwrite any conditions with the same field name. If false, just adds a new condition |
setForeignKeys(keys) → {void}
- Description:
Method used for setting the foreign key fields for the dataSource, that will be sent as request payload in GetInitialValues call
- Source:
Parameters:
Name | Type | Description |
---|---|---|
keys |
array | The list of foreign key fields with values |
Returns:
- Type
- void
setNamedQueryParam(query, name, value, type)
Parameters:
Name | Type | Description |
---|---|---|
query |
string | The parameter query name |
name |
string | The parameter field name |
value |
* | The parameter value |
type |
string | The parameter type |
setSort(sortopt)
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
sort |
array |
<optional> |
Properties
|
setValue(name, value, primaryKey) → {*}
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The field name (case-insensitive) |
value |
value | The value of the field |
primaryKey |
any | The value corresponding to the KeyField attribute; used to uniquely identify the record for which to set the new value; optional |
Returns:
- Type
- *