Liferay portlet: redirect to an other jsp page from javascript

后端 未结 2 1780
猫巷女王i
猫巷女王i 2021-01-22 19:29

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

2条回答
  •  失恋的感觉
    2021-01-22 20:02

    Liferay needs to know the target portlet for any request parameter that you add to an URL - otherwise it ignores any unknown parameter. The ID of the target portlet is either defined as p_p_id or it is a prefix of the parameter (in which case you can define parameters for more than one portlet in one URL).

    So in your case you will have to set renderUrl1.setPortletId('...your portlet id'); to let your portlet see mvcPath and param.

    In addition the mvcPath must be absolute (start with a /) and below the configured templatePath (defaults to /).

提交回复
热议问题