struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Soomar, Muki (R.)" <msoo...@ford.com>
Subject Using a resource file for managing Form errors
Date Thu, 13 Jun 2002 19:21:24 GMT
Problem:
------------
I am trying to use a separate resource file for managing errors coming out of the form validation
in an ActionForm. How do I access this resource file? This is a second resource file defined
in my
struts-config.xml file.

Steps taken so far:
-------------------------
1. Defined a Message Resource in the struts-config.xml file as follows:
	<message-resources parameter="com.myDomain.RegistrationFormResources" />

2. Dont have a clue how to utilize this in the ActionForm's Validate method. Tried doing this..

	if ((addressLine_1 == null) || (addressLine_1.length() < 1))
		errors.add("addressLine_1", new ActionError("error.RegistrationForm.addressLine_1.required"));

I checked the archives for finding out the answers, but could not find any.
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg33400.html
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg33035.html
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg31667.html
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg31424.html

Any help will be much appreciated.

Muki Soomar


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


Mime
View raw message