Do you mean substitution like the ???form.tag.name??? ---------- Thanks... Mick Knutson
Systems Developer Business Direct Services, Wells Fargo Bank 333 Market Street, SF, CA 94103 (415) 371-2553 [EMAIL PROTECTED] MAC A0103-223 "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." ---------- -----Original Message----- From: Fogleson, Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 29, 2005 8:04 PM To: Struts Users Mailing List; Corey Probst Subject: RE: Load message resources from DB??? Actually you have to extend MessageResources, and MessageResourcesFactory. I have a quick hack I did up tonight that works for a minimal case. (it does not do the substitution and such. But if you just have a key=value and value does not contain {x} in it then it will work. (Actually it will work but print {x} :) If anyone wants the source feel free to email me and I will send it along. I'll leave the substitution and implementation of other methods to whoever needs it. Seems to me like this is a terrible hit to performance. I did not implement a cache though so it is a TERRIBLE hit to performance. Mostly wanted to see how hard it would be to grab them from the DB. Al -----Original Message----- From: Corey Probst [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 29, 2005 9:12 PM To: Struts Users Mailing List Subject: Re: Load message resources from DB??? > Even if I could just get some general directions on what method to pull the data in, and what method to put the data into what type of container. > Just something would be good. I think I remember reading a post about this before. Start by looking at the PropertyMessageResources source code, specifically, the loadLocale and getMessage methods. This is where the properties are read from the file (for that implementation). You can probably extend that class and load the messages from a database by overriding one of those methods (loadLocale). You would also need a method to clear the cache of messages when they are updated. (Be careful in a clustered environment) On second thought you can probably just extend MessageResources and implement the getMessage method. Hope that helps... even if it's just a little bit. Corey --------------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]