How to call one portlet from another portlet in Liferay?

I created 3 portlets (description portlet, catalog portlet, polling portlet), and I want to call the description portlet from the catalog portlet. How to do it? Please help me.

I wrote the following code in the view.jsp file of the catalog portlet:

<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %> <liferay-portlet:renderURL var="linkURL" portletName="testi" windowState="maximized" /> <br> <a href="<%= linkURL%>">Testimonial</a> 

I can redirect to another page, but I got an error, for example

This portlet is not deployed. Reinstall it or delete the page.

Should I make changes to liferay-portlet.xml? Please help me.

+4
source share
2 answers

The portletName attribute value you specified seems to be incorrect. For this reason you receive this message. I just checked by specifying the invalid name "test" as portletName, while there is no portlet with a test name.

If <portlet-name>test</portlet-name> is an entry in your liferay-portlet.xml file, then specify portletName as test_WAR_testportlet , it will work.

If the other portlet is the Liferay Out of Box portlet, you can use the PortletKeys class.

NTN

+2
source

I had the same requirement. But I am very new to Liferay ... Therefore, I do not know more about the Liferay API.

So I used a web service to get portlet data for another portlet. It is really interesting and very easy ..

You can find out more about this.

Jersey RestFul webService

I did this and everything worked very well.

Thankssssss

0
source

All Articles