Document Modelling

Dynamic Table

Learn more about the childnode "Dynamic Table".

Add a dynamic table to a document. Which columns should be part of the dynamic table is defined in a separate, associated childnode which you have to add as a valid child node name.

Parameters
ParameterDescriptionDefault ValueRange of Values
Visible EntriesThe number of rows which are visible at once in the table. Due to the marginal buttons of the dynamic table input field, every dynamic table has a minimum height. Therefore, depending on the number of lines per entry, more rows than the configured number could be visible.10Positive integers
Lines per EntryThe number of visible text lines within a table row.2Integers greater than or equal to 2
SortableSpecifies, if the values of each column can be sorted in ascending or descending order by clicking on the column headers.falsetrue/false
Hide Input AreaIf activated, the dedicated area to add a new table row will be hidden and has to be expanded manually, if needed.falsetrue/false
Hide Search FilterIf activated, the search filter field above the table will be hidden.falsetrue/false

With these parameters, you can only configure the appearance of the dynamic table in the document editor. The content is determined by a separate node type, which you have to add as a valid child node name in the childnode configuration editor. In general, you can use any document type that is available. Each property on that document's base tab will be represented by a column in the dynamic table. If you want to edit an input field type for a table column, you cannot do that in the table property configuration, but in the respective property configuration of the referenced document type. Hence, if you would like to configure a field as mandatory for every table row, you have to do that in the property configuration of the referenced node type. Consider the following example:

Create a nodetype (in our example sophora-demo-nt:tabledata) and add to it the properties which you would like to have as columns in your dynamic table. Configure each property in the desired way, i.e. in the way you want to have them displayed in the dynamic table - for example a string property as a select value and so on. Keep in mind, that the order of the properties here will determine the order of the columns in the dynamic table.

+++
+++ (Image: subshell/CC BY)

Subsequently, open the nodetype editor of the document with the childnode you want to configure as a dynamic table. Set the input field type to Dynamic Table and configure parameters for its appearance pursuant to their summary in the table above. Then, add sophora-demo-nt:tabledata as a valid child node name.

+++
+++ (Image: subshell/CC BY)

The resulting dynamic table should then look like this:

+++
+++ (Image: subshell/CC BY)

Last modified on 3/9/20

The content of this page is licensed under the CC BY 4.0 License. Code samples are licensed under the MIT License.

Icon