Get selected option inside JIRA action class from velocity (.vm file)

Hello,
I’m looking for an answer that I have already asked on stackoverflow but found no reaction :< Maybe here somone can help me. Link to issue: https://stackoverflow.com/questions/53007511/get-selected-option-inside-jira-action-class-from-velocity-vm-file

Thank you very much!

Hi @rudekreg,

Disclaimer: Haven’t worked with WebActions yet, so I might be wrong about this.

From my understanding, Velocity is only a rendering engine. So once the page is rendered, I don’t think you can call a Java function. Any Java function calls happen during rendering, i.e. before the user can interact with the site.

In order to get the content the user selected, you’ll have to do something in Javascript (for example using jQuery once someone clicks that save link) or submit the form and react to that POST request from the form submit in your Java class.

Hope that helps.
Cheers,
Tobi