You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ppetroup <pp...@gmail.com> on 2010/09/17 05:46:14 UTC

PersistentLocale and contributeApplicationDefaults()

Hi, 

I am trying to programmatically change the locale using the following:

    @Inject
    private PersistentLocale persistentLocaleService;

     Locale newLocale = new Locale("el");
     persistentLocaleService.set(newLocale);

but the locale does not change. However, I noticed that the locale is not
included in the URL
eg. http://localhost:8080/ultiac/user/searchpage
if I manually change the URL to 
http://localhost:8080/ultiac/el/user/searchpage
then it works fine. 

I have the following code in my AppModule
    public static void
contributeApplicationDefaults(MappedConfiguration<String, String>
configuration)
    {
	configuration.add(ENCODE_LOCALE_INTO_PATH, "true");
	configuration.add(SUPPORTED_LOCALES, "el,en,zh_CN,es,ru_RU,cs_CZ");
	configuration.add(PRODUCTION_MODE, "true");
	configuration.add(COMPRESS_WHITESPACE, "false");
    }

the SUPPORTED_LOCALES appears to work fine (because if I delete "el" from
the list I get an error when this line is executed
ersistentLocaleService.set(newLocale);)

but ENCODE_LOCALE_INTO_PATH does not appear to work because I cannot see the
locale on the URL
and PRODUCTION_MODE does not appear to work either because I still get the
Blackbird black popup when I get a javascript exception. 

Any suggestions as to why ENCODE_LOCALE_INTO_PATH and PRODUCTION_MODE are
ignored will be greatly appreciated. 

Petros

-- 
View this message in context: http://tapestry-users.832.n2.nabble.com/PersistentLocale-and-contributeApplicationDefaults-tp5541354p5541354.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org