Hi,
This thread relates to the two JIRA issues XWIKI-18063, XWIKI-18066.
When executing wiki macros, there can be some cases where a macro would need to update its own parameters or content at execution time.
For example, a macro created with with {{myMacro paramA="1"/}}
could compute the default value of another of its parameters (XWIKI-18066) or of its content (XWIKI-18063) based on the first parameter that was given.
Note that once a macro modifies its parameters (or content) during its execution, the document still has to be saved in order to persist these modifications. As such, this feature would be only useful today when macros are edited through the WYSIWYG editor of XWiki : when adding a macro in the editor, the content of the page is re-rendered, triggering the transformation of the wiki macros present in the page, which can use this opportunity to modify their content / parameters. When editing pages in wiki mode, this rendering process does not occur, and thus, the content or the parameters of the macros would stay the same. Considering that we have been pushing for the use of the WYSIWYG editor everywhere over the past years, it does not seem to be an important blocker to me.
Even though this change is not super invasive and does not require to touch the code base that much, it still impacts the transformation process of wiki macros, and needs to be carefully considered.
WDYT ?
Thanks,
Clément