RE: T5: Changing locale within OnActivate event

2007-08-17 Thread Doug Hauge
I was afraid that would be the answer (I couldn't see any other way
after looking at the code). I was wanting to avoid having to add
duplicate redirection logic to each page, but I'll give it a try and see
how it works. Thanks for the response.

Doug

 -Original Message-
 From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 14, 2007 7:22 PM
 To: Tapestry users
 Subject: Re: T5: Changing locale within OnActivate event
 
 If it's anything like T4 you'll have to either do a redirect back to
 the same page or whatever mechanism is in place to make a page
 active somehow and have it do that to the same page.
 
 All the i18n stuff probably happens in the very beginning while
 setting up the page/components/resources so it has to start over if
 you want to change locales.  I'm sure you know more than I do about
 redirects/page activations in T5 though.
 
 On 8/14/07, Doug Hauge [EMAIL PROTECTED] wrote:
  In several of our pages, the default locale we want to use for
 messages
  depends on its activation context. We tried updating the locale
using
  'ThreadLocale' from within the activate event handler, but it seems
 that
  this is too late, for the page has already been loaded and all
 messages
  in the template resolved using whatever locale was in effect at the
 time
  of loading. Is there some way we can force the messages to be
 reloaded
  after setting the thread locale in the activate event handler, or is
  there some point before the page is loaded at which we can access
the
  page class and the activation context in order to set the locale?
 
  Thanks,
  Doug
 
 
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 --
 Jesse Kuhnert
 Tapestry/Dojo team member/developer
 
 Open source based consulting work centered around
 dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Changing locale within OnActivate event

2007-08-17 Thread Jesse Kuhnert
If you build a shadow service or similar sort of infrastructure
related thing you can always intercept the call before pages are
resolved / loaded / etc if you know ahead of time that you are going
to want to change the locale in some way.  (ie if it's architecture /
infrastructure related and not one off pieces of functionality )

On 8/17/07, Doug Hauge [EMAIL PROTECTED] wrote:
 I was afraid that would be the answer (I couldn't see any other way
 after looking at the code). I was wanting to avoid having to add
 duplicate redirection logic to each page, but I'll give it a try and see
 how it works. Thanks for the response.

 Doug

  -Original Message-
  From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, August 14, 2007 7:22 PM
  To: Tapestry users
  Subject: Re: T5: Changing locale within OnActivate event
 
  If it's anything like T4 you'll have to either do a redirect back to
  the same page or whatever mechanism is in place to make a page
  active somehow and have it do that to the same page.
 
  All the i18n stuff probably happens in the very beginning while
  setting up the page/components/resources so it has to start over if
  you want to change locales.  I'm sure you know more than I do about
  redirects/page activations in T5 though.
 
  On 8/14/07, Doug Hauge [EMAIL PROTECTED] wrote:
   In several of our pages, the default locale we want to use for
  messages
   depends on its activation context. We tried updating the locale
 using
   'ThreadLocale' from within the activate event handler, but it seems
  that
   this is too late, for the page has already been loaded and all
  messages
   in the template resolved using whatever locale was in effect at the
  time
   of loading. Is there some way we can force the messages to be
  reloaded
   after setting the thread locale in the activate event handler, or is
   there some point before the page is loaded at which we can access
 the
   page class and the activation context in order to set the locale?
  
   Thanks,
   Doug
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  Jesse Kuhnert
  Tapestry/Dojo team member/developer
 
  Open source based consulting work centered around
  dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Changing locale within OnActivate event

2007-08-14 Thread Jesse Kuhnert
If it's anything like T4 you'll have to either do a redirect back to
the same page or whatever mechanism is in place to make a page
active somehow and have it do that to the same page.

All the i18n stuff probably happens in the very beginning while
setting up the page/components/resources so it has to start over if
you want to change locales.  I'm sure you know more than I do about
redirects/page activations in T5 though.

On 8/14/07, Doug Hauge [EMAIL PROTECTED] wrote:
 In several of our pages, the default locale we want to use for messages
 depends on its activation context. We tried updating the locale using
 'ThreadLocale' from within the activate event handler, but it seems that
 this is too late, for the page has already been loaded and all messages
 in the template resolved using whatever locale was in effect at the time
 of loading. Is there some way we can force the messages to be reloaded
 after setting the thread locale in the activate event handler, or is
 there some point before the page is loaded at which we can access the
 page class and the activation context in order to set the locale?

 Thanks,
 Doug


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]