portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/layout-portlets/src/java/org/apache/jetspeed/portlets/layout LayoutPortlet.java
Date Fri, 03 Sep 2004 13:24:44 GMT
weaver      2004/09/03 06:24:44

  Modified:    layout-portlets/src/java/org/apache/jetspeed/portlets/layout
                        LayoutPortlet.java
  Log:
  Use constant for page
  
  Revision  Changes    Path
  1.3       +5 -4      jakarta-jetspeed-2/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/LayoutPortlet.java
  
  Index: LayoutPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/LayoutPortlet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LayoutPortlet.java	5 Aug 2004 23:36:46 -0000	1.2
  +++ LayoutPortlet.java	3 Sep 2004 13:24:44 -0000	1.3
  @@ -28,6 +28,7 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.apache.jetspeed.Jetspeed;
  +import org.apache.jetspeed.PortalReservedParameters;
   import org.apache.jetspeed.aggregator.ContentDispatcher;
   import org.apache.jetspeed.locator.TemplateLocatorException;
   import org.apache.jetspeed.om.page.Fragment;
  @@ -42,7 +43,7 @@
   {
       /** Commons logging */
       protected final static Log log = LogFactory.getLog(LayoutPortlet.class);
  -
  +    
       public void init(PortletConfig config) throws PortletException
       {
           super.init(config);
  @@ -56,7 +57,7 @@
           PortletWindow window = context.getNavigationalState().getMaximizedWindow(context.getPage());
           boolean maximized = (window != null);
           
  -        request.setAttribute("page", getPage(request));
  +        request.setAttribute(PortalReservedParameters.PAGE_ATTRIBUTE_KEY, getPage(request));
           request.setAttribute("fragment", getFragment(request, maximized));
           request.setAttribute("dispatcher", getDispatcher(request));
           if (maximized)
  @@ -102,7 +103,7 @@
   
           super.doView(request, response);
   
  -        request.removeAttribute("page");
  +        request.removeAttribute(PortalReservedParameters.PAGE_ATTRIBUTE_KEY);
           request.removeAttribute("fragment");        
           request.removeAttribute("layout");
           request.removeAttribute("dispatcher");
  @@ -131,7 +132,7 @@
       {
           // Very ugly and Pluto dependant but I don't see anything better right now
           ServletRequest innerRequest = ((HttpServletRequestWrapper) request).getRequest();
  -        Page page = (Page) innerRequest.getAttribute("org.apache.jetspeed.Page");
  +        Page page = (Page) innerRequest.getAttribute(PortalReservedParameters.PAGE_ATTRIBUTE_KEY);
   
           return page;
       }
  
  
  

---------------------------------------------------------------------
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