I have a requirement to add a "Test Connection" button to my task. When the button is clicked, based on the action response, the page should show a section which says whether the connection is successful or not. I could add the button and my action is triggered, however, different page is re-loaded. Is there a attribute to specify type="reload"?
Look at some samples with JS resources, for example https://bitbucket.org/atlassian/bamboo-build-times-plugin
You need to define web-resource element in atlassian-plugin.xml, it will be added to bundled and minified JS code then you can use it on your page
Can you also point me to samples, where the task UI config class and the ftl files can be kept in sync. I mean when the button is clicked, the UI should display a section with the status message.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Alexey,
Now struck with weird problem. If I inline the JS code, the function gets called, however including it via src='... doesn't work. Any help is appreciated.
Works...
<html> <script> function myFunction() { alert("Hello"); } </script> <body> [@ww.textfield labelKey="echoString.label" name="echoString" description="echoString.description" required='true'/] <input type="button" class="button" value="Click Me" onclick="myFunction()" /> </body> </html>
Doesn't work
<html> <script src="/js/helloworld.js"> </script> <body> [@ww.textfield labelKey="echoString.label" name="echoString" description="echoString.description" required='true'/] <input type="button" class="button" value="Click Me" onclick="myFunction()" /> </body> </html>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should create rest endpoint at server side and use JS to submit data from UI to this REST resource. So form will be not submitted, but all interaction between web page and server should be handled by AJAX
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.