Forums de discussion
forward from one portlet to another portlet
curious Liferay, modifié il y a 14 années.
forward from one portlet to another portlet
Junior Member Publications: 57 Date d'inscription: 08/10/09 Publications récentes
Can anyone please tell me how can i forward from a portlet in Plugins SDK to a portlet in EXT. Both portlets are on different pages. Plz Plz answers my question. I tried
<a href="<liferay-portlet:actionURL portletName="book_reports">
</liferay-portlet:actionURL>">liren</a>
But the above code didn't help. I don't know what I am doing wrong.
<a href="<liferay-portlet:actionURL portletName="book_reports">
</liferay-portlet:actionURL>">liren</a>
But the above code didn't help. I don't know what I am doing wrong.
Amos Fong, modifié il y a 14 années.
RE: forward from one portlet to another portlet
Liferay Legend Publications: 2047 Date d'inscription: 07/10/08 Publications récentes
You can try using a portlet URL like this:
PortletURL portletURL = new PortletURLImpl(
request, portletId, plid (layout primary key),
PortletRequest.RENDER_PHASE);
portletURL.setWindowState(WindowState.MAXIMIZED);
portletURL.setPortletMode(PortletMode.VIEW);
portletURL.setParameter("struts_action", "/blah/blah");
Thiago Leão Moreira, modifié il y a 14 années.
RE: forward from one portlet to another portlet
Liferay Legend Publications: 1449 Date d'inscription: 10/10/07 Publications récentes
You can also do this:
<%
long plid = //get the plid of the other page from some service for instance LayoutServiceUtil
%>
<a href="<liferay-portlet:actionURL portletName="book_reports" plid="<%= plid%>"></liferay-portlet:actionURL>">liren</a>
Hope this helps
<%
long plid = //get the plid of the other page from some service for instance LayoutServiceUtil
%>
<a href="<liferay-portlet:actionURL portletName="book_reports" plid="<%= plid%>"></liferay-portlet:actionURL>">liren</a>
Hope this helps
Luis Rodríguez Fernández, modifié il y a 13 années.
RE: forward from one portlet to another portlet
Junior Member Publications: 86 Date d'inscription: 26/06/09 Publications récentes
Hi Thiago,
Works great for me!!! Thank you very much.
Just another little question: my target portlet is developed under struts2. Would it be possible to also specify a concrete action in the request?
Thanks in advance,
Luis
ps: I have a "plan b", develop a new action that works as a dispatcher...
Works great for me!!! Thank you very much.
Just another little question: my target portlet is developed under struts2. Would it be possible to also specify a concrete action in the request?
Thanks in advance,
Luis
ps: I have a "plan b", develop a new action that works as a dispatcher...
Thiago Leão Moreira, modifié il y a 13 années.
RE: forward from one portlet to another portlet
Liferay Legend Publications: 1449 Date d'inscription: 10/10/07 Publications récentes
Well, I think so. Just add <liferay-portlet:actionURL portletName="book_reports" plid="<%= plid%>"><portlet:param name="struts_path" value="/my/path/action" /></liferay-portlet:actionURL>
Is that what you are looking for? I think I didn't get the question.
Is that what you are looking for? I think I didn't get the question.
Luis Rodríguez Fernández, modifié il y a 13 années.
RE: forward from one portlet to another portlet
Junior Member Publications: 86 Date d'inscription: 26/06/09 Publications récentes
Hi Thiago,
This is just I am looking for!!! Thank you very much!!! I am going to try this snippet right now! As I can see there is little mix between the portlet library tags (<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>) and liferay-portlet libray tags (<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet"%>), nice...
Thank you very much,
Luis
This is just I am looking for!!! Thank you very much!!! I am going to try this snippet right now! As I can see there is little mix between the portlet library tags (<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>) and liferay-portlet libray tags (<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet"%>), nice...
Thank you very much,
Luis
Thiago Leão Moreira, modifié il y a 13 années.
RE: forward from one portlet to another portlet
Liferay Legend Publications: 1449 Date d'inscription: 10/10/07 Publications récentes
Good! Actually you don't need to mix taglib as I posted... it is a bad implementation. So just use liferay-portlet fr both taglibs.
Luis Rodríguez Fernández, modifié il y a 13 années.
RE: forward from one portlet to another portlet
Junior Member Publications: 86 Date d'inscription: 26/06/09 Publications récentes
Hi Thiago,
Works perfect!!!
Thank you very much,
Luis
Works perfect!!!
<liferay-portlet:actionurl portletname="<%=yourPortletName%>" plid="<%=yourPlid%>" var="url">
<portlet:param name="struts.portlet.action" value="/your/path/action" />
</liferay-portlet:actionurl>
Thank you very much,
Luis