Hi,
I want to display object variables values in dialog box.
function showSth(myObj) { var dialog = new AJS.Dialog(860, 530); dialog.addPanel("Panel 1", "here I want to put object values", "panel-body"); alert(myObj); dialog.show(); }
<input id="test-button" type="button" class="button" onclick="showSth($myObj);" value="Popup - Click Me">
As parameter I give java model object, that extends Entity interface, but after click on button nothing happens.
I would be appreciated for any code examples
I'd have a look at the REST tutorial. The "wrong" way to do it is have your javascript generated by a velocity template, which has access to the java objects.
The "right" way is to write a REST module, when your dialog is opened it makes an ajax request, receives JSON, and displays it as it needs to.
Do you have any Java code examples, because examples in https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Version+2+Tutorial was in Python
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have been through this tutorial and found it helpful: https://developer.atlassian.com/display/DOCS/Incomplete+Plugin+Tutorial+-+Writing+REST+Services
Says incomplete but I got what I needed from it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.