myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svieu...@apache.org
Subject cvs commit: incubator-myfaces/src/myfaces/org/apache/myfaces/application/jsp JspViewHandlerImpl.java
Date Thu, 27 Jan 2005 02:38:44 GMT
svieujot    2005/01/26 18:38:44

  Modified:    src/myfaces/org/apache/myfaces/lifecycle LifecycleImpl.java
               src/myfaces/org/apache/myfaces/application/jsp
                        JspViewHandlerImpl.java
  Log:
  Remove portlet-api dependency while keeping portlet support.
  
  Revision  Changes    Path
  1.43      +13 -6     incubator-myfaces/src/myfaces/org/apache/myfaces/lifecycle/LifecycleImpl.java
  
  Index: LifecycleImpl.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/myfaces/org/apache/myfaces/lifecycle/LifecycleImpl.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- LifecycleImpl.java	26 Jan 2005 17:03:11 -0000	1.42
  +++ LifecycleImpl.java	27 Jan 2005 02:38:43 -0000	1.43
  @@ -46,6 +46,9 @@
    * @author Manfred Geiler (latest modification by $Author$)
    * @version $Revision$ $Date$
    * $Log$
  + * Revision 1.43  2005/01/27 02:38:43  svieujot
  + * Remove portlet-api dependency while keeping portlet support.
  + *
    * Revision 1.42  2005/01/26 17:03:11  matzew
    * MYFACES-86. portlet support provided by Stan Silver (JBoss Group)
    *
  @@ -312,10 +315,14 @@
       {
           ExternalContext externalContext = facesContext.getExternalContext();
   
  -        if (externalContext.getRequest() instanceof PortletRequest)
  -        {
  -            PortletRequest request = (PortletRequest)externalContext.getRequest();
  -            return request.getParameter(MyFacesGenericPortlet.VIEW_ID);
  +        try{
  +            if (externalContext.getRequest() instanceof PortletRequest)
  +            {
  +                PortletRequest request = (PortletRequest)externalContext.getRequest();
  +                return request.getParameter(MyFacesGenericPortlet.VIEW_ID);
  +            }
  +        }catch(NoClassDefFoundError exception){
  +            // Portlet api jar isn't in the classpath.
           }
           
           String viewId = externalContext.getRequestPathInfo();  //getPathInfo
  
  
  
  1.32      +28 -13    incubator-myfaces/src/myfaces/org/apache/myfaces/application/jsp/JspViewHandlerImpl.java
  
  Index: JspViewHandlerImpl.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/myfaces/org/apache/myfaces/application/jsp/JspViewHandlerImpl.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- JspViewHandlerImpl.java	26 Jan 2005 17:03:12 -0000	1.31
  +++ JspViewHandlerImpl.java	27 Jan 2005 02:38:44 -0000	1.32
  @@ -45,6 +45,9 @@
    * @author Thomas Spiegl (latest modification by $Author$)
    * @version $Revision$ $Date$
    * $Log$
  + * Revision 1.32  2005/01/27 02:38:44  svieujot
  + * Remove portlet-api dependency while keeping portlet support.
  + *
    * Revision 1.31  2005/01/26 17:03:12  matzew
    * MYFACES-86. portlet support provided by Stan Silver (JBoss Group)
    *
  @@ -181,12 +184,16 @@
   
       public String getActionURL(FacesContext facesContext, String viewId)
       {
  -        if (facesContext.getExternalContext().getResponse() instanceof RenderResponse)
  -        {
  -            RenderResponse response = (RenderResponse)facesContext.getExternalContext().getResponse();
  -            PortletURL url = response.createActionURL();
  -            url.setParameter(MyFacesGenericPortlet.VIEW_ID, viewId);
  -            return url.toString();
  +        try{
  +            if (facesContext.getExternalContext().getResponse() instanceof RenderResponse)
  +            {
  +                RenderResponse response = (RenderResponse)facesContext.getExternalContext().getResponse();
  +                PortletURL url = response.createActionURL();
  +                url.setParameter(MyFacesGenericPortlet.VIEW_ID, viewId);
  +                return url.toString();
  +            }
  +        }catch(NoClassDefFoundError exception){
  +            // Portlet api jar isn't in the classpath.
           }
           
           String path = getViewIdPath(facesContext, viewId);
  @@ -225,9 +232,13 @@
   
           String viewId = facesContext.getViewRoot().getViewId();
   
  -        if (externalContext.getRequest() instanceof PortletRequest) {
  -            externalContext.dispatch(viewId);
  -            return;
  +        try{
  +            if (externalContext.getRequest() instanceof PortletRequest) {
  +                externalContext.dispatch(viewId);
  +                return;
  +            }
  +        }catch(NoClassDefFoundError exception){
  +            // Portlet api jar isn't in the classpath.
           }
           
           ServletMapping servletMapping = getServletMapping(externalContext);
  @@ -321,8 +332,12 @@
   
           ExternalContext externalContext = facescontext.getExternalContext();
           
  -        if (externalContext.getRequest() instanceof PortletRequest) {
  -            return viewId;
  +        try{
  +            if (externalContext.getRequest() instanceof PortletRequest) {
  +                return viewId;
  +            }
  +        }catch(NoClassDefFoundError exception){
  +            // Portlet api jar isn't in the classpath.
           }
           
           ServletMapping servletMapping = getServletMapping(externalContext);
  
  
  

Mime
View raw message