weaver 2004/08/24 07:24:56
Modified: portal/src/java/org/apache/jetspeed/localization/impl
LocalizationValveImpl.java
Log:
prefered locale made available to the request.
Revision Changes Path
1.5 +3 -3
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/localization/impl/LocalizationValveImpl.java
Index: LocalizationValveImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/localization/impl/LocalizationValveImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- LocalizationValveImpl.java 5 Aug 2004 04:50:29 -0000 1.4
+++ LocalizationValveImpl.java 24 Aug 2004 14:24:56 -0000 1.5
@@ -22,7 +22,6 @@
import org.apache.jetspeed.pipeline.valve.AbstractValve;
import org.apache.jetspeed.pipeline.valve.LocalizationValve;
import org.apache.jetspeed.pipeline.valve.ValveContext;
-import org.apache.jetspeed.request.JetspeedRequestContext;
import org.apache.jetspeed.request.RequestContext;
/**
@@ -45,7 +44,7 @@
// TODO Get the prefered locale from user's persistent storage if not anon
user
Locale locale =
- (Locale)
request.getRequest().getSession().getAttribute(JetspeedRequestContext.PREFERED_LOCALE_SESSION_KEY);
+ (Locale)
request.getSessionAttribute(RequestContext.PREFERED_LOCALE_SESSION_KEY);
if (locale == null)
{
@@ -67,6 +66,7 @@
}
request.setLocale(locale);
+
request.getRequest().setAttribute(RequestContext.PREFERED_LOCALE_SESSION_KEY, locale);
// Pass control to the next Valve in the Pipeline
context.invokeNext(request);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]