How to redirect to project tab-panel?

Ashish Grover December 15, 2011

I am creating a plugin that somewhen needs to redirect to the project tab-panel like it is on the very first page of plugin execution.

Any help?

2 answers

1 accepted

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 16, 2011

In the action class, you can return getRedirectUrl("tab_panel_url") instead of returning a view!

Ashish Grover December 18, 2011

i couldn't find getRedirectUrl(String)...instead i got getRedirect(String) and getReturnUrl()!

But getRedirect("string") returns ERROR irrespective of "string"...when there are error messages. Otherwise it throws IllegalStateException!

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 18, 2011

getRedirect(String) is what you need. ERROR will be returned if there is an error. forceRedirect will take you to the url irrespective of the error.

Not sure why you are getting IllegalStateException. That should be some error in your code!


Ashish Grover December 19, 2011

so now its displaying the panel tab...but i want some to send some error messages to it as request params...

i think coz its redirecting hence a new request and all the prarams are lost.

any way round?

0 votes
Dipti Ranjan Behera
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2013

Hi Ashish,

Send the parameter over url and access it through

HttpServletRequest request = ActionContext.getRequest();

It is just a workaround.

Regards,
Dipti Ranjan Behera

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events