problem with my error message with stripes

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with my error message with stripes

cedric
hi,
I'm a newbie with stripes framework and I have difficulties to use the
<s:errors/> tag
in fact, I have StripesResources.properties and
StripesResources_fr.properties in my project
I validate my login form in the ActionBean with this :
@Validate(required=true) private String username;
...

But informations generated by the <s:errors/> always come from the same
StripesResources, even if the locale has changed!
I don't know why because with all the other objects in the page, there's no
problem.

I tries this just before the <s:errors/> :
<fmt:setLocale value="${pageContext.request.locale}"/>
But the problem is not fixed. <s:errors/> doesn't care about the locale?

May be I didn't understand something but what?

Thank you very much for your help

Cédric



------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: problem with my error message with stripes

Iwao AVE!
Hi Cédric,

1. Assuming the default locale is English, you should have
StripesResources_en.properties and StripesResources_fr.properties in
your project.
2. Then set the LocalePicker.Locales init parameter as follows in the web.xml.
<init-param>
    <param-name>LocalePicker.Locales</param-name>
    <param-value>en,fr</param-value>
</init-param>

See the docs for the details.
http://www.stripesframework.org/display/stripes/Localization
http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/stripes/localization/DefaultLocalePicker.html

Regards,
Iwao


2013/12/18 cedric <[hidden email]>:

> hi,
> I'm a newbie with stripes framework and I have difficulties to use the
> <s:errors/> tag
> in fact, I have StripesResources.properties and
> StripesResources_fr.properties in my project
> I validate my login form in the ActionBean with this :
> @Validate(required=true) private String username;
> ...
>
> But informations generated by the <s:errors/> always come from the same
> StripesResources, even if the locale has changed!
> I don't know why because with all the other objects in the page, there's no
> problem.
>
> I tries this just before the <s:errors/> :
> <fmt:setLocale value="${pageContext.request.locale}"/>
> But the problem is not fixed. <s:errors/> doesn't care about the locale?
>
> May be I didn't understand something but what?
>
> Thank you very much for your help
>
> Cédric
>
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Stripes-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/stripes-users

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: problem with my error message with stripes

cedric
thank you very much, it works now



Iwao AVE! <harawata@...> writes:

>
> Hi Cédric,
>
> 1. Assuming the default locale is English, you should have
> StripesResources_en.properties and StripesResources_fr.properties in
> your project.
> 2. Then set the LocalePicker.Locales init parameter as follows in the
web.xml.
> <init-param>
>     <param-name>LocalePicker.Locales</param-name>
>     <param-value>en,fr</param-value>
> </init-param>
>
> See the docs for the details.
> http://www.stripesframework.org/display/stripes/Localization
>
http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/stripes/
localization/DefaultLocalePicker.html
>
> Regards,
> Iwao




------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users