XWiki Properties (Data Types)

Version 17.14 by superadmin on 2025/12/30 23:34

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:

data-types.png

Data TypeDescriptionOutput Preview
List of UsersAllows to store and display single-select or multi-select users. The field uses a user picker as shown:list-users.png
NumberAllows to store and display only Numbers of type integer, long, float, double.number.png
List of GroupsAllows to store and display single-select or multi-select groups. The field uses a user picker as shown:list-groups.png
Time ZoneAllow to display and edit Time Zones.time-zone.png
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:
computed-field.png
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.database-list.png
DateAllows to store and display date or datetime values. A date picker is used automatically for this field as shown:date.png
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.password.png
StringAllows to store and display one line texts.string.png
EmailAllows to store email fields that can be obfuscated at display time.email.png
BooleanAllows to store and display boolean values (yes/no or 1/0) which can be displayed as select or checkbox fields.boolean.png
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.static-list.png
Access Right LevelsAllows selecting one or more access rights from the list of all permission types to define access control settings.access-right-levels.png
Text AreaAllows to store and display large text fields (text and wysiwyg).text-area.png
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