掲示板

Insert a liferay portlet into Primeface dialog

10年前 に Rounak Dasgupta によって更新されました。

Insert a liferay portlet into Primeface dialog

New Member 投稿: 4 参加年月日: 13/05/13 最新の投稿
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.
thumbnail
10年前 に Neil Griffin によって更新されました。

Moved to Liferay Faces - English sub-category.

Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
Moved to Liferay Faces - English sub-category.
thumbnail
10年前 に Neil Griffin によって更新されました。

RE: Insert a liferay portlet into Primeface dialog

Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
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.
10年前 に Rounak Dasgupta によって更新されました。

RE: Insert a liferay portlet into Primeface dialog

New Member 投稿: 4 参加年月日: 13/05/13 最新の投稿
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.
thumbnail
10年前 に Neil Griffin によって更新されました。

RE: Insert a liferay portlet into Primeface dialog

Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
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.
thumbnail
9年前 に Marco Endres によって更新されました。

RE: Insert a liferay portlet into Primeface dialog

Regular Member 投稿: 112 参加年月日: 12/08/22 最新の投稿
How do you call the Portlet from the JSF? Which tag?

Thanks
thumbnail
9年前 に Neil Griffin によって更新されました。

RE: Insert a liferay portlet into Primeface dialog

Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
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).
thumbnail
9年前 に Juan Gonzalez によって更新されました。

RE: Insert a liferay portlet into Primeface dialog

Liferay Legend 投稿: 3089 参加年月日: 08/10/28 最新の投稿
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.