org.apache.myfaces.portlet
Interface DefaultViewSelector


public interface DefaultViewSelector

Imlementations of this interface allow a JSF application to specify which JSF view will be selected when the incoming request does not provide a View Id. The implementation can optionally return null to revert to the default View Id specified in portlet.xml.

Version:
$Revision: 1.1 $ $Date: 2005/01/26 17:03:10 $ $Log: DefaultViewSelector.java,v $ Revision 1.1 2005/01/26 17:03:10 matzew MYFACES-86. portlet support provided by Stan Silver (JBoss Group)
Author:
Stan Silvert (latest modification by $Author: matzew $)

Method Summary
 java.lang.String selectViewId(RenderRequest request, RenderResponse response)
          This method allows a JSF application to specify which JSF view will be when the incoming request does not provide a view id.
 void setPortletContext(PortletContext portletContext)
          This method will be called by the MyFacesGenericPortlet in order to give the selector an opportunity to store a reference to the PortletContext.
 

Method Detail

setPortletContext

public void setPortletContext(PortletContext portletContext)
This method will be called by the MyFacesGenericPortlet in order to give the selector an opportunity to store a reference to the PortletContext.


selectViewId

public java.lang.String selectViewId(RenderRequest request,
                                     RenderResponse response)
                              throws PortletException
This method allows a JSF application to specify which JSF view will be when the incoming request does not provide a view id.

Parameters:
request - The RenderRequest
response - The RenderResponse
Returns:
a JSF View Id, or null if the selector wishes to revert to the default View Id specified in portlet.xml.
Throws:
PortletException - if a View Id can not be determined because of some underlying error.