new $k.Session()
Session for visualizing/editing views
Methods
static$k.Session.actual()
Returns the actual session if set, undefined if not. The actual session may differ from initial session in render phase
- Since:
- 5.3.2
static$k.Session.current()
Returns the current session if set, undefined if not. The current session does not change throughout action execution and result rendering
- Since:
- 5.3.0
- Deprecated
- Deprecated because of confusing/misleading naming. Use initial() instead.
static$k.Session.forPanel(panelName)
Returns the session corresponding to the given panel if available, undefined if not. Searches starting from the current session.
Name | Type | Description |
---|---|---|
panelName |
string |
The configuration name of the panel |
- Version:
- Experimental feature, might be removed at any time
static$k.Session.initial()
Returns the top session on the session stack as found initially at the beginning of the execution of an action. The initial session does not change throughout action execution and result rendering.
- Since:
- 5.3.2
static$k.Session.main()
Returns the main session if set, undefined if not.
abort()
Abort the (long running) session transaction.
element()
get the domain model element of the session
getVariable(variable)
get the value of the given variable
Name | Type | Description |
---|---|---|
variable |
string |
Returns:
(arrays of) SemanticElements and timestamps are auto-converted to native formpanelConfiguration()
Returns the panel configuration topic.
parent()
get the parent session of the session, undefined if it has no parent
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 |