Tabular views contain columns used to represent specific information about the exposed elements. See the information on this page to learn about table columns before you start modeling them.

Columns in tabular view definitions and usages

Tabular views and their definitions can differ in the table columns they contain:

Column kinds

Currently, there are 2 model-based table column kinds available for modeling. The columns you create for a tabular view usage or definition must be defined by one of these column definitions, depending on the column's purpose. The table below lists:

  • Column kinds and their descriptions.
  • Relevant information regarding cell type according to column kind.
    • The cell type enables correct data representation and correct cell value type (e.g., String, Boolean, etc.) suggestions upon cell editing.
  • Predefined attributes applicable to each column kind.
ColumnDescriptionCellsCell attributesColumn attributes
ColumnByFeatureView

Dedicated to meta-feature, or user-defined feature, value retrieval. It requires the expression to return only one meta-feature/user-defined feature, e.g., Element::declaredName or FeatureValue::value. The expression is specified for columnFeature.

See procedure:

  • For ColumnByFeatureView, the cell type is calculated out of the meta-feature or user-defined feature and does not need to be specified explicitly.
  • maxDisplayedValues. It allows you to modify the default limit for displayed values in multi-valued table cells.
    • Available values: Integer. If undefined or <=0, the attribute reverts to the default value.
    • The default value is 10. 
      See procedure >>
 
  • isMultiline. It allows you to specify whether single-valued string cells should be displayed in a multiline format.
    • Available values: Boolean.
    • The default value is false.

  • pinning. It allows you to pin the column to the left or the right side of the table.
    • Available values: left/right.
    • By default, no column is pinned.

  • sorting. It allows you to sort table rows in ascending or descending order according to the selected column.
    • If the sorting is specified for multiple columns, use the sortingOrder attribute to specify the sorting order priority for the columns.
    • Available values: asc/desc. If undefined or null, the column is not sorted.
    • By default, the attribute value is undefined.

  • sortingOrder. It allows you to specify the sorting order priority for the columns with the sorting attribute. The table rows are ordered for all columns based on the order specified using this attribute, e.g., a column with sortingOrder set to 0 will take the highest priority.
    • If the sorting attribute is specified but the sortingOrder is not, sorting is applied without any order. 
    • Available values: Integer.
    • By default, the attribute value is undefined.
  • width. It allows you to specify the column width, where the integer value is interpreted in pixels. 
    • Available values: Integer. If undefined or null, the column width is responsive.
    • By default, the attribute value is undefined.

See procedure >>

ColumnByExpressionView

Dedicated to complex model queries. For example, when the value of the owned attribute needs to be retrieved, the feature chain expression is needed to access this information.

See procedures:

  • For ColumnByExpressionView, the cell type is specified by defining the cell rendering with the appropriate rendering definition. It works as a kind of filter for the type of wanted expression results.
    • The default cell rendering definition is StringCellRendering.

rendering def BooleanCellRendering :> TableCellRendering;
rendering def ElementCellRendering :> TableCellRendering;
rendering def EnumCellRendering :> TableCellRendering;
rendering def IntegerCellRendering :> TableCellRendering;  rendering def MetaobjectCellRendering :> TableCellRendering;
rendering def RealCellRendering :> TableCellRendering;
rendering def StringCellRendering :> TableCellRendering;

rendering def TableCellRendering {
   calc getValue { in rowElement [0..1] : Metaobjects::Metaobject; }
   attribute isMultiValued [0..1] : ScalarValues::Boolean; 
}