IPC (Inter Portlet Communication) in Liferay can be implemented in different ways and we'll see one among the possibilities, i.e. Public Render Parameter. This concept was introduced in JSR 286.
The central idea of this concept is to share a normal parameter across all deployed portlets despite of the fact that they lie in same WAR or in different.
1. In portlet.xml in the end of </portlet> tag we have to define the name of parameter
2. In portlet.xml in the end of <portlet-app> tag we have to define the identifier with the name of parameter
Full portlet.xml file will look like as follows:
Setting Parameter:
Reading Parameter:
Note: If render parameters need to be shared among two different WARs, and you have to set parameter in portlet 1 and read in portlet 2, For achieving this, we have to add definition of render parameter in the portlet.xml file of both the WARs.
The central idea of this concept is to share a normal parameter across all deployed portlets despite of the fact that they lie in same WAR or in different.
1. In portlet.xml in the end of </portlet> tag we have to define the name of parameter
2. In portlet.xml in the end of <portlet-app> tag we have to define the identifier with the name of parameter
Full portlet.xml file will look like as follows:
Setting Parameter:
Reading Parameter:
Note: If render parameters need to be shared among two different WARs, and you have to set parameter in portlet 1 and read in portlet 2, For achieving this, we have to add definition of render parameter in the portlet.xml file of both the WARs.
No comments:
Post a Comment