Hi Amit,
The way to build urls with portlet parameters is either via the PortletURL API (in java code) or via the Portlet category controls (on the view canvas).
To build a link on a jsf view that links to a different portlet with the Portlet Category controls, use the PortletLink control for the link itself, and then add an ExtendedPortletUrl control to the PortletLink's "value" facet (blue-dashed box). If the other portlet is on a different page, set the ExtendedPortletUrl's "baseUrl" property to an alias of the portlet or an alias of the page containing the portlet (in the baseUrl property value, precede the alias with a slash, like "/MyPageAlias"); if the other portlet is on the same page, leave the "baseUrl" property blank. Add another ExtendedPortletUrl as a child of the first ExtendedPortletUrl, and set the second ExtendedPortletUrl's "portlet"
property to an alias of the portlet (this time without the preceding slash, like “MyPortletAlias”).
Finally, for each parameter you want to pass to the portlet, add a PortletParameter control to the second ExtendedPortletUrl. Set the PortletParameter's "name" and "value" properties accordingly. The structure of those controls should resemble the following:
PortletLink
ExtendedPortletUrl
- baseUrl=/MyPageAlias
ExtendedPortletUrl
- portlet=MyPortletAlias
PortletParameter
- name=myParam
- value=myValue
PortletParameter
- name=myParam2
- value=myValue2
When the page is rendered, you'll end up with a link to an url like the following:
http://localhost:8585/MyPageAlias?wmp1234.myParam=myValue&wmp1234.myParam2=myValue2
The other portlet will be able to access those parameters directly as portlet properties. If the other portlet has a property called “myParam”, it’s value automatically will be set to “myValue”; and if it has a property called “myParam2”, it’s value automatically will be set to “myValue2”.
Hope this helps,
Thomas
#webMethods-BPMS#MWS-CAF-Task-Engine#webMethods