Foren
how to use response.sendRedirect ("") in IPC eventing
neelam bhandari, geändert vor 12 Jahren.
how to use response.sendRedirect ("") in IPC eventing
Regular Member Beiträge: 102 Beitrittsdatum: 16.08.11 Neueste Beiträge
hi,
how to use response.sendRedirect ("") with IPC eventing mechanism to jump from one page to another page in portal?
Neelam Bhandari
how to use response.sendRedirect ("") with IPC eventing mechanism to jump from one page to another page in portal?
Neelam Bhandari
Samir Gami, geändert vor 12 Jahren.
RE: how to use response.sendRedirect ("") in IPC eventing
Regular Member Beiträge: 162 Beitrittsdatum: 04.02.11 Neueste Beiträge
Can you provide little bit more information, What you want to do with IPC event mechanism ??
neelam bhandari, geändert vor 12 Jahren.
RE: how to use response.sendRedirect ("") in IPC eventing
Regular Member Beiträge: 102 Beitrittsdatum: 16.08.11 Neueste Beiträge
I want to redirect to another page along with generating event i.e in my action class i want both event generation and page redirection.I am using spring 3 portlets.
Hope i have made myself clear.
Hope i have made myself clear.
neelam bhandari, geändert vor 12 Jahren.
RE: how to use response.sendRedirect ("") in IPC eventing
Regular Member Beiträge: 102 Beitrittsdatum: 16.08.11 Neueste Beiträge
Hi Samir,
I guess I didnt explain completely. Here is the complete description.
I have page 1 which has Search portlet in it. and there is another page 2 which has two portlets, lets say Po1 and Po2 .
When search is made in search portlet in page 1 results are displayed on both Po1 and Po2 in page 2 .
Previously I used Eventing for communication but that is creating trouble .
So in my controller in search portlet I am using code like this
PortletURL redirectURL = PortletURLFactoryUtil.create(PortalUtil.getHttpServletRequest(request),
"propertyReceiver_WAR_Property_Reciever_INSTANCE_Im98",plid, PortletRequest.RENDER_PHASE);
redirectURL.setParameter("region", request.getParameter("region"));
redirectURL.setParameter("startDate", startDate);
redirectURL.setParameter("endDate", endDate);
redirectURL.setParameter("rooms", request.getParameter("rooms"));
redirectURL.setParameter("days", Integer.toString(daysBetween(startCalendar.getTime(),endCalendar.getTime())));
response.sendRedirect(redirectURL.toString());
problem here is now only one portlet Po1 (Property_Reciever ) gets the parameters.Portlet Po2 does not.
Is there any way to solve this problem.
Thanks
Neelam
I guess I didnt explain completely. Here is the complete description.
I have page 1 which has Search portlet in it. and there is another page 2 which has two portlets, lets say Po1 and Po2 .
When search is made in search portlet in page 1 results are displayed on both Po1 and Po2 in page 2 .
Previously I used Eventing for communication but that is creating trouble .
So in my controller in search portlet I am using code like this
PortletURL redirectURL = PortletURLFactoryUtil.create(PortalUtil.getHttpServletRequest(request),
"propertyReceiver_WAR_Property_Reciever_INSTANCE_Im98",plid, PortletRequest.RENDER_PHASE);
redirectURL.setParameter("region", request.getParameter("region"));
redirectURL.setParameter("startDate", startDate);
redirectURL.setParameter("endDate", endDate);
redirectURL.setParameter("rooms", request.getParameter("rooms"));
redirectURL.setParameter("days", Integer.toString(daysBetween(startCalendar.getTime(),endCalendar.getTime())));
response.sendRedirect(redirectURL.toString());
problem here is now only one portlet Po1 (Property_Reciever ) gets the parameters.Portlet Po2 does not.
Is there any way to solve this problem.
Thanks
Neelam
Nagendra Kumar Busam, geändert vor 12 Jahren.
RE: how to use response.sendRedirect ("") in IPC eventing
Liferay Master Beiträge: 678 Beitrittsdatum: 07.07.09 Neueste Beiträge
Hi Neelam,
You said you have two protlets Po1 & Po2 on page 2.
What they are displaying exactly
> Does both of them are displaying same results? Why you want to target to two different portlets on same page on certain event.
Brief a little bit more about exactly what you are doing in Po1 & Po2 as well
Thanks,
- Nagendra Kumar
You said you have two protlets Po1 & Po2 on page 2.
What they are displaying exactly
> Does both of them are displaying same results? Why you want to target to two different portlets on same page on certain event.
Brief a little bit more about exactly what you are doing in Po1 & Po2 as well
Thanks,
- Nagendra Kumar
neelam bhandari, geändert vor 12 Jahren.
RE: how to use response.sendRedirect ("") in IPC eventing
Regular Member Beiträge: 102 Beitrittsdatum: 16.08.11 Neueste Beiträge
Hi Nagendra,
My portlet Po1 is displaying the search criteria selected in search portlet on Page 1 and portlet Po2 displays the results for the search.
So basically i need both the portlets in one page.
I am stuck here as I cannot forward url to two portlets.
Many thanks
Neelam Bhandari
My portlet Po1 is displaying the search criteria selected in search portlet on Page 1 and portlet Po2 displays the results for the search.
So basically i need both the portlets in one page.
I am stuck here as I cannot forward url to two portlets.
Many thanks
Neelam Bhandari
Nagendra Kumar Busam, geändert vor 12 Jahren.
RE: how to use response.sendRedirect ("") in IPC eventing
Liferay Master Beiträge: 678 Beitrittsdatum: 07.07.09 Neueste Beiträge
In that case why can't you have both search portlet & Po2 in the same page? It's an easy way right
Samir Gami, geändert vor 12 Jahren.
RE: how to use response.sendRedirect ("") in IPC eventing
Regular Member Beiträge: 162 Beitrittsdatum: 04.02.11 Neueste Beiträgeneelam bhandari:
PortletURL redirectURL = PortletURLFactoryUtil.create(PortalUtil.getHttpServletRequest(request),
"propertyReceiver_WAR_Property_Reciever_INSTANCE_Im98",plid, PortletRequest.RENDER_PHASE);
redirectURL.setParameter("region", request.getParameter("region"));
redirectURL.setParameter("startDate", startDate);
redirectURL.setParameter("endDate", endDate);
redirectURL.setParameter("rooms", request.getParameter("rooms"));
redirectURL.setParameter("days", Integer.toString(daysBetween(startCalendar.getTime(),endCalendar.getTime())));
response.sendRedirect(redirectURL.toString());
Basically you want to pass some values to portlets on other page, For that You can explore,
1) Public Render Parameter, or
2) Use parameter with "LIFERAY_SHARED_ " prefix,
portletSession.setSetAttribute(LIFERAY_SHARED_ParamName , Value,PorletSession.APPLICATION_SCOPE)
//And to retrieve value
PortletSession.getAttribute(LIFERAY_SHARES_ParamName,PortletSession.APPLICATION_SCOPE)
For navigation, from search page to the other page, you can make use of the render URL of any portlet.
There may be some way to pass IPC event to portlet that lies on other page....
Samir Gami, geändert vor 12 Jahren.
RE: how to use response.sendRedirect ("") in IPC eventing
Regular Member Beiträge: 162 Beitrittsdatum: 04.02.11 Neueste BeiträgeSamir Gami:
There may be some way to pass IPC event to portlet that lies on other page....
#
# Set this property to specify how events are distributed. If the value is
# "layout-set", then events will be distributed to all portlets contained in
# a layout set. If the value is "layout", then events will be distributed to
# all portlets that are present in a layout.
#
portlet.event.distribution=layout
neelam bhandari, geändert vor 12 Jahren.
RE: how to use response.sendRedirect ("") in IPC eventing
Regular Member Beiträge: 102 Beitrittsdatum: 16.08.11 Neueste Beiträge
@Nagendra- yes I am planning to use one portlet on results page. Another portlet was used on that page because user can search through that portlet (Po1) too similar to search portlet.
@ Samir,
Many thanks for your reply.I have already implemented this eventing approach but this causes problem when user opens two tabs and do two different search in those tabs.
That is why I started looking for option.Most likely I will use one portlet on results page.
Thanks to both of you.
Neelam
@ Samir,
Many thanks for your reply.I have already implemented this eventing approach but this causes problem when user opens two tabs and do two different search in those tabs.
That is why I started looking for option.Most likely I will use one portlet on results page.
Thanks to both of you.
Neelam
Samir Gami, geändert vor 12 Jahren.
RE: how to use response.sendRedirect ("") in IPC eventing
Regular Member Beiträge: 162 Beitrittsdatum: 04.02.11 Neueste Beiträge
Glad to know, You have archive this through event....
Have you done any setting to get event on other page, except this event.distribution properties ?
Have you done any setting to get event on other page, except this event.distribution properties ?
neelam bhandari, geändert vor 12 Jahren.
RE: how to use response.sendRedirect ("") in IPC eventing
Regular Member Beiträge: 102 Beitrittsdatum: 16.08.11 Neueste Beiträge
I have used this property in my properties-ext file
portlet.event.distribution=layout-set
for the portlet eventing across pages.
cheers
portlet.event.distribution=layout-set
for the portlet eventing across pages.
cheers