Hi all, I have a MessageResources.properties file that contains all the messages regarding form validation. I wonder what should I do when I have a business/workflow messages (like "This entry already exist in the DB"), should I use the same properties file? If yes - how do I call it from the business layer (say EJB layer)?
Thanks Rivka -----Original Message----- From: Abdullah Jibaly [mailto:[EMAIL PROTECTED] Sent: Friday, July 08, 2005 4:07 PM To: Struts Users Mailing List Subject: RE: access entries in MessageResources.properties from java code MessageResources mr = getResources(request); String messageValue = mr.getMessage(messageKey); -Abdullah -----Original Message----- From: Tony Smith [mailto:[EMAIL PROTECTED] Sent: Friday, July 08, 2005 12:05 AM To: Struts Users Mailing List Subject: access entries in MessageResources.properties from java code How can I access entries in "MessageResources.properties" inside Action or Form code? Thanks, --- Rick Reumann <[EMAIL PROTECTED]> wrote: > Hubert Rabago wrote the following on 7/8/2005 12:24 > AM: > > There are several > > reasons why you shouldn't use VOs as your form > beans and vice versa > > (as other msgs in this thread explain). > > Actually in this thread so far I haven't heard > anyone explain why they > are a 'bad' idea. The only way I see it being 'sort > of' bad would be if... > > 1) You insist upon using the validation framework by > having validation > take place by setting validation="true" in your > struts-config mappings. > (I like to call validation manually in my Actions so > this isn't really a > problem - it's like an extra line or two of code). > > 2) Sometimes you have some odd non-VO type > properties that you want to > send to your Action. If you insist these needed to > be captured by some > kind of bean/ActionForm than yea I guess that's a > minor problem... but > what's the big deal about using an occasional > request.getParameter("") > or since you are using Struts you still 'have' to > use an ActionForm just > add the VO as a property and you can still a few > other misc fields if > you so desire. > > ActionForm == "The Black Sheep of Struts" :) > > -- > Rick > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- 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] ************************************************************************************************** The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email in error please notify the system manager or the sender immediately and do not disclose the contents to anyone or make copies. ** eSafe scanned this email for viruses, vandals and malicious content. ** ************************************************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]