Class $k.TableConfiguration
Configuration of a table
- Defined in: TableConfiguration.js
- Extends: $k.AbstractEditorConfiguration
Constructor Attributes | Constructor Name and Description |
---|---|
Method Summary
Class Detail
$k.TableConfiguration()
Method Detail
-
{object[]} columns()Returns the columns of the table
- Returns:
- {object[]}
-
Filters the elements by the given column values
configuration.filter(elements, [ {column: "familyName", value: "Doe" }])
- Parameters:
- {$k.SemanticElement[]} elements
- {object[]} filterDescriptions
- Column index/name and value
- {boolean} disableInheritance Optional
- True if the query should only match direct instances/subtypes
- Throws:
- {$k.exception.InvalidValue}
- If the filter values are invalid
- {$k.exception.MissingParameter}
- If the filter value for a column is missing
- {$k.exception.QueryError}
- If filtering was not possible
- Returns:
- {$k.SemanticElement[]} The filtered elements
-
Returns the table confguration for the domain and the optional context)
- Parameters:
- {$k.Domain[]} domain
- Domain of the table
- {$k.SemanticElement} context Optional
- Context of the configuration
- Returns:
- {$k.TableConfiguration}
-
Returns the confguration defined by the element
- Parameters:
- {$k.SemanticElement} configurationElement
- The configuration element
- Returns:
- {$k.TableConfiguration}
-
{object[]} render(elements, keyFilter)Renders the elements as literal objects
- Parameters:
- {$k.SemanticElement[]} elements
- {object} keyFilter Optional
- A filter that defines which property names that are included.
{"exclude": ["key1", ...]}
includes all but the listed properties, while{"include": ["key1", ...]}
or["key1", ...]
includes only the listed properties.
Non-optional properties are always included
- Returns:
- {object[]} The rendered objects
-
{object} renderJSON(elements, excludedKeys)Render the elements as a JSON object
- Deprecated:
-
Use
render(elements, {"exclude": excludedKeys})
instead
- Parameters:
- {$k.SemanticElement[]} elements
- {string[]} excludedKeys Optional
- Collection of property names that are excluded
- Returns:
- {object} The rendered JSON object
-
Find the elements by the given column values
configuration.search([ {column: "dateOfBirth", value: "1970", operator: "less" }])
- Parameters:
- {$k.Domain} domain
- Domain of the table
- {object[]} filterDescriptions
- Column index/name and value
- {boolean} disableInheritance Optional
- True if the query should only match direct instances/subtypes
- Throws:
- {$k.exception.InvalidValue}
- If the filter values are invalid
- {$k.exception.MissingParameter}
- If the filter value for a column is missing
- {$k.exception.QueryError}
- If filtering was not possible
- Returns:
- {$k.SemanticElement[]}
-
Returns the elements sorted by the given columns and sort orders
configuration.sort(elements, [ {column: "familyName", ascending: false }, {column: "givenName" }])
- Parameters:
- {$k.SemanticElement[]} semanticElements
- {object[]} sortDescriptions
- Column index/name and optional sort order (ascending)
- Returns:
- {$k.SemanticElement[]} The sorted elements
-
{object[]} sortDescriptions()Returns the configured sort descriptions of the table
- Returns:
- {object[]}