DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26668>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26668 errors messages tags enhancement: make them show only errors/messages ------- Additional Comments From [EMAIL PROTECTED] 2004-02-07 18:56 ------- Here is the use case. The form bean's validate method reports validation errors along with messages. The errors would include the standard messages from validation rules (defined in validation.xml) and some additional rules that are defined programmatically in the validate method. The example of the message would be "You have entered the DOB that makes you 120 years old". Or "You indicated that your weight is 900 pounds". In other words, it might not be an error but it's an unusual value and something that would be nice to get a verification for. The verified data then submitted to the action (using verification flag that is an attribute of the form). >From controller stand point there is no difference - if form reports either error or message I do not want to proceed any further. From presentation stand point, I'd like to show the messages in a way different from errors. If we would implement the severity attribute, it can be achieved relatively easy: <!-- show errors using errors tag--> <html:errors severity="10" /> <!-- OR show errors using mesages tag--> <html:messages severity="2" header="errors.header" footer="errors.footer"> <bean:write name="message"/> </html:messages> <!-- show messages using mesages tag--> <html:messages severity="2" header="messages.header" footer="messages.footer"> <bean:write name="message"/> </html:messages> Note 1. I thought about severity more like a classification system but if it has to be an integer then the other option you mentioned might have a value. I'm not sure how we could make it work with implied ranking though. Second messages tag will print all of the errors then. Note 2. Severity should probably be initialized with 10 (or 0 if we want the most critical one to have a minimal number) so the errors from the standard validator could be shown. Note 3. I'm not sure that method messages.size(severity) is required since the tag could still return the size of the whole collection but severity attribute could be used as a filter in the loop. If we could get away with this then I'd rather make the severity a string. But you are definitely more familiar with code so I trust you on that. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]