new CollectionView()
A view built with/by view configuration for a collection of elements, such as a Query or a Table
Extends
Methods
(static) fromTableConfig(tableConfiguration) → {$k.TableConfiguration}
Name | Type | Description |
---|---|---|
tableConfiguration | $k.TableConfiguration | A table configuration |
- Version
- Experimental feature, might be removed at any time
- Since
- 5.2.1
- Type:
- $k.TableConfiguration
configurationElement() → {$k.SemanticElement}
Get configuration element
- Since
- 5.2.0
- Inherited From
- Type:
- $k.SemanticElement
domainModel() → {object}
Get domain model
- Since
- 5.4.0
- Inherited From
SemanticElement or TopicCollection
- Type:
- object
elements() → {Array.<$k.SemanticElement>}
Get an array of semantic elements. Use this e.g. for a table result.
- Since
- 5.2.1
- Type:
- Array.<$k.SemanticElement>
getPanelsToActivate()
Get the panel configurations activated by the current action.
Only supported in the following application environment(s): View-Configuration-Mapper
- Since
- 5.3.2
- Inherited From
- Deprecated
- Use the corresponding function of the action
getVariable(variable)
get the value of the given variable
Name | Type | Description |
---|---|---|
variable | string |
- Inherited From
(arrays of) SemanticElements and timestamps are auto-converted to native form
hit(element) → {$k.Hit}
Get the corrresponding hit for the given element if this view holds a collection of hits and if the element was part of the result - otherwise return undefined.
Name | Type | Description |
---|---|---|
element | $k.SemanticElement | The element for which a hit shall be found. |
- Since
- 5.3.0
- Type:
- $k.Hit
hits() → {Array.<$dom.Element>}
Get an array hits. Use this e.g. for a table result.
- Since
- 5.2.1
- Type:
- Array.<$dom.Element>
panelView() → {$k.PanelView}
Get this view's panel view
- Since
- 5.4.0
- Inherited From
- Type:
- $k.PanelView
parameters() → {Array.<$k.QueryParameterValue>}
Returns the parameters in use
- Since
- 5.4.0
- Type:
- Array.<$k.QueryParameterValue>
parentView() → {$k.View}
Get this view's parent view
- Since
- 5.3.2
- Inherited From
- Type:
- $k.View
query() → {query}
Returns the query in use
- Since
- 5.4.0
- Type:
- query
renderContext() → {RenderContext}
Get render context
Only supported in the following application environment(s): View-Configuration-Mapper
- Since
- 5.0.0
- Inherited From
- Type:
- RenderContext
resultSize() → {number}
The number of elements (semantic elements or hits) in this query
- Since
- 5.2.1
- Type:
- number
roles() → {Array}
Get the roles of the view, if any assigned.
- Since
- 5.4.0
- Inherited From
Array of Strings
- Type:
- Array
selectedElements() → {Array.<$k.SemanticElement>}
Get an array of semantic elements that are currently marked as selected.
- Version
- Experimental feature, might be removed at any time
- Since
- 5.4.0
- Type:
- Array.<$k.SemanticElement>
semanticElement() → {$k.SemanticElement}
Get semantic element
- Since
- 5.2.0
- Inherited From
- Type:
- $k.SemanticElement
session() → {$k.Session}
Get the current session
Only supported in the following application environment(s): View-Configuration-Mapper
- Since
- 5.2.0
- Inherited From
- Type:
- $k.Session
setElements(elements)
Set an array of semantic elements. Use this e.g. for a table result.
Name | Type | Description |
---|---|---|
elements | Array.<$dom.Element> | semantic elements |
- Version
- Experimental feature, might be removed at any time
- Since
- 5.3.0
setState(state) → {object}
Set the state of the view
Name | Type | Description |
---|---|---|
state | object |
- Version
- Experimental feature, might be removed at any time
- Since
- 5.4.0
- Inherited From
- Type:
- object
setVariable(variable, value)
set the value of the given variable
Name | Type | Description |
---|---|---|
variable | string | |
value | supported variable types include all javascript base types as well as: timestamp, SemanticElement and arrays of the latter |
- Inherited From
state() → {object}
Get the state of the view - varies according to view type and implementation
- Version
- Experimental feature, might be removed at any time
- Since
- 5.4.0
- Inherited From
- Type:
- object
subViews() → {$k.View}
Get this view's sub-views or an empty array if there are none
- Since
- 5.4.0
- Inherited From
- Type:
- $k.View
toggleSelectedElement(element) → {$k.SemanticElement}
Include the element in the collection of selected elements if it was not yet in there. Remove it otherwise.
Name | Type | Description |
---|---|---|
element | $k.SemanticElement | The element to be toggled. |
- Version
- Experimental feature, might be removed at any time
- Since
- 5.4.0
- Type:
- $k.SemanticElement
toggleSingleSelectedElement(element) → {$k.SemanticElement}
Include the element in the collection of selected elements if it was not yet in there. Remove it otherwise. Make sure that no other element is selected.
Name | Type | Description |
---|---|---|
element | $k.SemanticElement | The element to be toggled. |
- Version
- Experimental feature, might be removed at any time
- Since
- 5.4.0
- Type:
- $k.SemanticElement
viewsWithRole(role) → {Array}
Get all views with the given role searching from this view down to all sub-views.
Name | Type | Description |
---|---|---|
role | string |
- Since
- 5.4.0
- Inherited From
Array of Views
- Type:
- Array
viewType() → {string}
Get the view type
- Since
- 5.4.0
- Inherited From
the view type: edit, query, etc.
- Type:
- string