Thursday, March 19, 2009

Navigating to other page in Portal from any portlet

The following steps will be used to navigate control from any portlet to any page/ any portlet in other page. Also this can be used to pass parameter to other portlet.

1> Keep the wp[1].l2.urlhelper.jar file under WEB-INF/lib folder.
2> Add the following code in your JSP to achieve the same.

String homeURL = PortletURLHelper.generateUrl(PAGE_UNIQUE_NAME, Portlet Name, null, true, renderRequest, renderResponse);

Use the value of homeURL in href attribute.
3> Download the jar from the following location.
http://www-01.ibm.com/support/docview.wss?rs=688&context=SSHRKX&dc=DB520&uid=swg21265900&loc=en_US&cs=UTF-8&lang=en&rss=ct688websphere

No comments: