Class: TableConfiguration

$k. TableConfiguration

new $k.TableConfiguration()

Configuration of a table

Extends

Methods

static$k.TableConfiguration.forDomain(domain, context) : $k.TableConfiguration

Returns the table confguration for the domain and the optional context)

Name Type Description
domain $k.Domain

Domain or internal name of a type of the table

context $k.SemanticElement optional

Context of the configuration

Since:
  • 4.1.0
Returns:
Type Description
$k.TableConfiguration

static$k.TableConfiguration.from(configurationElement) : $k.TableConfiguration

Returns the confguration defined by the element

Name Type Description
configurationElement $k.SemanticElement

The configuration element

Since:
  • 4.1.0
Returns:
Type Description
$k.TableConfiguration

columns(domain, contextObject) : object

Returns the columns of the table

Name Type Description
domain $k.Domain

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
    Returns:
    Type Description
    object

    configElement() : $k.SemanticElement

    Since:
    • 4.1.0
    Returns:
    Type Description
    $k.SemanticElement

    createFilterProperties(element)

    Create properties for each column with a filter value to the element

    Name Type Description
    element $k.SemanticElement
    Version:
    • Experimental feature, might be removed at any time
    Since:
    • 4.1.0

    elements(elementsOrQuery) : Array.<$k.SemanticElement>

    Returns the filtered, sorted and paged elements of this table

    Name Type Description
    elementsOrQuery 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
    Returns:
    Type Description
    Array.<$k.SemanticElement> The filtered, sorted and paged elements

    filter(elements, filterDescriptions, disableInheritance) : Array.<$k.SemanticElement>

    Filters the elements by the given column values

    Name Type Description
    elements Array.<$k.SemanticElement>
    filterDescriptions Array.<object>

    Column index/name and value: {column: indexOrName, value: "", operator: "".


    Operator is one of: "containsPhrase", "covers", "distance", "equal" (or "=="), "equalBy", "equalCardinality", "equalGeo", "equalMaxCardinality", "equalMinCardinality", "equalPresentTime", "equalsTopicOneWay", "fulltext", "greater" (or ">"), "greaterOrEqual" (or ">="), "greaterOverlaps", "greaterPresentTime", "isCoveredBy", "less" (or "<"), "lessOrEqual" (or "<="), "lessOverlaps", "lessPresentTime", "notEqual" (or "!="), "overlaps", "range", "regexEqual", "regexFulltext", "unmodifiedEqual", "words"

    disableInheritance boolean optional

    True if the query should only match direct instances/subtypes

    Since:
    • 4.1.0
    Throws:
    Type Description
    $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:
    Type Description
    Array.<$k.SemanticElement> The filtered elements
    Example

    configuration.filter(elements, [ {column: "familyName", value: "Doe" }])

    render(elements, keyFilter, detailFilter) : Array.<object>

    Renders the elements as literal objects

    Name Type Description
    elements optional

    Elements, query or undefined

    keyFilter object optional

    Internal Error: no text for this language or unsupported language

    detailFilter object optional

    Internal Error: no text for this language or unsupported language

    Since:
    • 4.1.0
    Deprecated
    • This function is deprecated and might be removed in future releases
      Returns:
      Type Description
      Array.<object> The rendered objects

      renderExcel(elements, entity, template, conversion, variables)

      Renders the elements as an Excel file

      Name Type Description
      elements Array.<$k.SemanticElement>

      The elements to render

      entity $k.NetEntity

      The render target

      template $k.Instance optional

      List template

      conversion $k.SemanticElement 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
      Throws:
      Type Description
      $k.exception.RuntimeError

      When the elements could not be rendered

      Find the elements by the given column values

      Name Type Description
      domain $k.Domain

      Domain or internal name of a type of the table

      filterDescriptions Array.<object>

      Column index/name and value: {column: indexOrName, value: "", operator: "".


      Operator is one of: "containsPhrase", "covers", "distance", "equal" (or "=="), "equalBy", "equalCardinality", "equalGeo", "equalMaxCardinality", "equalMinCardinality", "equalPresentTime", "equalsTopicOneWay", "fulltext", "greater" (or ">"), "greaterOrEqual" (or ">="), "greaterOverlaps", "greaterPresentTime", "isCoveredBy", "less" (or "<"), "lessOrEqual" (or "<="), "lessOverlaps", "lessPresentTime", "notEqual" (or "!="), "overlaps", "range", "regexEqual", "regexFulltext", "unmodifiedEqual", "words"

      disableInheritance boolean optional

      True if the query should only match direct instances/subtypes

      Since:
      • 4.1.0
      Throws:
      Type Description
      $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:
      Type Description
      Array.<$k.SemanticElement>
      Example

      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
        See:
        Returns:
        Type Description
        $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.Query
        Since:
        • 4.1.0

        sort(semanticElements, sortDescriptions) : Array.<$k.SemanticElement>

        Returns the elements sorted by the given columns and sort orders

        Name Type Description
        semanticElements Array.<$k.SemanticElement>
        sortDescriptions Array.<object> optional

        Column index/name and optional sort order (ascending). The configured sort order is used if this parameter is undefined.

        Since:
        • 4.1.0
        Returns:
        Type Description
        Array.<$k.SemanticElement> The sorted elements
        Example

        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
          Returns:
          Type Description
          Array.<object>

          toJSON()

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

            Intherited methods