Ok then following your expert advice I think I want to use the second approach 
now where I define my own TextProvider instance. 

Q.1) The ActionSupport class uses TextProviderSupport class which internally 
calls the LocalizedTextUtil class. Is that right understanding? 
Q.2) What I have to do is provide an implementation similar to 
TextProviderSupport but instead of calling LocalizedTextUtil.findText(clazz, 
key, getLocale(), defaultValue, args); followed by 
LocalizedTextUtil.findText(bundle, key, getLocale(), defaultValue, args);
 I have to call LocalizedTextUtil.findText(bundle, key, getLocale(), 
defaultValue, args) first and if that returns null then call 
LocalizedTextUtil.findText(clazz, key, getLocale(), defaultValue, args); Is 
that correct approach? Here bundle would represent the name of customer 
specific resource bundle that I would like to look up.

Please guide me on this.

Thanks
Pranav

----- Original Message ----
From: Jeromy Evans <[EMAIL PROTECTED]>
To: Struts Users Mailing List <user@struts.apache.org>
Sent: Monday, April 21, 2008 9:33:44 PM
Subject: Re: Intenationalization questions

Pranav wrote:
> Ok, so here's what I intend to prototype. Please let me know if this will 
> work or not.
>
> ...
>
> What do you think? Any comments or warnings would be highly appreciated.
>
>   
This will work.  As mentioned, it won't scale well.  As warned by 
others, don't take this approach if the requirement is not merely the 
customization of message resources for certain customers.
For instance, I use an attribute in the session to customise SiteMesh, 
Tiles and templates for specific customers (where customer is large and 
has money and many users). Much more can achieved with that.

> Also, if you can also guide me as to how to enable hot-deploy of 
> messageresouces properties file on JBoss it would be great.
>
>   
This is important.  If you want to change messages at run-time *don't* 
use this approach what-so-ever. ResourceBundles are not intended for that.
Switch to a custom database-based solution as suggested by Dave.


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






      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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

Reply via email to