Hi,
At first the following scenario.
I have a portalpage PAGE1 with the portlet PORTLET1 and the portalpage PAGE2 with the portlet PORTLET2. In my portlet PORTLET1 i have a button which sets a public render parameter. After a click on the button I want to navigate to the PAGE2 where the public render parameter will shown within the PORTLET2.
That the PORTLET2 can access to the public render parameter wich the PORTLET1 set, I solved like described in
http://blogs.sun.com/deepakg/entry/coordination_between_portlets_across_pages
But now I want to realise the navigation from the PAGE1 to PAGE2 when i click to the button within the PORTLET1.
I know that I can achieve this by setting "Link to Page" within the "Look and Feel" of the PORTLET1. But I want to implement it.
So for that i tried to send a redirect within the processAction method
1
2public class MyPortlet extends javax.portlet.faces.GenericFacesPortlet {
3...
4public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException, IOException {
5super.processAction(actionRequest, actionResponse);
6actionResponse.sendRedirect("http://localhost:8080/web/guest/privatepage2");
7}
8...
9}
The redirect works fine if I don't set the render parameter and don't call
super.processAction(actionRequest, actionResponse);
But whe I do it, the redirect don't works because of the Exception
"Illegal to sendRedirect after setting window state, portlet mode, or render parameters".
I know this behavior is defined by the portlet spec., but how can I achieve the page to page navigation and the IPC?
Somebody know a solution for that?
(I am using Liferay 5.2.3 on JBoss 5.1 with the JBoss portletbridge 2.0.0.CR1 and JSF RI 1.2_13)
Please sign in to flag this as inappropriate.