Decorators

Decorators can be added to non-generic table columns to conditionally override the value of a column or the default display settings of the system. The list of existing decorators of a column appears within that column on the Queries & Reports page, beneath that column's format / value box.

A table column containing two decorators

Each decorator appears as a box listing its key details, above which are buttons to edit or delete that decorator. At the bottom of the list lies the "Add Decorator" button, which brings up the following panel to add a new decorator; the edit button brings up an identical panel that is already populated with the fields of the selected decorator.

The Add Decorator Panel

The Display Field

The "Display" field contains a condition that dictates when the system will apply the settings of the decorator to its parent column.

By default, a decorator of any column type is always active, hence the Always condition type in the above screenshot.

Decorators of any column type can also use the If expression is true condition type, which allows the user to provide an EL expression or variable, and the decorator will be applied in the column for all rows where the variable or expression evaluates to true. Beyond these two, however, the types of conditions a user can set for the Display field depend on the type of the decorator's parent column.

Text columns enabled the If value equals condition type; when selected, the user inputs a string Equals Value, and the system will apply the decorator to the column for all rows with a value matching the supplied string.

Number, Bar, and Icon columns all enable three condition types:

Icon-type columns can also contain fields with the Text data type; if any of these three condition types is used when the column contains a Text-type value, they will always evaluate to true.

A non-generic column can have any number of decorators, and as a result, multiple decorators for the same column can have their conditions evaluate to true simultaneously. In this case, the first decorator in the list that evaluates to true will be applied, and no others.

Other Decorator Fields

The "Display" field controls when a decorator is applied to a column value, but a decorator contains many other fields that control which settings of the column are changed when the decorator is applied. The following fields can be set for decorators of all non-generic column types:

Decorators of an Icon-type column have three additional fields: the "Icon Value" field overrides the parent column's "Default Icon" field, and the "Icon Width" and "Icon Height" fields similarly override their counterparts of the parent column.