/
Table Configuration

Table Configuration

For each table the columns must be defined. Other options control the behavior of the overall table

  • columns: column[], // an array of column definitions (see below)
    • name: the name of the column shown in the table header

    • field: the id in the column / of the data

    • editor: default: readonly, can be text, uprules, downrules, date, select (needs an array with options), versionletter, user, textline, design, ...

    • options: (for select) array with id, name pairs, for rules: singleSelect:true, showTitle:true

  • canBeModified: true, // if true, rows can be added and moved,

  • create: true, // if canBeModified also can add lines (with little icon)

  • showLineNumbers: true, // whether to show line numbers in front of each row

  • maxRows: -1, // if set to a value other than -1, the maximum number of rows which can be created

  • readonly_allowfocus: false // whether not editable cells can get focus (e.g. with tab)


Column Definition

Each column is defined by these settings

  • name: e.g. "Column 1" header to be shown in UI and reports
  • field: e.g. "column1" a variable name under which to store the values
  • editor: e.g. "text" defines how and what data can be entered into a table cell of this column (see below)
  • options: e.g. { "opt1":true } additional options, depending on the editor

Cell Editors

cell editors define how data can be entered and how it is displayed afterwards. The following editors exist

EditorDescriptionOptions
textallows to enter rich text
textlineallows to enter a simple line of text (without formatting)
numberallows to enter a number (integer)
dateallows to select a date
selectallows to select a value from a dropdown

define the options the user can select

{ "id1":"option 1", "id2":"option 2", ....}

userallows to select a user
category (from 1.11 replaces rules:CAT1,...)allows to select a category from the list of supplied categoires

"categories":["CAT1","CAT2"]

"singleSelect": true, // if only one item can be selected
"showTitle": true // if the titel shall be displayed (not only the id)

uprulesallows to select items from the categories which are defined as up rules

"singleSelect": true, // if only one item can be selected
"showTitle": true // if the titel shall be displayed (not only the id)

downrulesallows to select items from the categories which are defined as down rules
rules:CAT1,CAT2, ....allows to select items from the specified (comma separated list of categories)
designallows to select any item of any category
nonefor readonly columns