portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kimp...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls Maximize.java Restore.java
Date Thu, 03 Jan 2002 08:46:11 GMT
kimptoc     02/01/03 00:46:11

  Modified:    src/java/org/apache/jetspeed/modules/actions
                        JetspeedSessionValidator.java
               src/java/org/apache/jetspeed/modules/actions/controls
                        Maximize.java Restore.java
  Log:
  bug#5604 - maximise now sticks until the user does a restore or they log out
  
  Revision  Changes    Path
  1.11      +12 -2     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JetspeedSessionValidator.java
  
  Index: JetspeedSessionValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JetspeedSessionValidator.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JetspeedSessionValidator.java	13 Sep 2001 18:29:19 -0000	1.10
  +++ JetspeedSessionValidator.java	3 Jan 2002 08:46:11 -0000	1.11
  @@ -79,7 +79,7 @@
   @author <a href="mailto:ingo@raleigh.ibm.com">Ingo Schuster</a>
   @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
   @author <a href="mailto:sgala@apache.org">Santiago Gala</a>
  -@version $Id: JetspeedSessionValidator.java,v 1.10 2001/09/13 18:29:19 sgala Exp $
  +@version $Id: JetspeedSessionValidator.java,v 1.11 2002/01/03 08:46:11 kimptoc Exp $
   */
   public class JetspeedSessionValidator extends TemplateSessionValidator
   {
  @@ -121,9 +121,19 @@
           
           data.getUser().setTemp("locale", locale);
           
  +
  +        String maximizedPortlet = (String)jdata.getUser().getTemp("portlet");
  +        if (maximizedPortlet != null) {
  +            jdata.setPortlet(maximizedPortlet);
  +            jdata.setScreenTemplate("Maximize");
  +        }
  +
           // if a portlet is referenced in the parameters request, store it
           // in the RunData object
  -        jdata.setPortlet(jdata.getParameters().getString("portlet"));
  +        String paramPortlet = jdata.getParameters().getString("portlet");
  +        if (paramPortlet != null && paramPortlet.length() > 0) {
  +            jdata.setPortlet(paramPortlet);
  +        }
           
           // get the profile and store it in the RunData
           Profile newProfile = Profiler.getProfile(jdata);
  
  
  
  1.6       +4 -0      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Maximize.java
  
  Index: Maximize.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Maximize.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Maximize.java	22 Jul 2001 20:31:11 -0000	1.5
  +++ Maximize.java	3 Jan 2002 08:46:11 -0000	1.6
  @@ -57,6 +57,7 @@
   // Turbine stuff
   import org.apache.turbine.modules.Action;
   import org.apache.turbine.util.RunData;
  +import org.apache.turbine.util.Log;
   
   // Jetspeed stuff
   import org.apache.jetspeed.services.rundata.JetspeedRunData;
  @@ -88,6 +89,9 @@
           {
               return;
           }
  +        
  +        //record that this portlet is now maximized
  +        jdata.getUser().setTemp("portlet",name);
   
           jdata.setScreenTemplate("Maximize");
       }
  
  
  
  1.8       +9 -4      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Restore.java
  
  Index: Restore.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Restore.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Restore.java	22 Jul 2001 20:31:11 -0000	1.7
  +++ Restore.java	3 Jan 2002 08:46:11 -0000	1.8
  @@ -81,7 +81,8 @@
               return;
           }
   
  -        String name = ((JetspeedRunData)rundata).getPortlet();
  +        JetspeedRunData jdata = (JetspeedRunData)rundata;
  +        String name = jdata.getPortlet();
           if ( name == null )
           {
               return;
  @@ -103,11 +104,15 @@
           }
           
           // make sure we use the default template
  -        while (((JetspeedRunData)rundata).getCustomized()!=null)
  +        while (jdata.getCustomized()!=null)
           {
  -            ((JetspeedRunData)rundata).setCustomized(null);
  +            jdata.setCustomized(null);
           }
  -        rundata.setScreenTemplate(null);
  +
  +        //remove the maximized portlet name - nothing is maximized now
  +        rundata.getUser().removeTemp("portlet");
  +
  +        jdata.setScreenTemplate("Home");
       }
   
   }
  
  
  

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


Mime
View raw message