How to return a partial view from JIRA plugin WebWork action or command?

447 Views Asked by At

I have some parts of my plugin which are loaded through AJAX on demand. Now there is a problem that although my velocity template for that command does not contain html head nor body tags, still JIRA inserts them automatically when I request my view from http://localhost:2990/jira/secure/MyAction!myCommand.jspa

How do I return only HTML structure from my own Velocity .vm view and stop JIRA from injecting its headers and body?

1

There are 1 best solutions below

0
On

For the sake of completeness (if other users find this question): The answer is to wrap your template in a html body with the following header meta tag:

<meta name="decorator" content="none">

Additional information can be found under the same topic on Atlassian Answers.

The reason why a simple query parameter (?...&decorator=none...) has stopped working in Confluence 5 is documented in JIRA.