Friday, October 23, 2009

Inter-portlets communication in Oracle Webcenter 11g

Assuming there are two portlets on one page: portlet1 and portlet2. And when making some changes on the portlet1, the portlet2 will make changes as well according to the value changes happening in portlet1.

How to make communication between portlets?

There is a property in each portlet called partialTriggers, which means the current portlet is listening to the one, whose id is the value of this property.

Here is a sample:

<adfp:portlet value="#{bindings.ParameterFormPortlet1_1}" id="portlet5" />

<adfp:portlet value="#{bindings.OmniPortlet1_1}" id="portlet1" renderPortletInIFrame="true" partialTriggers="portlet5"/>

From the above example, we now know portlet1 is listening to portlet5. Once portlet5 has some changes happening, it will trigger the portlet1 to refresh as well.

No comments: