--STEP1--
-----portlet.xml mapping ---SENDER/RECEIVER portlet-----
---------------------------------------------------------------------------------------------
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0">
<portlet>
<portlet-name>senderportlet</portlet-name>
<display-name>SenderPortlet</display-name>
....
.
.
.
.
<supported-public-render-parameter>companyName</supported-public-render-parameter>
<supported-public-render-parameter>travelDate</supported-public-render-parameter>
</portlet>
<portlet>
<portlet-name>receiverportlet</portlet-name>
<display-name>ReceiverPortlet</display-name>
....
.
.
.
.
<supported-public-render-parameter>companyName</supported-public-render-parameter>
<supported-public-render-parameter>travelDate</supported-public-render-parameter>
</portlet>
<public-render-parameter>
<identifier>companyName</identifier>
<qname xmlns:x="http://mts.com/companyName">x:companyName</qname>
</public-render-parameter>
<public-render-parameter>
<identifier>travelDate</identifier>
<qname xmlns:x="http://mts.com/travelDate">x:travelDate</qname>
</public-render-parameter>
</portlet-app>
---------------------------------------------------------------------------------------------
--STEP2-------
------------Update the Sender portlet----------
---------------------------------------------------------------------------------------------
String travelDate = ParamUtil.getString(actionRequest, "travelDate");
actionResponse.setRenderParameter("companyName",companyName);
actionResponse.setRenderParameter("travelDate",travelDate );
---------------------------------------------------------------------------------------------
--STEP3-------
-----------Upodate the Receiver portlet-----------
---------------------------------------------------------------------------------------------
String travelDate = ParamUtil.getString(request, "travelDate");
---------------------------------------------------------------------------------------------
No comments:
Post a Comment