Background:
I have started with programming Confluence Macros.
I have added the <xhtml-macro> tag to my atlassian-plugin.xml
I have created a Java class that implements the Macro Interface.
The Macro is working so far.
What I want to do and haven't found a way to do so far:
(1) I want to dynamically add parameter values to an enum based parameter depending on what is the content of the confluence page the user is currently working on.
(It doesn't necessarily need to be a enum based parameter, but there should be values to choose from.
(2) I want the user to be able to dynamically add new parameters. This kind of feature is already available in the content by label Plugin, where you can add as many filters as you like.
What is the right way to approach this?
Thanks you!
Unfortunatly I haven't found any way to solve this via pure Java.
An alternative however is to work with Javascript, where you process all the data the user has given in the input fields of the macro and use a key value pair format, for instance JSON, to code all the information you need as a String. Then in your Java code you can decode the JSON, that is all the parameters that you have put into just one parameter beforehand.
Hi,
So, you have to inject your frontend dialog via JS and then have a dynamic API to get the content of the page and update the Enum accordingly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi. I have the same question and could not find anything proper. Have you solved the problem? If yes can you please answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey!
Unfortunatly I haven't found any way to solve this via pure Java.
An alternative however is to work with Javascript, where you process all the data the user has given you and use a key value pair format for instance JSON to code all the information you need as a String. Then in your Java code you can decode the JSON that is all the parameters that you have put into just one parameter beforehand.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.