Methods
(static) forDomain(domain, contextopt) → {$k.TableConfiguration}
Returns the table confguration for the domain and the optional context)
| Name | Type | Attributes | Description |
|---|---|---|---|
domain | $k. | Domain or internal name of a type of the table | |
context | $k. | <optional> | Context of the configuration |
- Since
- 4.1.0
- Type:
- $k.
TableConfiguration
(static) from(configurationElement) → {$k.TableConfiguration}
Returns the confguration defined by the element
| Name | Type | Description |
|---|---|---|
configurationElement | $k. | The configuration element |
- Since
- 4.1.0
- Type:
- $k.
TableConfiguration
columns(domain, contextObjectopt) → {object}
Returns the columns of the table
| Name | Type | Attributes | Description |
|---|---|---|---|
domain | $k. | Domain or internal name of a type of the table | |
contextObject | object | <optional> | JSON render context object |
- Since
- 4.1.0
- Deprecated
- This function is deprecated and might be removed in future releases
- Type:
- object
configElement() → {$k.Instance}
- Since
- 4.1.0
- Type:
- $k.
Instance
createFilterProperties(element)
Create properties for each column with a filter value to the element
| Name | Type | Description |
|---|---|---|
element | $k. |
- Version
- Experimental feature, might be removed at any time
- Since
- 4.1.0
elements(elementsOrQueryopt) → {Array.<$k.SemanticElement>}
Returns the filtered, sorted and paged elements of this table
| Name | Type | Attributes | Description |
|---|---|---|---|
elementsOrQuery | Array.<$k.SemanticElement> | | <optional> | Filter, sort and page elements. Input value can be: elements (no search, only filter, sort and page), a search (search the elements to used) or undefined (Internally, a search with the context object built) |
- Since
- 4.2.0
The filtered, sorted and paged elements
- Type:
- Array.<$k.SemanticElement>
filter(elements, filterDescriptions, disableInheritanceopt) → {Array.<$k.SemanticElement>}
Filters the elements by the given column values
| Name | Type | Attributes | Default | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
elements | Array.<$k.SemanticElement> | |||||||||||||||||||||||
filterDescriptions | Array.<object> | Column filter description objects Properties
| ||||||||||||||||||||||
disableInheritance | boolean | <optional> | false | True if the query should only match direct instances/subtypes |
- Since
- 4.1.0
- See
If the filter values are invalid
If the filter value for a column is missing
If filtering was not possible
The filtered elements
- Type:
- Array.<$k.SemanticElement>
configuration.filter(elements, [ {column: "familyName", value: "Doe" }]) render(elementsopt, keyFilteropt, detailFilteropt) → {Array.<object>}
Renders the elements as literal objects
| Name | Type | Attributes | Description |
|---|---|---|---|
elements | <optional> | Elements, query or undefined | |
keyFilter | object | <optional> | Alternative 1 (preferred): a $k.JSONRenderContext Alternative 2 (compatibility only): A filter. See $k.JSONRenderContext.prototype.setFilters(). |
detailFilter | object | <optional> | Only used if the key filter is not a $k.JSONRenderContext. See $k.JSONRenderContext.prototype.setLevelsOfDetail() |
- Since
- 4.1.0
- Deprecated
- This function is deprecated and might be removed in future releases
The rendered objects
- Type:
- Array.<object>
renderExcel(elements, entity, templateopt, conversionopt, variablesopt)
Renders the elements as an Excel file
| Name | Type | Attributes | Description |
|---|---|---|---|
elements | Array.<$k.SemanticElement> | The elements to render | |
entity | $k. | The render target | |
template | $k. | <optional> | List template |
conversion | $k. | <optional> | The semantic element representing the document conversion |
variables | object | <optional> | Additional variables to pass to the template |
- Version
- Experimental feature, might be removed at any time
- Since
- 4.1.0
When the elements could not be rendered
search(domain, filterDescriptions, disableInheritanceopt) → {Array.<$k.SemanticElement>}
Find the elements by the given column values
| Name | Type | Attributes | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
domain | $k. | Domain or internal name of a type of the table | |||||||||||||||||||||
filterDescriptions | Array.<object> | Column filter description objects Properties
| |||||||||||||||||||||
disableInheritance | boolean | <optional> | True if the query should only match direct instances/subtypes |
- Since
- 4.1.0
If the filter values are invalid
If the filter value for a column is missing
If filtering was not possible
- Type:
- Array.<$k.SemanticElement>
configuration.search([ {column: "dateOfBirth", value: "1970", operator: "less" }]) setContext(contextObject) → {$k.TableConfiguration}
Set the context object
| Name | Type | Description |
|---|---|---|
contextObject | object | Context object |
- Since
- 4.1.0
- Deprecated
- This function is deprecated and might be removed in future releases
- Type:
- $k.
TableConfiguration
setQuery(query)
Set the query that returns the table elements. Note that the query is part of the context and will be overwritten if the context is set with setContext()
| Name | Type | Description |
|---|---|---|
query | $k. |
- Since
- 4.1.0
setRenderContext(renderContextObject)
Set render context
| Name | Type | Description |
|---|---|---|
renderContextObject | object |
- Since
- 5.3.0
- Deprecated
- This function is deprecated and might be removed in future releases
sort(semanticElements, sortDescriptionsopt) → {Array.<$k.SemanticElement>}
Returns the elements sorted by the given columns and sort orders
| Name | Type | Attributes | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
semanticElements | Array.<$k.SemanticElement> | |||||||||||||||||
sortDescriptions | Array.<object> | <optional> | Array of sort description objects. The configured sort order is used if this parameter is undefined. Properties
|
- Since
- 4.1.0
The sorted elements
- Type:
- Array.<$k.SemanticElement>
configuration.sort(elements, [ {column: "familyName", ascending: false }, {column: "givenName" }]) sortDescriptions() → {Array.<object>}
Returns the configured sort descriptions of the table
- Since
- 4.1.0
- Deprecated
- This function is deprecated and might be removed in future releases
- Type:
- Array.<object>
toJSON()
- Deprecated
- This function is deprecated and might be removed in future releases