taylor      2004/10/20 18:49:02

  Modified:    portals-bridges/myfaces/src/java/org/apache/portals/bridges/myfaces
                        FacesPortlet.java
  Log:
  made the MyFaces portlet depedent on the GenericServletPortlet
  TODO: add support to GenericPortlet for localization of templates
  
  Revision  Changes    Path
  1.8       +13 -3     
jakarta-jetspeed-2/portals-bridges/myfaces/src/java/org/apache/portals/bridges/myfaces/FacesPortlet.java
  
  Index: FacesPortlet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/portals-bridges/myfaces/src/java/org/apache/portals/bridges/myfaces/FacesPortlet.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FacesPortlet.java 15 Oct 2004 21:47:44 -0000      1.7
  +++ FacesPortlet.java 21 Oct 2004 01:49:02 -0000      1.8
  @@ -30,7 +30,6 @@
   
   import javax.portlet.ActionRequest;
   import javax.portlet.ActionResponse;
  -import javax.portlet.GenericPortlet;
   import javax.portlet.PortletConfig;
   import javax.portlet.PortletException;
   import javax.portlet.PortletRequest;
  @@ -41,6 +40,7 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.apache.portals.bridges.common.GenericServletPortlet;
   
   /**
    * <p>
  @@ -51,7 +51,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">David Le Strat</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
    */
  -public class FacesPortlet extends GenericPortlet
  +public class FacesPortlet extends GenericServletPortlet
   {
   
       /** The Log instance for this class. */
  @@ -195,6 +195,9 @@
           // Save our PortletConfig instance
           this.portletConfig = portletConfig;
           this.defaultViewPage = portletConfig.getInitParameter(PARAM_VIEW_PAGE);
  +        this.defaultEditPage = portletConfig.getInitParameter(PARAM_EDIT_PAGE);
  +        this.defaultHelpPage = portletConfig.getInitParameter(PARAM_HELP_PAGE);
  +        
           if (null == this.defaultViewPage)
           {
               // A Faces Portlet is required to have at least the
  @@ -240,7 +243,14 @@
        */
       public void doHelp(RenderRequest request, RenderResponse response) throws 
PortletException, IOException
       {
  -        process(request, response, defaultHelpPage, FacesPortlet.HELP_REQUEST);
  +        if (this.defaultHelpPage != null && this.defaultHelpPage.endsWith(".html"))
  +        {
  +            super.doHelp(request, response);
  +        }
  +        else
  +        {
  +            process(request, response, defaultHelpPage, FacesPortlet.HELP_REQUEST);
  +        }
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to