portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From morci...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controllers VelocityPanedPortletController.java
Date Sun, 08 Jun 2003 23:40:25 GMT
morciuch    2003/06/08 16:40:25

  Modified:    src/java/org/apache/jetspeed/portal/controllers
                        VelocityPanedPortletController.java
  Log:
  Applied patch by Jeremy Ford to fix exception logged for older profiles with no panes defined
(see Bugzilla bug# 14940)
  
  Revision  Changes    Path
  1.9       +14 -13    jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controllers/VelocityPanedPortletController.java
  
  Index: VelocityPanedPortletController.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controllers/VelocityPanedPortletController.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- VelocityPanedPortletController.java	4 Mar 2003 00:05:03 -0000	1.8
  +++ VelocityPanedPortletController.java	8 Jun 2003 23:40:25 -0000	1.9
  @@ -199,7 +199,7 @@
           {
               Log.error( e );
           }
  -        DynamicURI uri = jsLink.setPaneById(portlet.getID());
  +        DynamicURI uri = jsLink.getPaneById(portlet.getID());
           JetspeedLinkFactory.putInstance(jsLink);
           
           return uri;
  @@ -225,18 +225,16 @@
               // the parameter is undefined, search for sticky value in session
               String id = getPortlets().getID(); 
               pane = retrievePaneIDFromSession(rundata);
  -            if (pane == null)
  -            {
  -                // use default
  -                pane = getPortlets().getPortletAt(0).getID();
  -
  -            }
           }
  -        int index = pane.indexOf(JetspeedResources.PATH_SUBPANE_SEPARATOR);
  -        if (index > -1)
  +        
  +        if(pane != null)
           {
  -            //return pane.substring(index + 1);
  -            return pane.substring(0, index);
  +            int index = pane.indexOf(JetspeedResources.PATH_SUBPANE_SEPARATOR);
  +            if (index > -1)
  +            {
  +                //return pane.substring(index + 1);
  +                return pane.substring(0, index);
  +            }
           }
           
           return pane;
  @@ -261,7 +259,10 @@
           if (pane == null)
           {
               // use default
  -            pane = getPortlets().getPortletAt(0).getID();
  +            if(getPortlets().size() > 0)
  +            {
  +	            pane = getPortlets().getPortletAt(0).getID();
  +            }
           }
          
           return pane;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message