[xwiki-users] MacroParameters with custom fields
Hi All, Tell me please is it possible to use in MacroProperties classes fields with values from external sources? For example I have list of project from Jira or Redmine and I would like to select one project from ListBox from "Insert Macro” dialog box So for example I have macro issues and it has mandatory parameter project. I can write follow macro {{issues project=“PROJECT_NAME”}} In such case I have to know PROJECT_NAME which is existed but If I don’t know it, I could be able to select Macro-> Insert Macro select My Macro and select project from combo box But all I see it is possible to use only Enum classes for this dialog… Best regards, Maksim Birukov
Hi Maksim, On 4 Mar 2016 at 09:48:15, Maksim Birukov ([email protected](mailto:[email protected])) wrote:
Hi All,
Tell me please is it possible to use in MacroProperties classes fields with values from external sources? For example I have list of project from Jira or Redmine and I would like to select one project from ListBox from "Insert Macro” dialog box
So for example I have macro issues and it has mandatory parameter project. I can write follow macro {{issues project=“PROJECT_NAME”}} In such case I have to know PROJECT_NAME which is existed but If I don’t know it, I could be able to select Macro-> Insert Macro select My Macro and select project from combo box
But all I see it is possible to use only Enum classes for this dialog…
What you are looking for is Typed Macro Parameters. This already exists at the Java level. For example if you check https://github.com/xwiki/xwiki-rendering/blob/9e4974d280f409b3ad216a6dba48b3... you’ll see some properties are of type ResourceReference, List<? extends Block>, etc). What we’re missing ATM is a way for the WYSIWYG editor to display them in a typed way. Right now the WYSIWYG editor’s macro dialog box only shows strings and enums. This is http://jira.xwiki.org/browse/XWIKI-6371 and http://design.xwiki.org/xwiki/bin/view/Design/Propertiesdisplayers Thanks -Vincent
Best regards, Maksim Birukov
participants (2)
-
Maksim Birukov -
vincent@massol.net