组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Witold Wolski
IPC JSF - placing 2 different wars with JSF on same Page.
2012年5月15日 下午12:30
答复

Witold Wolski

等级: New Member

帖子: 20

加入日期: 2012年2月6日

最近的帖子

Hi,
I am learning portlet IPC with JSF portlets.
I downloaded the ipc event demo, split in into two wars and got it working.
However, we are using in production an older version of the jars (
That is we are using porltetfaces-bridge-2.0.0) and although an event is send it isn't received by the bridgeEventHanlder.
I adjusted the imports accordingly so everything compiles.
I also updated the portlet.xml
so it has
<init-param>
<!-- <name>javax.portlet.faces.bridgeEventHandler</name> -->
<name>org.portletfaces.bridge.bridgeEventHandler</name>
<value>com.liferay.faces.demos.event.CustomerEditedEventHandler</value>
</init-param>

org.portletfaces.bridge.container.liferay.PortletContainerLiferayImpl cannot be cast to org.portletfaces.bridge.container.PortletContainer

This isue was also reported here http://issues.liferay.com/browse/FACES-280
ClassCastException when placing two different JSF2 portlets on the same Liferay portal page when portlets are in different WARs

Is it officially resolved?? As already said I was able to separate the demo war into 2 wars and place them on the same portal page and they seems to work.
Would be more confident that this is a stable feature if anyone could confirm this please and maybee also update the examples, putting the 2 interacting portlets into separate wars, accordingly.




Thanks in advance
Witold
Neil Griffin
RE: IPC JSF - placing 2 different wars with JSF on same Page.
2012年5月15日 下午1:24
答复

Neil Griffin

LIFERAY STAFF

等级: Liferay Legend

帖子: 2378

加入日期: 2005年7月26日

最近的帖子

Do you have the following markup in your WEB-INF/liferay-portlet.xml descriptor as described in FACES-280?
1<private-request-attributes>false</private-request-attributes>
Witold Wolski
RE: IPC JSF - placing 2 different wars with JSF on same Page.
2012年5月16日 上午12:34
答复

Witold Wolski

等级: New Member

帖子: 20

加入日期: 2012年2月6日

最近的帖子

Hi Neil,

No it isn't!

What I did is took your demo http://www.liferay.com/community/liferay-projects/liferay-faces/demos
split it into 2 war files, one for the Booking portlet and one for the Customer portlet and got them working on the same page.

Because they are shipped with jar files which are not available in the portlet-sdk-6.10
i replaced the jars with jars from the sdk and adjusted the configuration files and imports accordingly (because there are changes to the package structure in the jars).
The liferay portlet xml looks like this
<liferay-portlet-app>
<portlet>
<portlet-name>BookingsPortlet</portlet-name>
<instanceable>false</instanceable>
<remoteable>true</remoteable>
<ajaxable>false</ajaxable>
</portlet>
</liferay-portlet-app>

While the with the newer jars the portlets seem to work on the same page, when taking the sdk jars it breaks.
I would like to suggest that instead of providing ipc examples in a single war you would provide the portlets doing ipc in separate wars. I think this is actually the more interesting and definitely less tested use case.

Witold
Neil Griffin
RE: IPC JSF - placing 2 different wars with JSF on same Page.
2012年9月4日 下午12:33
答复

Neil Griffin

LIFERAY STAFF

等级: Liferay Legend

帖子: 2378

加入日期: 2005年7月26日

最近的帖子

Hi Witold,

In order to test the problem you're seeing, I implemented your suggestion of splitting the demo into two WARs in FACES-1229. You can download SNAPSHOT versions of the new jsf2-ipc-events-customers-portlet and jsf2-ipc-events-bookings-portlet at the artifact repository.

The good news is that the portlets worked for me. I would recommend that you try them in a new/clean install of Liferay Portal in order to start from a working example.

Kind Regards,

Neil
Witold Wolski
RE: IPC JSF - placing 2 different wars with JSF on same Page.
2012年5月21日 上午10:27
答复

Witold Wolski

等级: New Member

帖子: 20

加入日期: 2012年2月6日

最近的帖子

Hi Neil,

it worked for me too with the:
- liferay-faces-bridge-impl-3.0.0-BETA2.jar
- portlet-bridge-api-2.0.0.jar
but not with the:
- liferayfaces-6.0.0.0.jar
- portletfaces-bridge-2.0.0.jar
which are shipped with the liferay sdk plugin 6.1 !

Have you tested it with the liferay plugin sdk you ship?

cheers
Witold
Neil Griffin
RE: IPC JSF - placing 2 different wars with JSF on same Page.
2012年5月21日 上午11:07
答复

Neil Griffin

LIFERAY STAFF

等级: Liferay Legend

帖子: 2378

加入日期: 2005年7月26日

最近的帖子

Very glad to hear that it worked for you. Liferay Faces will be included with the Plugins SDK when it reaches GA status.