Wiki source code of Static List

Last modified by Simon Urli on 2021/04/19

Hide last authors
Simon Urli 5.1 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
Simon Urli 1.1 5 Static List allows to store and display single-select or multi-select fields that can be displayed as select, checkbox, radio or suggests fields.
6
Vincent Massol 5.2 7 = Properties =
Simon Urli 1.1 8
Simon Urli 2.1 9 We list in the following the properties of Static List and their meanings.
10
Vincent Massol 5.2 11 == Display Type ==
Simon Urli 1.1 12
13 Several types are available for displaying a static list:
14
Simon Urli 2.1 15 * **select**: display the list as an html select
16 * **checkbox**: display the list as checkboxes
17 * **radio**: display the list as a radio button
Simon Urli 3.1 18 * **input**: display a simple input text. Note that this option might be used in combination with [[Use suggest>>||anchor="HUseSuggest"]] and [[Free text>>||anchor="HFreetext"]], to allow entering custom values.
Simon Urli 2.1 19
Vincent Massol 5.2 20 == Multiple select ==
Simon Urli 1.1 21
22 If checked, it allows to select multiple values. Else it only allow to select one value.
23
Vincent Massol 5.2 24 == Use suggest ==
Simon Urli 1.1 25
Simon Urli 3.1 26 This property only works in combination with [[input display type>>||anchor="HDisplayType"]]: it allows to display a suggest list when the user is typing in the input text, and to select from it.
Simon Urli 1.1 27
Vincent Massol 5.2 28 == Allow large strings ==
Simon Urli 1.1 29
Thomas Mortagne 8.1 30 This property has been introduced in {{code}}XWiki 11.5{{/code}} and allow to store values with more than 255 characters.
Simon Urli 1.1 31
Thomas Mortagne 8.1 32 {{version since="13.2"}}
33 The "short" value limit has been increased to 768 characters.
34 {{/version}}
35
Vincent Massol 5.2 36 == Size of the corresponding form element in edit mode ==
Simon Urli 1.1 37
38 This property is useful only with *select* display, it allows to specify the number of options to display in the select.
39
Vincent Massol 5.2 40 == Multiselect separators (for editing) ==
Simon Urli 1.1 41
42 This property allows to specify some operators used to distinguish multiple values in a single string, in edit mode.
43 By default, the value accepted separators are "|", "," and " ".
44 For example, if you send the value "Foo|Bar|Baz" in edit, it would be considered as the three values: Foo, Bar and Baz.
Simon Urli 9.1 45 Note that it's possible to create empty string values, but only when using the same separator twice, so for example: ##Foo||Bar## will be considered as the three values "Foo", "" and "Bar", while ##Foo, Bar## will be only considered as the two values "Foo" and "Bar" even if two separators ("," and space) are used.
Simon Urli 1.1 46
Vincent Massol 5.2 47 == Join separator (for display) ==
Simon Urli 1.1 48
Simon Urli 2.1 49 This property allows to specify a string that will be used to join the values selected in the list.
50 For example if this property contains the value "+++", and the selected value are Foo, Bar et Baz, the produced output will be: Foo+++Bar+++Baz.
51
Vincent Massol 5.2 52 == Sort ==
Simon Urli 2.1 53
54 Allows to sort the options.
55
Vincent Massol 5.2 56 == Free text ==
Simon Urli 2.1 57
Simon Urli 3.1 58 This option should be used in combination with an [[input display type>>||anchor="HDisplayType"]].
59 If set to allows or discouraged, it allows user to type a custom text that is not part of the [[predefined values>>||anchor="HValues"]].
Simon Urli 2.1 60 If set to forbidden, only the values that are specified can be used.
61
Vincent Massol 5.2 62 == Relational Storage ==
Simon Urli 2.1 63
Vincent Massol 5.2 64 {{todo/}}
Simon Urli 2.1 65
Vincent Massol 5.2 66 == Cache ==
Simon Urli 2.1 67
Vincent Massol 5.2 68 {{todo/}}
Simon Urli 2.1 69
Vincent Massol 5.2 70 == Default Value ==
Simon Urli 2.1 71
72 The value selected by default.
73
Vincent Massol 5.2 74 == Values ==
Simon Urli 2.1 75
76 The list of values to propose in the Static List.
Simon Urli 4.1 77 The [[edit separators>>||anchor="HMultiselectseparators28forediting29"]] must be used to separate the different values.
Simon Urli 3.1 78 Note that if [[Free text>>||anchor="HFreetext"]] is properly set, users might also be able to enter a custom value.

Get Connected