Want to implement: I have two pages with one portlet each. On click of link i want to move from first page portlet to another page portlet. For that i have written:
<aui:script>
function openCompanyPage(companyId) {
AUI().use(
'liferay-portlet-url',
'aui-resize-iframe',
function(A) {
var navigationURL;
var portletURL = Liferay.PortletURL.createRenderURL();
var url = themeDisplay.getLayoutURL();
portletURL.setParameter("employerId", companyId);
portletURL.setPortletId(A.one('#custSupportPortletId'));
navigationURL = portletURL.toString();
window.location = navigationURL;
}
);
</aui:script>
but i am getting error as Liferay.PortletURL is undefined on bold line. I have already provided :
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet"%>
<%@ taglib uri="http://liferay.com/tld/util" prefix="liferay-util"%>
Please let me know the possible reason for this.
OR What is other way to create the Render portlet URL.