Page view or UI of JIRA project

Thank you for your visiting.

I added a project tabpanel named “Report & Scanner” which always links to a new panel on the right containing a table of all versions.

But when I click some link or button on the version table, I always get a new page, instead of displaying on the right panel.
The href of the link is like “/secure/TestAction.jspa”.

I want to know how to make the tidy and consistent page view , for example, which always appear on the right panel.

Thank you.

Im not sure what exactly the problem is

Now, when someone clicks a version link in the table, the right panel will be displayed as a whole page (Without the project-sidebar and the links within it), is that correct?

If yes, can you say what is the URL when you click on the “Report & Scanner” Link and what is when you click for instance on “version005” link?

You’ll need to decorate your page template with… well… decorators. The documentation on page decorators is a little scarce at the moment; and you’ll probably need to look at the JIRA source code directly. Have a look at the related conversation in this other Developer Community thread.

Yes, the right panel is displayed as a whole page without project sidebar, and this is not what I want.

“Report & Scanner” Link is defined within project tabpanel element in atlassian-plugin.xml. It refers to a subclass of
AbstractProjectTabPanel.

The URL of “version005” link is like “secure/TestAction!default.jspa”,which is the method of TestAction class extending from JiraWebActionSupport, and returns a view of velocity template.

The problem is how to make the right panel just on the right of project sidebar, instead of displaying as a whole page.

Thank you.

Thank you. I will try it.

Yes, I find it hard to get the documentation or description of page decorators.

Its important to know what exactly you trying to achieve. You use a webwork action and in my opinion a webwork action is supposed to manage a seperate view and on the other hand you have for your Project Panel a ContextProvider which is only responsible for your Project Panel.

Can you tell me what exactly should happen when a user navigate to your project panel and click the version link? Do you wish to append some content to your panel or is it in fact a new panel which should be displayed when a user clicks on version005?

Hi, @M.Abdel-Mola, thank you for your reply.

I wish the user could see a new panel after clicking on “version005”, and the new panel is also displayed just on the right like the previous one.

How can I make it? I am confused.

First of all, remove your Action Class it won’t fit with your requirement

I would highly recommend you to use a Simple HTTPServlet. Take a look right here

So, once you have a servlet you should communicate with it via AJAX. So when you only want to change the content of your panel, why would you trigger a page load? With AJAX you have a much better user experience. Now lets say you defined a servlet with URL Pattern “/helloworld”, then your link of version005 would look like this: JIRA_BASE_URL/plugins/servlet/helloworld?version=005

See, you just pass the version as a request-parameter and now you can prepare the content on the server side

public class MyServlet extends HttpServlet {

	@Override
    protected void doGet(final HttpServletRequest req, final HttpServletResponse resp)
        throws ServletException, IOException {
		String versionString = req.getParameter("version");
		
		VersionManager versionManager = ComponentAccessor.getVersionManager();
		Version versionObj = versionManager.getVersion(Long.valueOf(versionString));
		
		...prepare your content here....
	}

}

And here for example a simple AJAX call to your servlet

    $.get("JIRA_BASE_URL/plugins/servlet/helloworld?version=005", function(data, status){
        ...check the status and do something with the data...
    });

I hope I could help you with this

So long

@Page view or UI of JIRA project
@M.Abdel-Mola
Thank you for your time .I appreciate.