Show action result in a dialog

I'm new to jira-plugin development and I'm finding it a bit difficult to start with due to the lack of documentation and examples (at least it lacks in my opinion).

Right now I'm trying to show content on a dialog. What I've done so far is the following:

  • Create a link with href="/secure/myAction!myMethod.jspa" with class="trigger-dialog".
  • In the action method I prepare the data which I will show in the dialog. Which will finally call a view.
  • Prepare a .vm file which will show the content of the dialog.

I think at this point everything is ok, in fact I see the content of the dialog. But the problem is that I can't find how to set the title of the dialog, add buttons to the footer which can call other actions. Also I can't find how to specify the dialog size.

Googling and checking the documentation seems everybody creates the dialogs using Javascript. Is this the only way? In my opinion is easier to use the velocity template.

Is there any way to get specify all the options that are available using Javascript but using a velocity template?

Anyone knows about good site for examples and documentation for this?

Thank you!

5 answers

This widget could not be displayed.

Hi,

In this link there are more interesting examples

http://www.j-tricks.com/tutorials.html

Good Luck

This widget could not be displayed.

Hi zezeto,

thanks for the information. Unfortunately I didn't find anything there that can help me

This widget could not be displayed.

Hi,

I think that to use velocity template, you must devlop a webworkaction.

You can call this action with function openMultiWindow

This widget could not be displayed.

Hi zezeto,

I already have the webwork action created.

With openMultiWindow you mean a JavaScript function like the following?

function openMultiWindow() {
var vWin = window.open('/secure/MyAction!method.jspa', 'UserPicker', 'status=yes,resizable=yes,top=100,left=200,width=580,height=750,scrollbars=yes');
vWin.opener = self;
vWin.focus();
}

This opens a new window, but I haven't found any other reference to openMultiWindow. Am I missing something?

Using this I also had to remove the class="trigger-dialog". Otherwise I get an error

This widget could not be displayed.

Hi,

Can you post me the URL of the pop up window?

And I think that you have omitted the context path

replace your url with this url :contextPath+ /secure/MyAction!method.jspa', 'UserPicker'

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

147 views 16 7
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you