From: Tony F. <ton...@ya...> - 2003-03-04 01:58:35
|
John, I believe the "code" field refers to an "ErrorCode" that could be used as a string value of an error msg that is associated with that Error. (Similar to a mainframe returning an error code when a bad message is returned to a user, only since it's a string it can actually be a bit descriptive for the user.) See the javadocs for the com.interface21.core.ErrorCoded interface for a detailed description. I am making some changes to the framework (then will pend review from Rod) to allowing ResourceBundles to be tied into a few things within the framework a little better. Right now, I believe the API to obtaining messages for anything in the framework is limited in 2 ways: 1) Does not allow parameters to be passed to it. 2) Some of the APIs do not allow a Locale to be passed into them (the Errors.rejectValue(...) is a good example. My changes should address both these issues. Also, I am attempting to add a subclass to the NestedException class (that merely calls a helper object) that will allow Exceptions themselves to obtain their messages from a ResourceBundle. I have this working now for myself, but wish to make a few changes to it to model the behavior of how log4j allows you to point various classes to various files (ie: Exceptions in this package look to this file for their msgs). I am a few days away from a code review on this. As far as answering your question about examples, I'm sorry but I don't have any examples to give you. -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of John Cavacas Sent: Monday, March 03, 2003 4:03 PM To: spr...@li... Subject: [Springframework-developer] purpose of code in Errors.rejectValue() I was wondering if someone, most likelly Rob, could tell me what the purpose of the String code parameter is in Errors.rejectValue(String field,String code,String message) method. And like my previous email "Validation usage examples and questions" i am looking for further clarification and proposed usage of the validation and DataBinding techniques in the framework. Thanks, John ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |