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 Summary: errors messages tags enhancement: make them show only errors/messages Product: Struts Version: 1.1 Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Custom Tags AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The problem is that after form validate method returns the collection of errors it's hard to separate them into errors and messages. Very frequently there is a need to render errors differently than the messages. The suggestion is to add attributes errorsOnly=”true/[false]” to the html:errors and messagesOnly=”true/ [false]” to the html:messages tags. It’s very simple enhancement but it will definitely be used a lot. The ErrorsTag would have to be modified slightly to cast to ActionMessage base class instead of ActionError and then the check for ActionError: ActionMessage report = (ActionMessage)iter.next(); If(isErrorsOnly() && !(report instanceof ActionError)) continue; Similarly, the MessagesTag can be enhanced to show only messages, ignoring the errors: ActionMessage report = (ActionMessage)iter.next(); If(isMessagesOnly() && report instanceof ActionError) continue; Then in the action form’s validate method both ActionError and ActionMessage instances can be added to the ActionErrors collection and then displayed differently by html:errors and html:messages tags. Note. There is currently a message attribute in the html:messages tag but it’s not a convenient way to separate errors and messages in the action form. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]