XWiki Properties (Data Types)

Last modified by superadmin on 2026/10/14 18:26

Reference

Properties define the types of data that each Object instance of a Class can have. Properties have displayers (a kind of output and input preview) that control how a Property’s value is shown when viewing and how it’s edited. When defining Class Properties it is required to select a data type from the dropdown as in the following image:

Class editor with the property type dropdown expanded, highlighting the available data types

Data TypeDescriptionOutput Preview
List of UsersAllows to store and display single-select or multi-select users. The field uses a user picker as shown:The output preview when choosing List of users as data type is a user picker
NumberAllows to store and display only Numbers of type integer, long, float, double. XWiki 18.8.0+ The edit field is an HTML5 number input, so the browser rejects a value that does not match the selected number type before the page is saved.The Number data type in the object editor, the number field outlined in red showing its value and spinner arrows
List of GroupsAllows to store and display single-select or multi-select groups. The field uses a user picker as shown:The output preview when choosing List of users as data type is a user picker
Time ZoneAllow to display and edit Time Zones.The output preview when choosing Time Zone as data type is a dropdown with time zones
Computed FieldAllows to create a pseudo field for which the display can be configured using a custom displayer and the value retrieved by using a script. It allows combining other fields together. For example, consider the computed field containing the following script:
{{velocity}} Name: $doc.display('name') Age: $doc.display('age') {{/velocity}} This script automatically retrieves the values of the name and age fields from the same document and displays them together, like this:
The output preview when choosing Computed Field as data type is a field combining the values of other fields
Database ListAllows to store and display single-select or multi-select fields that can be displayed as select, checkbox, radio or suggests fields. The possible values of database list fields are taken from the execution of a query on other XWiki data such as Pages or Objects. The query is typically expressed in the Hibernate Query Language (see XWiki Query Module) and it can use the Velocity script notation (as long as the XWiki class author has the required scripting permission) for including dynamic parameters such as the current page space, the current time, etc.The output preview when choosing Database List as data type is a select field
DateAllows to store and display date or datetime values. A date picker is used automatically for this field as shown:The output preview when choosing Date as data type is a date picker
Database TreeSimilar to Database List, but displays the data in a hierarchical tree structure.
PasswordAllows to store password fields, which can be encrypted or hashed.The output preview when choosing Password as data type is a password field
StringAllows to store and display one line texts.The output preview when choosing String as data type is a single line text field
EmailAllows to store email fields that can be obfuscated at display time.The output preview when choosing Email as data type is an email field
BooleanAllows to store and display boolean values (yes/no or 1/0) which can be displayed as select or checkbox fields.The output preview when choosing Boolean as data type is a checkbox or select field
Static ListAllows to store and display single-select or multi-select fields that can be displayed as select, checkbox, radio or suggests fields. The possible values of static list fields are configured in the field definition.The output preview when choosing Static List as data type is a select field
Access Right LevelsAllows selecting one or more access rights from the list of all permission types to define access control settings.The output preview when choosing Access Right Levels as data type is a field to select access rights
Text AreaAllows to store and display large text fields (text and wysiwyg).The output preview when choosing Text Area as data type is a large text field
PageSame as a Database List field, but made to store XWiki page names.

More

To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.

Related

Get Connected