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/applications/pam/src/java/org/apache/jetspeed/portlets/localeselector LocaleSelectorPortlet.java
Date Tue, 04 Jan 2005 15:50:16 GMT
weaver      2005/01/04 07:50:16

  Modified:    applications/pam/src/java/org/apache/jetspeed/portlets/localeselector
                        LocaleSelectorPortlet.java
  Log:
  consolidating request/session keys.
  
  Revision  Changes    Path
  1.2       +4 -3      jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/portlets/localeselector/LocaleSelectorPortlet.java
  
  Index: LocaleSelectorPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/portlets/localeselector/LocaleSelectorPortlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LocaleSelectorPortlet.java	19 Nov 2004 21:53:12 -0000	1.1
  +++ LocaleSelectorPortlet.java	4 Jan 2005 15:50:16 -0000	1.2
  @@ -29,6 +29,7 @@
   import javax.portlet.RenderRequest;
   import javax.portlet.RenderResponse;
   
  +import org.apache.jetspeed.PortalReservedParameters;
   import org.apache.jetspeed.request.RequestContext;
   
   /**
  @@ -95,10 +96,10 @@
   
               // TODO Set the prefered locale to user's persistent storage if not anon user
               Locale preferedLocale = new Locale(language, country, variant);
  -            session.setAttribute(RequestContext.PREFERED_LOCALE_SESSION_KEY, preferedLocale,PortletSession.APPLICATION_SCOPE);
  -            RequestContext requestContext = (RequestContext) request.getAttribute(RequestContext.REQUEST_PORTALENV);
  +            session.setAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE, preferedLocale,PortletSession.APPLICATION_SCOPE);
  +            RequestContext requestContext = (RequestContext) request.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
               requestContext.setLocale(preferedLocale);
  -            requestContext.setSessionAttribute(RequestContext.PREFERED_LOCALE_SESSION_KEY,
preferedLocale);
  +            requestContext.setSessionAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE,
preferedLocale);
           }
   
           return;
  
  
  

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