XWiki Properties Metadata

Last modified by Eleni Cojocariu on 2026/03/19 07:53

Reference

When defining Class Properties and selecting the XWiki Properties (Data types) for the XWiki Property,  you have the possibility to configure the Property Metadata: 

configure-properties.png

MetadataInput formDescriptionSupported Data Types
DisabledCheckboxPrevents this field from being editable in Pages using this Class.All 
NameTextAreaSpecifies the internal identifier of the field used in code and queries.
Pretty NameTextAreaSpecifies the user-friendly label displayed in the UI for this field.
HintTextArea

Provides a short helper text to guide users when filling this field.

Custom DisplayTextAreaAllows to define a custom template or renderer for displaying this field.
Validation Regular ExpressionTextAreaSpecifies a regex pattern to validate the field's value. For example, for an "Email" data type, it's set automatically to ensure a valid email format.
Validation MessageTextAreaDefines the error message displayed when the field value does not match the validation regular expression.
SizeTextAreaThe size of the corresponding form element when editing.All except for Computed Field and Boolean
Use SuggestCheckbox This property works only with the input "Display Type": it enables a dynamic suggestion list to appear as the user types in the text input, allowing them to select from the suggested values.All except for Computed Field, Date, Boolean, Number
Multiple SelectCheckboxIf checked, it allows to select multiple values. Else it only allow to select one value.Static List, Database Tree, Access Right Levels, Page, List of Users, List of Groups, Database List
Allow Large StringsCheckboxAllow to store values with more than 255 characters. The "short" value limit has been increased to 768 characters.Static List, Database Tree, Access Right Levels, Page, List of Users, List of Groups, Database List
RowsTextAreaSpecifies the number of visible lines in the text area.TextArea
EditorDropdown (---, Wiki, Plain Text, WYSIWYG)Indicated which editor should be used to manipulate the content of the property. This setting overwrites the preferred editor configured in the user profile.TextArea
Content TypeDropdown (---, Wiki Syntax, Velocity Code, Plain Text, VelocityWiki)Indicated what kind of content this field contains (wiki, plain text, etc.).TextArea
RestrictedCheckboxThis property is only taken into account for executable content and indicates if the content of the property should be executed in a restricted context (in which all dangerous macros like script macros are forbidden).TextArea
Display Form TypeDropdown (---, radio, checkbox, select)

Specifies how the field is displayed in forms.

  • ---: default / none (standard text input or default behavior)
  • radio: the user can select a single option
  • checkbox: the user can select multiple options
  • select: a dropdown list
Boolean
Display TypeDropdown (---, input, select, radio, checkbox)

Specifies how the field value is displayed on the page. 

  • input: display a simple input text
  • select: display the list as an html select
  • radio: display the list as a radio button
  • checkbox: display the list as checkboxes
Note that this option might be used in combination with "Use Suggest" and "Free Text", to allow entering custom values.
Static List, Boolean, Access Right Levels, Page, List of Users, List of Groups, Database List
Multiselect separators (for editing)TextAreaAllows specifying operators used to separate multiple values within a single string when editing. By default, the accepted separators are "|", ",", and space (" "). For example, if you enter "Foo|Bar|Baz", it will be treated as three values: Foo#, Bar, and Baz.Static List, List of Groups, Database Tree, Access Right Levels, Page, List of Users, List of Groups, Database List
Join separator (for display)TextAreaAllows specifying a string used to join the selected values in the list.
For example, if this property is set to "+++" and the selected values are Foo, Bar, and Baz, the resulting output will be: Foo+++Bar+++Baz.
Static List, List of Groups, Database Tree, Access Right Levels, Page, List of Users, List of Groups, Database List
SortDropdown (---, none, id, value)Allows to sort the options by the value selected in the dropdown.Static List, List of Groups, Database Tree, Access Right Levels, Page, List of Users, List of Groups, Database List
Free textDropdown (---, discouraged, forbidden, allowed)

Allows users to enter custom text not in the predefined values when used with an input "Display Type". Works as follows:

  • Allowed or discouraged: free-form text entry is permitted.
  • Forbidden: only predefined values can be selected.
Static List, List of Groups, Database Tree, Access Right Levels, Page, List of Users, List of Groups, Database List
Relational StorageCheckbox Allows multi-value fields to store each value as a separate database record instead of a single string separated by the "Multiselect separators (for editing)" . This causes the field to return an array of values in code rather than a single string. The advantage is that individual values can include spaces and separator characters without being split incorrectly.Static List, List of Groups, Database Tree, Access Right Levels, Page, List of Users, List of Groups, Database List
CacheCheckbox Allows to control whether objects of this class should be cached.Static List, List of Groups, Database Tree, Access Right Levels, Page, List of Users, List of Groups, Database List
Default valueTextAreaThe value selected by default.Static List, Boolean, List of Groups, Database Tree, Access Right Levels, Page, List of Users, List of Groups, Database List
Hibernate QueryTextAreaAllows entering queries used by the Query API to filter or fetch objects.Database Tree, Page, Database List
XWiki Class NameTextAreaSpecifies the Class from which to fetch Objects.Database Tree, Page, Database List
Id Field NameTextAreaSpecifies the property that stores the unique identifier of each Object.Database Tree, Page, Database List
Value Field NameTextArea Database Tree, Page, Database List
Parent Field NameTextAreaSpecifies the property used to determine parent-child relationships in the hierarchical list.Database Tree
ValuesTextAreaThe "Multiple Separators (for editing)" must be used to separate the different values. Example: value1=Text displayed for value1|value2=Text displayed for value2|value3|value4.Note that if "Free text" is properly set, users might also be able to enter a custom value.Static List
Number TypeDropdown (---, integer, long, float, double)Allows storing numeric values. Each type allows entering in the "Number" property only values of the selected type from the dropdown. However, for float or double, integer values are automatically converted on save (e.g., 10 becomes 10.0). Long is recommended for whole numbers, and double for numbers with a fractional part (decimal/fractional numbers).Number
Uses ListCheckboxAllows the property to store multiple values instead of a single one.List of Groups, List of Users
Storage TypeDropdown (---, Hash, Clear)Specifies how the field value is stored in the database.Password
Encryption/hash algorithmTextAreaSpecifies the encryption or hash algorithm used to securely store the field value.Password
Empty is todayCheckboxWhen checked, an empty date field is automatically set to today's date.Date
Use Date PickerCheckboxEnables a visual calendar picker to select the date instead of typing it manually.Date
Date FormatTextAreaThe default value is dd/MM/yyyy HH:mm:ssDate 
ScriptTextAreaAllows attaching a script to the field to compute, validate, or modify its value dynamically.Computed Field

FAQ

Why are some property metadata fields pre-filled when selecting a data type ?

Some Property metadata fields are automatically pre-filled, selected, or checked (advanced pickers) when you choose a specific data type to help enter valid values.

Related

Get Connected