Fórum
Insert a liferay portlet into Primeface dialog
Rounak Dasgupta, modificado 10 Anos atrás.
Insert a liferay portlet into Primeface dialog
New Member Postagens: 4 Data de Entrada: 13/05/13 Postagens Recentes
Hi all,
I'm using liferay 6.1, jsf 2 and primeface 4.0. I've two different project running on a liferay tomcat. I want to insert a portlet of "Project 1" into primefaces dialog of "project 2".
I tried by using ui:insert, but it takes the source path of current project. Can anyone give a suggestion how to proceed in this scenario?
Thanks in advance.
I'm using liferay 6.1, jsf 2 and primeface 4.0. I've two different project running on a liferay tomcat. I want to insert a portlet of "Project 1" into primefaces dialog of "project 2".
I tried by using ui:insert, but it takes the source path of current project. Can anyone give a suggestion how to proceed in this scenario?
Thanks in advance.
Neil Griffin, modificado 10 Anos atrás.
Moved to Liferay Faces - English sub-category.
Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
Moved to Liferay Faces - English sub-category.
Neil Griffin, modificado 10 Anos atrás.
RE: Insert a liferay portlet into Primeface dialog
Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
If you are using JSF 2.1, then I think you would need to develop a monolithic WAR project that contains two portlets, rather than two separate WAR projects each containing a single portlet.
If you are using JSF 2.2, then you might be able to utilize the Resource Library Contracts feature.
If you are using JSF 2.2, then you might be able to utilize the Resource Library Contracts feature.
Rounak Dasgupta, modificado 10 Anos atrás.
RE: Insert a liferay portlet into Primeface dialog
New Member Postagens: 4 Data de Entrada: 13/05/13 Postagens Recentes
Hi Neil,
I'm using jsf2.1. Actually both project having 12-15 portlet. And I want to reuse only one portlet in another project. So creating a different war, I think will not be a good idea in my scenario.
I'm using jsf2.1. Actually both project having 12-15 portlet. And I want to reuse only one portlet in another project. So creating a different war, I think will not be a good idea in my scenario.
Neil Griffin, modificado 10 Anos atrás.
RE: Insert a liferay portlet into Primeface dialog
Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
There is a liferay-portlet:runtime JSP tag that comes with Liferay Portal. However, we don't have a Facelets equivalent of this tag at this time in Liferay Faces.
If you look at the Liferay Portal 6.2 source code for RuntimeTag.java, it ends up calling the following utility method:
PortletContainerUtil.render(request, response, portlet);
(Prior to Liferay 6.2, I think this was called RuntimePortletUtil)
I don't know if this will work, but you might be able to call this method using the request/response that come from PortalUtil.getHttpServletRequest(PortletRequest) and PortalUtil.getHttpServletResponse(PortletResponse) in order to get the other portlet to render.
If you look at the Liferay Portal 6.2 source code for RuntimeTag.java, it ends up calling the following utility method:
PortletContainerUtil.render(request, response, portlet);
(Prior to Liferay 6.2, I think this was called RuntimePortletUtil)
I don't know if this will work, but you might be able to call this method using the request/response that come from PortalUtil.getHttpServletRequest(PortletRequest) and PortalUtil.getHttpServletResponse(PortletResponse) in order to get the other portlet to render.
Marco Endres, modificado 9 Anos atrás.
RE: Insert a liferay portlet into Primeface dialog
Regular Member Postagens: 112 Data de Entrada: 22/08/12 Postagens Recentes
How do you call the Portlet from the JSF? Which tag?
Thanks
Thanks
Neil Griffin, modificado 9 Anos atrás.
RE: Insert a liferay portlet into Primeface dialog
Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
At this time, there is no Facelet component tag for doing this. I suppose that you could develop a new Java-based custom component, then inside the custom Java-based Renderer, you can try calling PortletContainerUtil.render(request, response, portlet).
Juan Gonzalez, modificado 9 Anos atrás.
RE: Insert a liferay portlet into Primeface dialog
Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens Recentes
Hi,
very good news! New portal:runtime is implemented as part of this ticket:
https://issues.liferay.com/browse/FACES-2044
You can check it out in the Liferay Faces SNAPSHOT repository:
https://oss.sonatype.org/content/repositories/snapshots/com/liferay/faces/
for 3.2.x and 4.2.x versions.
If you have any problem, please let us now.
very good news! New portal:runtime is implemented as part of this ticket:
https://issues.liferay.com/browse/FACES-2044
You can check it out in the Liferay Faces SNAPSHOT repository:
https://oss.sonatype.org/content/repositories/snapshots/com/liferay/faces/
for 3.2.x and 4.2.x versions.
If you have any problem, please let us now.