Sorry I've implemented and using my own localepicker:
Add the following class and setup configuration in web.xml:
Bonus - locale picking will work with your existing struts
application, so you can let your struts locale picking work with your
new stripes app.
Class:
----
package org.mortena.stripes.conf;
import net.sourceforge.stripes.localization.DefaultLocalePicker;
import javax.servlet.http.HttpServletRequest;
import java.util.Locale;
public class StripesLocalePicker extends DefaultLocalePicker {
public static final String LOCALE = "org.apache.struts.action.LOCALE";
@Override
public Locale pickLocale(HttpServletRequest request) {
Locale locale = null;
locale = (Locale) request.getSession().getAttribute(LOCALE);
if (locale!=null){
return locale;
}
else{
return super.pickLocale(request);
}
}
}
----
web.xml:
<init-param>
<param-name>LocalePicker.Class</param-name>
<param-value>org.mortena.stripes.conf.StripesLocalePicker</param-value>
</init-param>
2009/4/29, -yong- <[email protected]>:
> No, it doesnt. I am using Netbean and my fix imports function couldnt locate
> this class.
> Do you have any working sample or tutorial that I can go thru?
>
> Thanks again.
>
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
--
Morten Matras
Consultant
Blob Communication ApS
Svendsagervej 42
DK-5240 Odense NĂ˜
P: (+45) 76 6-5-4-3-2-1
W: www.blobcom.com
E: [email protected]
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users