Wiki source code of XWiki Properties Metadata

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

Show last authors
1 When [[defining Class Properties>>xwiki:documentation.xs.user.base.page.edit-page.edit-class-editor.define-class-property.WebHome]] and selecting the [[XWiki Properties (Data types)>>xwiki:documentation.xs.dev.data-model.x-properties.WebHome]] for the XWiki Property,  you have the possibility to configure the Property Metadata:
2
3 {{image reference="configure-properties.png" size="extra" alt="Example fields for property metadata"/}}
4
5 |=Metadata|=Input form|=Description|=Supported Data Types
6 |**Disabled**|Checkbox|Prevents this field from being editable in Pages using this Class.|(% rowspan="7" %)All
7 |**Name**|TextArea|Specifies the internal identifier of the field used in code and queries.
8 |**Pretty Name**|TextArea|Specifies the user-friendly label displayed in the UI for this field.
9 |**Hint**|TextArea|(((
10 Provides a short helper text to guide users when filling this field.
11 )))
12 |**Custom Display**|TextArea|Allows to define a custom template or renderer for displaying this field.
13 |**Validation Regular Expression**|TextArea|Specifies 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.
14 |**Validation Message**|TextArea|Defines the error message displayed when the field value does not match the validation regular expression.
15 |**Size**|TextArea|The size of the corresponding form element when editing.|All except for Computed Field and Boolean
16 |**Use Suggest**|Checkbox |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
17 |**Multiple Select**|Checkbox|If 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
18 |**Allow Large Strings**|Checkbox|Allow 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
19 |**Rows**|TextArea|Specifies the number of visible lines in the text area.|TextArea
20 |**Editor**|Dropdown (##~-~--##, ##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>>xwiki:documentation.xs.user.user.edit-profile.edit-profile-preferences.WebHome]].|TextArea
21 |**Content Type**|Dropdown (##~-~--##, ##Wiki Syntax##, ##Velocity Code##, ##Plain Text##, ##VelocityWiki##)|Indicated what kind of content this field contains (##wiki##, ##plain text##, etc.).|TextArea
22 |**Restricted**|Checkbox|This 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
23 |**Display Form Type**|Dropdown (##~-~--##, ##radio##, ##checkbox##, ##select##)|(((
24 Specifies how the field is displayed in forms.
25
26 * ##~-~--##: default / none (standard text input or default behavior)
27 * ##radio##: the user can select a single option
28 * ##checkbox##: the user can select multiple options
29 * ##select##: a dropdown list
30 )))|Boolean
31 |**Display Type**|Dropdown (##~-~--##, ##input##, ##select##, ##radio##, ##checkbox##)|(((
32 Specifies how the field value is displayed on the page.
33
34 * ##input##: display a simple input text
35 * ##select##: display the list as an html select
36 * ##radio##: display the list as a radio button
37 * ##checkbox##: display the list as checkboxes
38 )))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
39 |**Multiselect separators (for editing)**|TextArea|Allows 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
40 |**Join separator (for display)**|TextArea|Allows specifying a string used to join the selected values in the list.
41 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
42 |**Sort**|Dropdown (##~-~--##, ##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
43 |**Free text**|Dropdown (##~-~--##, ##discouraged##, ##forbidden##, ##allowed##)|(((
44 Allows users to enter custom text not in the predefined values when used with an ##input## "Display Type". Works as follows:
45
46 * ##Allowed## or ##discouraged##: free-form text entry is permitted.
47 * ##Forbidden##: only predefined values can be selected.
48 )))|Static List, List of Groups, Database Tree, Access Right Levels, Page, List of Users, List of Groups, Database List
49 |**Relational Storage**|Checkbox |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
50 |**Cache**|Checkbox |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
51 |**Default value**|TextArea|The value selected by default.|Static List, Boolean, List of Groups, Database Tree, Access Right Levels, Page, List of Users, List of Groups, Database List
52 |**Hibernate Query**|TextArea|Allows entering queries used by the [[Query API>>extensions:Extension.Query Module]] to filter or fetch objects.|Database Tree, Page, Database List
53 |**XWiki Class Name**|TextArea|Specifies the Class from which to fetch Objects.|Database Tree, Page, Database List
54 |**Id Field Name**|TextArea|Specifies the property that stores the unique identifier of each Object.|Database Tree, Page, Database List
55 |**Value Field Name**|TextArea| |Database Tree, Page, Database List
56 |**Parent Field Name**|TextArea|Specifies the property used to determine parent-child relationships in the hierarchical list.|Database Tree
57 |**Values**|TextArea|The "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
58 |**Number Type**|Dropdown (##~-~--##, ##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
59 |**Uses List**|Checkbox|Allows the property to store multiple values instead of a single one.|List of Groups, List of Users
60 |**Storage Type**|Dropdown (##~-~--##, ##Hash##, ##Clear##)|Specifies how the field value is stored in the database.|Password
61 |**Encryption/hash algorithm**|TextArea|Specifies the encryption or hash algorithm used to securely store the field value.|Password
62 |**Empty is today**|Checkbox|When checked, an empty date field is automatically set to today's date.|Date
63 |**Use Date Picker**|Checkbox|Enables a visual calendar picker to select the date instead of typing it manually.|Date
64 |**Date Format**|TextArea|The default value is ##dd/MM/yyyy HH:mm:ss##|Date
65 |**Script**|TextArea|Allows attaching a script to the field to compute, validate, or modify its value dynamically.|Computed Field

Get Connected