Last modified by Vincent Massol on 2023/07/02

Show last authors
1 The ##type## property of a ##XWiki.WikiMacroParameterClass## object allows to specify into which Java type the parameter value (defined as a String) must be converted to.
2 Depending of the type provided, a custom picker can be used instead of the default one when editing the macro parameters in the wysiwyg editor.
3
4 Here are the types implementing a custom picker:
5
6 |=Type|=Picker
7 |##org.xwiki.model.reference.AttachmentReference##|Attachment picker
8 |##java.lang.Boolean##|Checkbox
9 |##java.awt.Color##|Color picker
10 |##java.util.Date##|Date picker
11 |##org.xwiki.model.reference.DocumentReference##|Page picker
12 |##org.xwiki.model.reference.EntityReferenceString##|Custom picker for entity references
13 |##org.xwiki.model.EntityType##|Custom picker for entity types
14 |##org.xwiki.user.UserReference##|User Picker
15
16 You can also provide the reference of an existing Java ##Enum## to get a custom select picker with its values. If you want to create a custom enum for your parameter, you can try [[the following approach>>Documentation.DevGuide.Tutorials.WritingMacros.Using custom enum select picker for Wiki Macro parameters.WebHome]].
17
18 You can find the {{scm path="xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/html_displayer"}}pickers implementation{{/scm}}.

Get Connected