I'm making a macro that displays a popup list, and if the user selects something from this popup list, the macro should remember that choice.
Here's what I've got so far:
## @param SelectedItem:title=Selected List Item|type=string|required=true|desc=Whichever item was last chosen from the list. ## @param MacroListOptions:title=Macro List Options|type=string|required=true|desc=A comma-separated list of text items.|multiple=true #requireResource("com.atlassian.auiplugin:aui-experimental-dropdown2") <a href="#macroList" aria-owns="macroList" aria-haspopup="true" class="aui-dropdown2-trigger aui-style-default">$paramSelectedItem</a> <div id="macroList" class="aui-dropdown2 aui-style-default"> <ul class="aui-list-truncate"> #foreach($listOption in $paramMacroListOptions) <li><a href="editMacroBody(\"$listOption\")">$listOption</a></li> #end </ul> </div><!-- macro list --> <script><!-- function editMacroBody(selectedString) { // $paramSelectedItem = selectedString } //--></script>
All I need to finish the macro is a bit of information that I haven't been able to track down in the docs:
1. How do I implement the "foreach" loop to iterate over the values of an @param flagged with "multiple"?
2. How do I save the "SelectedItem" @param, so that it is retained when editMacroBody runs?
Thanks in advance to anyone who can help me with this.
Community moderators have prevented the ability to post new answers.
This is like creating a form right? I'm wondering this can help
http://docs.servicerocket.com/display/SCAF/Scaffolding+Plugin
Yes, it's definitely doable via purchasing the Scaffolding plugin or the Run Plugin, but this seems like overkill for what should be a simple operation...
Also, our Confluence install has unlimited users, which according to the pricing chart for both, appears to mean we'd have to pay infinity dollars? I've tried to get pricing info from the developer of Scaffolding, but haven't got an answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the end, we did end up using Scaffolding, so here's your karma. =)
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.