I feel like this is something obvious, but I can't seem to figure it out. What is the simplest way to get a button to start running code in a Java class? Another related question I have, is where does the relative path of a link element in a web item begin from?
The few open source examples I can find of buttons that do things, rather than link to an absolute URL somewhere, aren't really helping me. I have put a lot of independent research and digging around into this and I am now stumped.
My goal (For now. One step at a time) is to make a button that is exactly the same as the Approve button for a pull request.
Any help with this issue would be amazing!
As far as getting from a web-item button to Java code, there is no "direct" way to do this. You're asking how to take a button clicks on the client, and have it execute some Java code on the server.
This requires either using JS to make an AJAX call to a REST endpoint when the user clicks the button and then alters the current page based on the result your REST endpoint returns, or pointing the button's link to a servlet that serves your custom content in a fresh page.
Atlassian has great developer docs that will walk through most examples, but probably in some separate places.
* general stash development (make your first plugin)
* available module types ( your plugin will use 1 or more of these )
* matching the UI
I have already read through the first two links several times, and yet am still unsure of the answers to my two questions. While I am fully aware that this could be a deficiency on my part, it is not from lack of trying and I was hoping for a more specific answer.
The documentation for web-items doesn't really explain what can be linked to in the link field. Every example I find just links to an absolute URL like "http://www.google.com". The component module seems to be for connecting modules with each other, so I thought it might help me, but the documentation doesn't really explain how to do that, just that it enables such a connection. The section on Creating Plugin Module Instances seemed promising, but it just explains about how parameters to the class are injected, not how to control execution.
I feel like I must be missing some really basic understanding of something, and maybe I am in over my head, but I am not really willing to give up, so any help would be hugely appreciated.
Thanks in advance!
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs