Magnolia 5.4 reached end of life on November 15, 2018. This branch is no longer supported, see End-of-life policy.
Columns define what content is displayed in tree and list views in the browser subapp. Here is an example of column configuration in My first content app.
Node name | Value |
---|---|
columns | |
jcrName | |
class | info.magnolia.ui.workbench.column.definition.StatusColumnDefinition |
formatterClass | info.magnolia.ui.workbench.column.StatusColumnFormatter |
editable | true |
label | Name |
propertyName | jcrName |
sortable | true |
status | |
width | 45 |
displayInChooseDialog | false |
label | Status |
class | info.magnolia.ui.workbench.column.definition.StatusColumnDefinition |
formatterClass | info.magnolia.ui.workbench.column.StatusColumnFormatter |
columns: - name: jcrName editable: true sortable: true propertyName: jcrName class: info.magnolia.ui.workbench.column.definition.PropertyColumnDefinition - name: status width: 45 displayInChooseDialog: false formatterClass: info.magnolia.ui.workbench.column.StatusColumnFormatter class: info.magnolia.ui.workbench.column.definition.StatusColumnDefinition
Properties:
class | required The column definition class reads the column configuration and displays the column accordingly. The class must implement the ColumnDefinition interface. You can write your own class or use one of the ready-made classes. Set the value to the fully-qualified class name. Examples:
|
propertyName | required only when using PropertyColumnDefinition Name of the property to display. Needed when using the PropertyColumnDefinition class. |
editable | optional, default it Makes the column editable inline. You can double-click a cell to edit its value. Inline editing is available only in the tree view, not in list, thumbnail or search views. Definining a default action will override inline editing. Double-clicking the cell with trigger the default action instead of inline edit mode. |
enabled | optional, default is Defines whether the column is displayed in the workbench or not. |
expandRatio | optional, default is Defines how excess space is divided among columns. A table can have excess space if its width is defined and there is more horizontal space than is occupied by the column data. In a three-column workbench with expand ratios |
formatterClass | optional Defines how the column's value is displayed in the UI. This is useful for making raw data more readable or adhering to a formatting convention. The Contacts app implements a
ContactNameColumnFormatter
which concatenates the first name and last name of the contact person and displays them as full name in one column. So The formatter class must implement the ColumnFormatter interface. Set the value to the fully-qualified class name. |
displayInChooseDialog | optional, default is Display the column in a choose dialog. |
label | optional, default is column Text displayed to use in the column heading. Can be the text itself or an 18n key. |
name | optional, default is the parent node name Name of the column. |
sortable | optional, default is Allows the user to sort the data by clicking the column heading. |
width | optional Column width in pixels. Five pixels are deducted for left margin so when you define width 60 you get 55 pixels of space for data. Set the value to a number without unit. |