Last modified by Simon Urli on 2023/10/10

From version 128.1
edited by Anca Luca
on 2023/01/10
Change comment: There is no comment for this version
To version 130.1
edited by Clément Desableau
on 2023/02/02
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.lucaa
1 +XWiki.cdesableau
Content
... ... @@ -71,7 +71,7 @@
71 71  * Parameter mandatory: Indicates if this particular parameter is mandatory, wiki macro will fail to execute if a mandatory parameter is missing
72 72  * {{version since="10.10"}}Parameter default value (optional): The default value of the parameter when it's empty{{/version}}
73 73  * {{version since="10.10"}}Parameter type (optional): Indicates to which Java type the parameter value (defined as a String) must be converted to (##java.lang.String## by default).{{/version}}
74 -** Example 1: ##java.awt.Color##. Will provide a Color Picker when the macro is edited in the WYSIWYG editor.
74 +** For more information about parameter types and custom parameter pickers, see: [[Documentation.DevGuide.Tutorials.WritingMacros.Using custom pickers for XWiki Rendering Macro parameters.WebHome]]
75 75  
76 76  Now we're going to extend our **hello macro** with a parameter. We will introduce a parameter named //greetUser// that will indicate if the greeting message should be tailored for the current user viewing the page. The definition of the parameter is shown below:
77 77  
... ... @@ -148,7 +148,7 @@
148 148  
149 149  = Bindings =
150 150  
151 -The usual XWiki [[scripting context bindings>>doc:extensions:Extension.Script Macro||anchor="#HBindings"]] are available in the scripts of the wiki macros, with the mention that contextual variables (such as ##$doc##) will point to the XWiki document (page) in which the macro is called, not to the XWiki document containing the objects that define the macro. This makes it easy to write features that are contextualized to the page where they're called.
151 +The usual XWiki [[scripting context bindings>>doc:extensions:Extension.Script Macro||anchor="HBindings"]] are available in the scripts of the wiki macros, with the mention that contextual variables (such as ##$doc##) will point to the XWiki document (page) in which the macro is called, not to the XWiki document containing the objects that define the macro. This makes it easy to write features that are contextualized to the page where they're called.
152 152  
153 153  Then, specific bindings for the wiki macro context are available, see [[the reference documentation page>>doc:extensions:Extension.WikiMacroStore.WebHome||anchor="HBindings"]].
154 154  

Get Connected