1.First create a new portlet project or use existing one,The source and target portlet should be in same workspace.
2.Create Portlet IPC1 & IPC2.
3.Create Source and Target Portlets as shown below.
Select The Data Type For Source Portlet, as shown below.
Similarly make a cooperative target portlet, as shown.
As for source portlet, select Data Type for target portlet.
Then in the source portlet JSP use the Cooperative Source Trigger to create an event on click,
After setting the event use
if(actionValue != null && "TargetAction".equals(actionValue)) {
String input = request.getParameter("inputProperty");
session.setAttribute("input", input,session.PORTLET_SCOPE);
}
in target portlet process action to fetch the value that you have set in the scope.
After that you can use bean or session to render the value from process action to targer portlet jsp.
Then deploy the portlet, and add them on a page, Then edit page layout and do the WIRING between source and target portlets. as shown below.
Now your Inter Portlet communication is done.you can put the value in the source portlet and after clicking submit value will be shown on target portlet.
On submitting the output will be:-
For any help or issue please contact me at sanjeetsinghmerhal@gmail.com.
Please follow me if material is useful for you.
Thanks
2.Create Portlet IPC1 & IPC2.
3.Create Source and Target Portlets as shown below.
Select The Data Type For Source Portlet, as shown below.
Similarly make a cooperative target portlet, as shown.
As for source portlet, select Data Type for target portlet.
Then in the source portlet JSP use the Cooperative Source Trigger to create an event on click,
After setting the event use
if(actionValue != null && "TargetAction".equals(actionValue)) {
String input = request.getParameter("inputProperty");
session.setAttribute("input", input,session.PORTLET_SCOPE);
}
in target portlet process action to fetch the value that you have set in the scope.
After that you can use bean or session to render the value from process action to targer portlet jsp.
Then deploy the portlet, and add them on a page, Then edit page layout and do the WIRING between source and target portlets. as shown below.
Now your Inter Portlet communication is done.you can put the value in the source portlet and after clicking submit value will be shown on target portlet.
On submitting the output will be:-
For any help or issue please contact me at sanjeetsinghmerhal@gmail.com.
Please follow me if material is useful for you.
Thanks
hmmmm.nice one...
ReplyDeletereally helpful.
Thanks Sanjeet.