Skip to content

Instantly share code, notes, and snippets.

@amitccet
Created June 27, 2013 19:09
Redirect to render after submit
String portletName = (String)actionRequest.getAttribute(WebKeys.PORTLET_ID);
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
PortletURL redirectURL = PortletURLFactoryUtil.create(PortalUtil.getHttpServletRequest(actionRequest),portletName,
themeDisplay.getLayout().getPlid(), PortletRequest.RENDER_PHASE);
redirectURL.setParameter("parameter", "value"); // set required parameter that you need in doView or render Method
actionResponse.sendRedirect(redirectURL.toString());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment