Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageyml
columns: &columns
  - name: jcrName
    label: name
    $type: jcrTitleColumn
    editable: true
    nodeTypeToIcon:
      mgnl:contact: icon-people
      mgnl:content: icon-folder
    filterComponent:
      $type: textField
    editable: true
    editor:
      availability:
        nodes: true
        properties: true
  - name: value
    label: value
    editable: true
    editor:
      availability:
        nodesnodeTypes: false
        properties: truemgnl:contact
  - name: jcrPath
    label: path
    $type: jcrPathColumn
  - name: status
    label: status
    $type: jcrStatusColumn
  - name: mgnl:created
    $type: dateColumn
    label: date
    editable: falsetrue
    editor:
      availability:
        nodeTypes:
          - mgnl:contact
        nodes: true
        properties: false
      field:
        $type: textField
        converterClass: com.vaadin.data.converter.StringToDateConverter

...

class

required (unless $type is used)

The column definition class reads the column configuration and displays the column accordingly. The class must implement the

Javadoc resource link
classNameinfo.magnolia.ui.contentapp.configuration.column.ColumnDefinition
renderTypeasynchronous
 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:

  • Javadoc resource link
    classNameinfo.magnolia.ui.contentapp.column.jcr.JcrTitleColumnDefinition
    renderTypeasynchronous
     displays the name of an item.
  • Javadoc resource link
    classNameinfo.magnolia.ui.contentapp.column.jcr.JcrPathColumnDefinition
    renderTypeasynchronous
     displays the path of an item.
  • Javadoc resource link
    classNameinfo.magnolia.ui.contentapp.column.jcr.JcrStatusColumnDefinition
    renderTypeasynchronous
     displays the activation status of an item.
  • Javadoc resource link
    classNameinfo.magnolia.ui.contentapp.configuration.column.DateColumnDefinition
    renderTypeasynchronous
     displays the last modification date

    See Column types for possible values.

    $type

    You can use this as a shortcut for class if the definition class is annotated with info.magnolia.ui.contentapp.configuration.column.ColumnType. The proper value is defined by the annotation.

    Code Block
    languagejava
    titleExample class annotation
    collapsetrue
    @ColumnType("dateColumn")
    public class DateColumnDefinition extends ConfiguredColumnDefinition<Date> {
    ...
    }

    To use the $type property in YAML, see Example column definition.

    type

    requireddefault is String.class is java.lang.String

    Model type of the column. Use the fully qualified class name. See PropertyType for possible values.

    A . A default type is typically hard-coded in each definition class. You only need to add this property if you want to override the default implementation (for example, with java.lang.Long).

    name

    optional, default is parent node name

    Name of the column.

    descriptionGenerator

    optional

    Generates a description for the column.

    editable

    optionaldefault is false

    Sets whether When set to true, the column is editable can be edited inline. You can double-click a cell to edit its value.

    (warning) You cannot define defaultAction and  and use inline editing at the same time.

    editor

    optional

    Defines the inline editor component. For this to work, you have to set editable to true.

    availability

    required

    Outlines when the column can be edited inline

    See the

    Javadoc resource link
    classNameinfo.magnolia.ui.contentapp.configuration.column.ColumnEditorDefinition
    renderTypeasynchronous
     interface.

    field

    required, default is textField

    Type of the field definition item. See Field types for possible values.

    availability

    optional

    Outlines when inline editing is permitted. See Action availability for more information.

    (warning) Availability is resolved against the selected row, not the selected column or property.

    expandRatio

    optional

    Defines the ratio with which the column expands. By default, all columns expand equally.

    filterComponent

    optional

    Adds a filter field to the column. In theory, all field types are supported. For properties, see field-specific and common field properties See List of fields for more information.

    (warning) Currently, column filtering is not supported in REST-based elements of the UI.

    label

    optional

    Text displayed in the column heading. The value can be literal or a key of a message bundle.

    If you do not provide the property, Magnolia will fall back to a generated i18n key.

    maximumWidth

    optional

    Defines the maximum allowed pixel width of the column when it is set to expand.

    minimumWidth

    optional

    Defines the minimum guaranteed pixel width of the column when it is set to expand.

    minimumWidthFromContent

    optional, default is true

    Sets whether the width of the content in the column is the minimum width of the column. When false, the column shrinks down to the width defined in minimumWidth if necessary.

    renderer

    optional, default is com.vaadin.ui.renderers.TextRenderer

    Class extending Vaadin AbstractRenderer.

    valueProvider

    optional

    Class extending Vaadin ValueProvider.

    width

    optional

    Defines the width (in pixels). When set, overrides any configuration from expandRatio, maximumWidth and minimumWidth.

    ...

    $typeclass

    dateColumn

    info.magnolia.ui.contentapp.configuration.column.DateColumnDefinition

    iconAndValueColumn

    info.magnolia.ui.contentapp.configuration.column.icon.IconAndValueColumnDefinition

    iconColumn

    info.magnolia.ui.contentapp.configuration.column.icon.IconColumnDefinition

    jcrPathColumn

    info.magnolia.ui.contentapp.column.jcr.JcrPathColumnDefinition

    jcrStatusColumn

    info.magnolia.ui.contentapp.column.jcr.JcrStatusColumnDefinition

    jcrTitleColumn

    info.magnolia.ui.contentapp.column.jcr.JcrTitleColumnDefinition

    variantAwareNameColumn

    info.magnolia.pages.app.browser.column.VariantAwareTitleColumnDefinition