How to change JSF JSR portlet page views

In JSF portlet( 168 or 286 portlet), the very first portlet content is rendered based on jsp path declared in init parameter in portlet.xml, as shown below...

What if you want to render content from another jsp based on some action performed in portlet?   

JSF stores this init paramter ( value in session.
So, if you want to render your custom jsp based on action performed, change this value in session in your portlets doView method,

request.getPortletSession().setAttribute("", <path to jsp>);

No comments: