留言板

how to use response.sendRedirect ("") in IPC eventing

neelam bhandari,修改在12 年前。

how to use response.sendRedirect ("") in IPC eventing

Regular Member 帖子: 102 加入日期: 11-8-16 最近的帖子
hi,
how to use response.sendRedirect ("") with IPC eventing mechanism to jump from one page to another page in portal?

Neelam Bhandari
thumbnail
Samir Gami,修改在12 年前。

RE: how to use response.sendRedirect ("") in IPC eventing

Regular Member 帖子: 162 加入日期: 11-2-4 最近的帖子
Can you provide little bit more information, What you want to do with IPC event mechanism ??
neelam bhandari,修改在12 年前。

RE: how to use response.sendRedirect ("") in IPC eventing

Regular Member 帖子: 102 加入日期: 11-8-16 最近的帖子
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.
neelam bhandari,修改在12 年前。

RE: how to use response.sendRedirect ("") in IPC eventing

Regular Member 帖子: 102 加入日期: 11-8-16 最近的帖子
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
thumbnail
Nagendra Kumar Busam,修改在12 年前。

RE: how to use response.sendRedirect ("") in IPC eventing

Liferay Master 帖子: 678 加入日期: 09-7-7 最近的帖子
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
neelam bhandari,修改在12 年前。

RE: how to use response.sendRedirect ("") in IPC eventing

Regular Member 帖子: 102 加入日期: 11-8-16 最近的帖子
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
thumbnail
Nagendra Kumar Busam,修改在12 年前。

RE: how to use response.sendRedirect ("") in IPC eventing

Liferay Master 帖子: 678 加入日期: 09-7-7 最近的帖子
In that case why can't you have both search portlet & Po2 in the same page? It's an easy way right
thumbnail
Samir Gami,修改在12 年前。

RE: how to use response.sendRedirect ("") in IPC eventing

Regular Member 帖子: 162 加入日期: 11-2-4 最近的帖子
neelam 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.... emoticon
thumbnail
Samir Gami,修改在12 年前。

RE: how to use response.sendRedirect ("") in IPC eventing

Regular Member 帖子: 162 加入日期: 11-2-4 最近的帖子
Samir Gami:

There may be some way to pass IPC event to portlet that lies on other page.... emoticon


    #
    # 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,修改在12 年前。

RE: how to use response.sendRedirect ("") in IPC eventing

Regular Member 帖子: 102 加入日期: 11-8-16 最近的帖子
@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
thumbnail
Samir Gami,修改在12 年前。

RE: how to use response.sendRedirect ("") in IPC eventing

Regular Member 帖子: 162 加入日期: 11-2-4 最近的帖子
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 ?
neelam bhandari,修改在12 年前。

RE: how to use response.sendRedirect ("") in IPC eventing

Regular Member 帖子: 102 加入日期: 11-8-16 最近的帖子
I have used this property in my properties-ext file

portlet.event.distribution=layout-set

for the portlet eventing across pages.

cheers