I am afraid that such solution won't work because I read this paragraph from documentation :
You will see the new locale take effect on the next request. If it is changed in a component event request (which is typical), the new locale will be used in the subsequent page render request. Can anyone explain that this approach will work for my problem or not ? Thanks, Rendy. On Sat, Sep 10, 2011 at 12:02 AM, Rendy Tapestry <rendy.tapes...@gmail.com>wrote: > Hi Thiago, > > Thanks for such fast response, after setting it to false, my page is > showing up again but, the solution still not working. > > For example, if I have page named, test.tml and 2 component message catalog > test.properties and test_in_ID.properties, after setting PersistentLocale to > in_ID, tapestry still picking value from test.properties. > > What might be wrong with my code ? > > Thanks, > Rendy. > > > On Fri, Sep 9, 2011 at 11:37 PM, Thiago H. de Paula Figueiredo < > thiag...@gmail.com> wrote: > >> On Fri, 09 Sep 2011 12:54:23 -0300, Rendy Tapestry < >> rendy.tapes...@gmail.com> wrote: >> >> Hi Christian, >>> >> >> Hi! >> >> public class LocalizationDispatcher implements Dispatcher { >>> private final PersistentLocale persistentLocale; >>> >>> public LocalizationDispatcher(**PersistentLocale persistentLocale) { >>> this.persistentLocale = persistentLocale; >>> } >>> >>> public boolean dispatch(Request request, Response response) throws >>> IOException { >>> if (!persistentLocale.isSet()) { >>> persistentLocale.set(new Locale("in", "ID")); >>> } >>> >>> return true; >>> } >>> } >>> >> >> It should return false (i.e. this dispatcher didn't generate an answer). >> >> -- >> Thiago H. de Paula Figueiredo >> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, >> and instructor >> Owner, Ars Machina Tecnologia da Informação Ltda. >> http://www.arsmachina.com.br >> > >