So, you're expecting your business layer to format the right message? I would have the business layer include a logical error code to identify the underlying failure, which you could convert in the presentation layer to a localized, meaningful message.
Even if we make the locale property of Registry modifiable, the problem is that you could have multiple threads trying to change it ... so that's no solution! Perhaps extending the Messages interface to add a locale parameter to format() would help, but that gets ugly too. I would consider allowing Registry.locale to be changed, with the proviso that you can expect a mix of the old and the new locale to be used from that point on. But I won't like it. -- Howard M. Lewis Ship Creator, Tapestry: Java Web Components http://jakarta.apache.org/tapestry http://jakarta.apache.org/commons/sandbox/hivemind/ http://javatapestry.blogspot.com > -----Original Message----- > From: Bill Lear [mailto:[EMAIL PROTECTED] > Sent: Monday, September 15, 2003 6:21 PM > To: Jakarta Commons Developers List > Subject: RE: [HiveMind] Question about setting the locale > > > On Monday, September 15, 2003 at 18:10:31 (-0400) Howard M. > Lewis Ship writes: > >Ah, our good friend localization. > > > >The first question is: why would you need to change locale? > > > >The locale the server operates in should not be related to > the locale > >of any client (whether via HTTP, SOAP, RMI, etc.). ... > > Hmm. What if I need to display to the client the text from a > LoginException, built with the reason the login was denied? > > > Bill > > --------------------------------------------------------------------- > 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]
