struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mick.Knut...@ubsw.com
Subject RE: Use messages from ApplicationResource.properties for an e-mail
Date Wed, 26 Mar 2003 06:33:00 GMT
perfect. 

 
  _____  

Thank You
 
Mick Knutson
 
Sr. Designer - Project Trust
aUBS AG, Financial - Zürich
Office: +41 (0)1/234.42.75
Internal: 48194
Mobile: 079.726.14.26
  _____  



-----Original Message-----
From: Phil Steitz [mailto:phil@steitz.com]
Sent: Wednesday, March 26, 2003 7:26 AM
To: Struts Users Mailing List
Subject: Re: Use messages from ApplicationResource.properties for an
e-mail


Mick.Knutson@ubsw.com wrote:
> Is there a way to force the Locale?
> I have a requirement, for  user, say in en_US locale, to send an email that will have


standard notes to a user that is in, say Germany (de or de_CH).

So I need to se the locale only when I try to get the message, not 
change it fr the user.
> 

See 
http://jakarta.apache.org/struts/api/org/apache/struts/util/MessageResources.html 
getMessage can take a locale as its first argument, if this is what you 
mean.

>  
>   _____  
> 
> Thank You
>  
> Mick Knutson
>  
> Sr. Designer - Project Trust
> aUBS AG, Financial - Zürich
> Office: +41 (0)1/234.42.75
> Internal: 48194
> Mobile: 079.726.14.26
>   _____  
> 
> 
> 
> -----Original Message-----
> From: Phil Steitz [mailto:phil@steitz.com]
> Sent: Wednesday, March 26, 2003 6:05 AM
> To: Struts Users Mailing List
> Subject: Re: Use messages from ApplicationResource.properties for an
> e-mail
> 
> 
> Raible, Matt wrote:
> 
>>I have a requirement to send a notification e-mail when an item in my app is
>>deleted.  I was hoping to use a string (post-substitution) from
>>ApplicationResource.properties to do this, but alas, it does not work like I
>>hoped.  Is this possible without loading it as a ResourceBundle and calling
>>getString()?
> 
> 
> The struts MessageResources class encapsulates the ResourceBundle and 
> will perform the substitution.  Use:
> 
> MessageResources messages =
> 	MessageResources.getMessageResources("ApplicationResources");
> 
> String msgText =
> 	messages.getMessage("cr.deleted.msg", deletedBy, appURL);
> 
> 
> 
>>// deletedBy and appURL are set previously as String variables
>>
>>new ActionMessage("cr.deleted.msg", deletedBy, appURL).toString()
> 
> 
>>results in...
>>
>>org.apache.struts.action.ActionMessage@13a4226
>>
>>Thanks,
>>
>>Matt
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> Visit our website at http://www.ubswarburg.com
> 
> This message contains confidential information and is intended only 
> for the individual named.  If you are not the named addressee you 
> should not disseminate, distribute or copy this e-mail.  Please 
> notify the sender immediately by e-mail if you have received this 
> e-mail by mistake and delete this e-mail from your system.
> 
> E-mail transmission cannot be guaranteed to be secure or error-free 
> as information could be intercepted, corrupted, lost, destroyed, 
> arrive late or incomplete, or contain viruses.  The sender therefore 
> does not accept liability for any errors or omissions in the contents 
> of this message which arise as a result of e-mail transmission.  If 
> verification is required please request a hard-copy version.  This 
> message is provided for informational purposes and should not be 
> construed as a solicitation or offer to buy or sell any securities or 
> related financial instruments.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message