views:

414

answers:

2

Hi,

ICEFaces + Liferay : I created two war file firstApp.war and secondApp.war file and deployed on liferay. I want to implement, when I click submit button on firstApp.war application’s page , firstAppBacking bean should set some value in public-render-parameter so that I can get that value in secondApp.war application something like IPC. Please sugeest me how can i set the valiue in firstAppText.

<portlet-app ....>
<portlet>
 <portlet-name>firstApp</portlet-name>
 <display-name>First App</display-name>
 <portlet-class>com.icesoft.faces.webapp.http.portlet.MainPortlet</portlet-class>
 <init-param>
  <name>com.icesoft.faces.VIEW</name>
  <value>/jsp/firstApp.iface</value>
 </init-param>
 ....
 **<supported-public-render-parameter>firstAppText</supported-public-render-parameter>**
</portlet>
<public-render-parameter>
 <identifier>firstAppText</identifier>
 <qname xmlns:x="http://www.liferay.com/public-render-parameters"&gt;x:firstAppText&lt;/qname&gt;
</public-render-parameter>

+1  A: 

There are several ways to do that. First of all, the basic concepts are well described here.

As you can see, you can share data in different "contexts". One way is to share the data via the session by declaring shared-portlet-session-attribute in portlet.xml, e.g.

<shared-portlet-session-attribute> 
   <name>someName</name>
   <java-class>com.some.class</java-class>
<shared-portlet-session-attribute>

Other ways to share data are: - PortletSession - PortletContext - Page Parameters - Portlet Events

The different ways are described in this book. I haven't yet tried all of them, therefore I cannot give more details now.

Bertolt
A: 

I tried the steps mentioned in the book without any success. Am using liferay 5.2 and icefaces 1.8. I have portlets in different WAR files and am not able to share data between the portlets across WARs...any advise with sample code is highly appreciated

Ben