Hi Guys,
Has anyone ever extended the functionality as offered by the
org.apache.struts.util.RequestUtils? I want to be able to substituted
keywords in my messages as loaded from my properties file with values from
the database. I got this up an running by extending the MessageReources and
defining my custom message factory in my Struts-config.xml.
So when getMessage() is called my keyword are loaded from the database via a
thread etc.. My problem with this is as follows:
My keywords are substituted before my message keys are substituted.
Example in my properties file i have the following:
error.invalidtypes=Invalid {0} entered
//creating my ActionError
new ActionError("error.invalidtypes","#ACCOUNT");
So in my messageRecourse i have a hashMap of values as loaded from the
database eg.
#ACCOUNT_EN - account code
This works fine if i had my message defined as the following in my
properties file:
error.invalidtypes=Invalid #ACCOUNT entered
But i want to control the actual keyword i.e. #ACCOUNT, #SORT-CODE etc
So in short i want to check my messages for keywords (i.e. Anything starting
with a #) after message keys have been substituted. After some initial
investigation the best place to add this functionality would be in the
RequestUtils.message() after it makes the call to
resources.getMessage(userLocale, key, args)... It doesn't seem like a wise
idea to extend RequestUtil..... any ideas or suggestions gratefully
appreciated??
_________________________________________________________________
Help STOP SPAM: Try the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
- Re: Custom Message Resources Pat Quinn
- Re: Custom Message Resources Pat Quinn