Last modified by Simon Urli on 2023/10/10

<
From version < 118.1 >
edited by Thomas Mortagne
on 2021/02/09
To version < 118.2 >
edited by Vincent Massol
on 2021/02/15
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.ThomasMortagne
1 +XWiki.VincentMassol
Content
... ... @@ -29,10 +29,10 @@
29 29  * **Macro content type**: {{warning}}this field has been renamed **Macro Content Availability** since 11.5RC1{{/warning}} the type of accepted content: two values are proposed, ##WIKI## if this content should be editable like a wiki content, or ##UNKNOWN## if it should be displayed like a plain text. It's also possible to specify a custom java type such as {{code language="java"}}java.util.List<java.lang.String>{{/code}}. Leaving the field blank is equivalent to ##UNKWOWN## value.
30 30  * **Content description**: A short description about the macro's content to be displayed on the WYSIWYG editor
31 31  * **Macro code**: The actual wiki code that will be evaluated when the macro is executed, can be any xwiki content (should be in the same syntax as the document)
32 -* **Priority**: {{info}}Since 13.1{{/info}} The priority of execution relative to the other Macros. The lowest values have the highest priorities and execute first. For example a Macro with a priority of 100 will execute before one with a priority of 500. The default value is 1000.
33 -* **Asynchronous rendering**: {{info}}Since 10.10{{/info}} Enabled or disable asynchronous rendering of the panel. Disabled by default.
34 -* **Cached**: {{info}}Since 10.10{{/info}} Indicate if the result of the execution of the element should be cached. Disabled by default.
35 -* **Context elements**: {{info}}Since 10.10{{/info}} The context information required during the execution of the extension (current user, current document, etc.). It's also used to generate the cache key.
32 +* {{version since="13.1RC1"}}**Priority**: The priority of execution relative to the other Macros. The lowest values have the highest priorities and execute first. For example a Macro with a priority of 100 will execute before one with a priority of 500. The default value is 1000.{{/version}}
33 +* {{version since="10.10"}}**Asynchronous rendering**: Enabled or disable asynchronous rendering of the panel. Disabled by default.{{/version}}
34 +* {{version since="10.10"}}**Cached**: Indicate if the result of the execution of the element should be cached. Disabled by default.{{/version}}
35 +* {{version since="10.10"}}**Context elements**: The context information required during the execution of the extension (current user, current document, etc.). It's also used to generate the cache key.{{/version}}
36 36  
37 37  Now we can define our hello macro as shown below:
38 38  
... ... @@ -76,8 +76,8 @@
76 76  * Parameter name: Name of the parameter, users will refer this name when invoking your macro with parameters
77 77  * Parameter description (optional): A short description of the parameter, this description will be made available on the WYSIWYG editor
78 78  * Parameter mandatory: Indicates if this particular parameter is mandatory, wiki macro will fail to execute if a mandatory parameter is missing
79 -* Parameter default value (optional): {{info}}Since 10.10{{/info}} The default value of the parameter when it's empty
80 -* Parameter type (optional): {{info}}Since 10.10{{/info}} Indicates to which Java type the parameter value (defined as a String) must be converted to (##java.lang.String## by default).
79 +* {{version since="10.10"}}Parameter default value (optional): The default value of the parameter when it's empty{{/version}}
80 +* {{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}}
81 81  ** Example 1: ##java.awt.Color##. Will provie a Color Picker when the macro is edited in the WYSIWYG editor.
82 82  
83 83  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:

Get Connected