$k. ViewConfiguration

new ViewConfiguration()

Configuration of a semantic element editor

Extends

Methods

(static) forElement(semanticElement, contextopt) → {object}

Returns the configuration for the semantic element

Parameters:
NameTypeAttributesDescription
semanticElement$k.SemanticElement
context$k.SemanticElement<optional>

Context of the configuration

Since
  • 4.1.0
Returns:

The rendered JSON object

Type: 
object

(static) from(configurationElement) → {$k.ViewConfiguration}

Returns the confguration defined by the element

Parameters:
NameTypeDescription
configurationElement$k.SemanticElement

The configuration element

Since
  • 4.1.0
Returns:
Type: 
$k.ViewConfiguration

(static) synchronize(object) → {$k.ViewConfiguration}

Update the semantic element from the JSON string / literal object

Parameters:
NameTypeDescription
objectobject

JSON string or literal object

Since
  • 4.1.0
Deprecated
  • A manual synchronization/update is not supported anymore. Please use bult-in update action with viewconfig.postActionScriptAttribute.
Throws:

Got an synchronisation error

Type
$k.exception.SchemaError
Returns:
Type: 
$k.ViewConfiguration

configElement() → {$k.SemanticElement}

Since
  • 4.1.0
Returns:
Type: 
$k.SemanticElement

createView(domainModelopt) → {$k.View}

Create a new view with the given domain model from this configuration. This is useful primarily for debug and test scripts.

Parameters:
NameTypeAttributesDescription
domainModelobject<optional>

SemanticElement or SemanticElementCollection

Version
  • Experimental feature, might be removed at any time
Since
  • 5.4.1
Returns:
Type: 
$k.View

relationTargetSearch(searchStringopt) → {Array.<$k.SemanticElement>}

Parameters:
NameTypeAttributesDescription
searchStringstring<optional>

Search string for the target element

Version
  • Experimental feature, might be removed at any time
Since
  • 4.1.0
Returns:

The rendered object

Type: 
Array.<$k.SemanticElement>

render(semanticElementopt, keyFilteropt, detailFilteropt) → {object}

Render the element as a literal object

Parameters:
NameTypeAttributesDescription
semanticElement$k.SemanticElement<optional>
keyFilterobject<optional>

Alternative 1 (preferred): a $k.JSONRenderContext Alternative 2 (compatibility only): A filter. See $k.JSONRenderContext.prototype.setFilters().

detailFilterobject<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
See
  • $k.ViewConfiguration#synchronize
Returns:

The rendered object

Type: 
object

renderFacets(semanticElementsopt, keyFilteropt, detailFilteropt) → {object}

Render the facets for the elements

Parameters:
NameTypeAttributesDescription
semanticElementsArray.<$k.SemanticElement><optional>
keyFilterobject<optional>

Alternative 1 (preferred): a $k.JSONRenderContext Alternative 2 (compatibility only): A filter. See $k.JSONRenderContext.prototype.setFilters().

detailFilterobject<optional>

Only used if the key filter is not a $k.JSONRenderContext. See $k.JSONRenderContext.prototype.setLevelsOfDetail()

Version
  • Experimental feature, might be removed at any time
Since
  • 5.1.3
Deprecated
  • This function is deprecated and might be removed in future releases
Returns:

The rendered object

Type: 
object

setRenderContext(renderContextObject)

Set render context

Parameters:
NameTypeDescription
renderContextObjectRenderContext
Since
  • 5.3.0
Deprecated
  • This function is deprecated and might be removed in future releases

toJSON()

Deprecated
  • This function is deprecated and might be removed in future releases