I want to redirect to an other jsp page in a liferay portlet from js. The idea that I found is using a renderurl. The best code that I found that can help me as a first step is this one:
<a id="renderURLWithJS" href=""> This render URL link is created with Javascript</a>
<aui:script>
AUI().use('liferay-portlet-url', function(A) {
var param="Hello new jsp";
var renderUrl1 = Liferay.PortletURL.createRenderURL();
renderUrl1.setWindowState("<%=LiferayWindowState.NORMAL.toString() %>");
renderUrl1.setParameter("param",param);
renderUrl1.setParameter('mvcPath', 'display.jsp'); /* is this correct???*/
renderUrl1.setPortletMode("<%=LiferayPortletMode.VIEW %>");
A.one("#renderURLWithJS").set('href',renderUrl1.toString());
});
</aui:script>
But the problem is that I'm always redirected to the same actual page (view.jsp) not to the jsp page that I want display.jsp.
Does someone have an idea what's wrong with my code?