Foros de discusión

Render one portlet jsp in another portlet (two different plugin projects)

thumbnail
sumanth s, modificado hace 8 años.

Render one portlet jsp in another portlet (two different plugin projects)

New Member Mensajes: 10 Fecha de incorporación: 13/02/16 Mensajes recientes
Hi,

I am facing an issue with rendering from one plugin portlet to another portlet (two different plugin projects). I had created three plugin projects like portlet_1, portlet_2 and portlet_3.
I wanna render portlet_2 from portlet_1 through the render url, So i created portlet_2 render url in portlet_1 like below

<liferay-portlet:renderURL var="portlet2Url" plid="<%= themeDisplay.getPlid()%>" portletName="TestPortlet2_WAR_TestPortlet2portlet" windowState="<%=LiferayWindowState.NORMAL.toString() %>">
</liferay-portlet:renderURL>

and appended to a link like <a href="<%=portlet2Url.toString()%>">Portlet 2 Link</a>. I dropped portlet_1 and portlet_3 in a page but i dint dropped portlet_2 bcoz i want to render portlet_2 from portlet _1. After dropping portlet_1 i clicked on the link but portlet_2 is not rendering.

But if i put windowState="<%=LiferayWindowState.MAXIMIZED.toString() %>" then it is rendering. In this case portlet_2 is rendering total page here portlet_3 is hiding. I dont want to use MAXIMIZED state.

If anyone knows about this issue plz let me know.

Thanks...
thumbnail
Olaf Kock, modificado hace 8 años.

RE: Render one portlet jsp in another portlet (two different plugin projec

Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
Having that kind of hidden interdependency looks wrong to me. I'd avoid this architecture at all cost
thumbnail
Chandan Sharma, modificado hace 8 años.

RE: Render one portlet jsp in another portlet (two different plugin projec

Junior Member Mensajes: 54 Fecha de incorporación: 4/03/14 Mensajes recientes
Olaf Kock:
Having that kind of hidden interdependency looks wrong to me. I'd avoid this architecture at all cost


Hi Olaf Kock,

Can you suggest some alternate implementation of such type of requirement in order to avoid the above architectural issue.

Any alternate suggestion on it ?
thumbnail
Olaf Kock, modificado hace 8 años.

RE: Render one portlet jsp in another portlet (two different plugin projec

Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
Chandan Sharma:
Can you suggest some alternate implementation of such type of requirement in order to avoid the above architectural issue.


If you can't think of an alternative way to develop that same UI for different portlets, at least make them look like they belong together and package them in the same plugin. This way you'll have the interdependencies obvious and can just natively reuse a jsp from a "common" folder.

Now if I would indeed choose this solution or try to come up with another one: it depends (TM)
I'd need to understand more of the underlying problem. Maybe this "same UI" issue can be eliminated by a totally different way to structure the portlets.
thumbnail
Sushil Patidar, modificado hace 8 años.

RE: Render one portlet jsp in another portlet (two different plugin projec

Expert Mensajes: 467 Fecha de incorporación: 31/10/11 Mensajes recientes
Hi,

As an workarround, another portlet jsp can be rendered on the same page using Window State POP_UP/EXCLUSIVE using pop up window.

Regards
thumbnail
Chandan Sharma, modificado hace 8 años.

RE: Render one portlet jsp in another portlet (two different plugin projec

Junior Member Mensajes: 54 Fecha de incorporación: 4/03/14 Mensajes recientes
Sushil Patidar:
Hi,

As an workarround, another portlet jsp can be rendered on the same page using Window State POP_UP/EXCLUSIVE using pop up window.

Regards

Hi Sushil,

In pop-up I am able to get the portlet_3 jsp, but I want to render in page level (not in pupup state)
thumbnail
Sushil Patidar, modificado hace 8 años.

RE: Render one portlet jsp in another portlet (two different plugin projec

Expert Mensajes: 467 Fecha de incorporación: 31/10/11 Mensajes recientes
Hi,

Other way you can use following liferay Tag.

<liferay-util:include page="JSP_PATH" portletid="PORTLET_ID"></liferay-util:include>
.


Hope it should help.

Regards
Enzo Terranova, modificado hace 3 años.

RE: Render one portlet jsp in another portlet (two different plugin projec

New Member Mensajes: 3 Fecha de incorporación: 20/03/17 Mensajes recientes
<p>Thank You Sushil ^_^</p>