TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/webjetcms/webjetcms/llms.txt
Use this file to discover all available pages before exploring further.
columns JSON array required by WJ.DataTable can be generated directly from Java entity annotations. In a Thymeleaf/Pug template, call:
@DataTableColumn is included. The annotation mirrors the datatables.net columns API and adds WebJET-specific properties.
@DataTableColumn annotation
Required attributes
Shorthand that sets the field type and several defaults at once. Accepts a single value or a combined set, e.g.
inputType = { DataTableColumnType.OPEN_EDITOR, DataTableColumnType.JSON }.Column heading. Use a translation key such as
"components.gallery.fileName". If omitted, the key is auto-generated as components.<bean-name>.<field-name>. An empty or non-breaking-space title automatically sets hidden = true.Visibility
Completely hides the column from the table. The user cannot make it visible. The field is still available to the editor.
Hides the column by default but lets the user re-enable it through the column visibility control.
Excludes the field from the editor dialog while keeping it visible in the table.
Set to
false to suppress the column’s search filter in the table header.Display
Column render format. See the full list in the overview.
URL pattern for
dt-format-link and dt-format-text, e.g. "javascript:;" or "/temps-list.html".HTML prepended to the rendered value, e.g.
'<i class="ti ti-pencil"></i> '.Name of a global JavaScript function used for rendering. The function receives
(data, type, row, meta) and must return the HTML string. Define it as window.myRenderFn = function(...) {...}.CSS class(es) added to the
<td> element. Prefix with ! to replace the class set by inputType. Special values:disabled— grey appearance suggesting non-editable.not-export— excludes the column from exports.allow-html— renders raw HTML instead of escaping it.hide-on-create/hide-on-edit/hide-on-duplicate— conditional visibility in the editor.wrap— enables text wrapping (auto-set forTEXTAREA).
Set to
false to disable column sorting.Override the DB column(s) used for sorting. Supports comma-separated multi-column sort, e.g.
"contactLastName,deliverySurName".Editor
Shortcut for
editor.tab. Places the field in the named editor tab.Editor-specific configuration. See
@DataTableColumnEditor below.Default value for new records when
fetchOnCreate is false. Supports macros: {currentDomain}, {currentDate}, {currentDateTimeSeconds}, {currentTime}.Ordering
Data attribute of the field after which this field is inserted. Use
"FIRST" to move the field to the top. Useful when combined with @DataTableColumnNested.Permissions
Permission name required to display this column. The column is hidden if the user does not hold the right:
@DataTableColumnEditor annotation
HTML input type:
"text", "textarea", "checkbox", "datetime", etc.Translation key for the field label in the editor, if different from the column
title.Translation key for the field tooltip. Auto-searched as
<title>.tooltip if not set. Supports basic Markdown.The tab ID in which this field appears.
HTML attributes set on the input element. Common keys:
| Key | Value | Effect |
|---|---|---|
data-dt-field-hr | "before" or "after" | Horizontal rule divider |
data-dt-field-headline | Translation key | Section heading before the field |
data-dt-field-full-headline | Translation key | Full-width heading (e.g. before nested datatable) |
disabled | "disabled" | Makes the field read-only |
Options for
SELECT and CHECKBOX fields. The key is the display label and value is the stored value.Sets the
multiple attribute for MULTISELECT fields.Separator character for
MULTISELECT values stored as a string. Omit to store/receive as an array.DataTableColumnType values
Standard types
Core types
Core types
| Value | Description |
|---|---|
ID | Primary key column |
OPEN_EDITOR | Creates a link on the column to open the editor |
TEXT | Single-line text input |
TEXTAREA | Multi-line text input |
SELECT | Dropdown select |
MULTISELECT | Multi-choice select |
BOOLEAN | Checkbox with true/false values |
CHECKBOX | Checkbox with configurable selected/unselected values |
DISABLED | Displayed but not editable |
ROW_REORDER | Drag-and-drop row ordering handle |
Numeric types
Numeric types
| Value | Description |
|---|---|
NUMBER | Numeric field |
TEXT_NUMBER | Rounded number; large values shown as 10k etc. |
TEXT_NUMBER_INVISIBLE | Numeric field hidden from both table and editor |
Date and time types
Date and time types
| Value | Description |
|---|---|
DATE | Date picker |
DATETIME | Date and time picker |
TIME_HM | Hours and minutes picker |
TIME_HMS | Hours, minutes, and seconds picker |
Special types
Special types
| Value | Description |
|---|---|
GALLERY_IMAGE | Image display field with caption disabled |
QUILL | Basic rich-text editor (bold, italic, etc.) |
WYSIWYG | Full HTML editor |
JSON | Directory selection field |
DATATABLE | Nested datatable inside the editor |
ELFINDER | File/page link picker |
UPLOAD | File upload field |
Annotated examples
Basic field types
Gallery entity
Checkbox with custom values
Row reorder
Activate drag-and-drop row ordering by annotating the sort priority field:/row-reorder on the server and updates all affected sortPriority values automatically.
SELECT field options
Static method call
Use a static factory method returning
List<?>. Specify the label and value property names in value:REST service options
For standard datatables this is the preferred approach. Use
DatatablePageImpl.addOptions(...) in the REST controller to populate options server-side. See REST controller — dials for select boxes.Nested attributes (@DataTableColumnNested)
Use nested attributes to attach computed or transient data to an entity without storing it in the database. A common pattern is editorFields:
DocEditorFields recursively for @DataTableColumn annotations and generates column entries prefixed with editorFields.:
BaseEditorFields and DocEditorFields
BaseEditorFields provides shared utility methods used across all EditorFields implementations:
| Method | Purpose |
|---|---|
addRowClass(String) | Adds a CSS class to the table row |
addStatusIcon(String) | Adds a FontAwesome/Tabler icon to the status column |
getStatusIconsHtml() | Returns the rendered icon HTML string |
fromXxx(entity) to populate fields before editing and toXxx(entity) to write them back before saving. Call these methods explicitly in processFromEntity and processToEntity in your REST controller.
Custom render functions
For complex cell rendering, annotate the field withrenderFunction and define the function globally:
JavaScript helpers for column manipulation
TheWJ.DataTable.mergeColumns(columns, patch) utility finds a column by name and extends it with patch using jQuery.extend:
Validation
Standardjakarta.validation annotations are supported on entity fields:
{min}, {max}, ${validatedValue}.
For custom validation logic, implement validateEditor in your REST controller. See REST controller — validation.