I think some enhancements to the MessagesTag are appropriate but before I started coding a patch I thought I would get some developer opinions. I think it should support message resources keys in the same way that the ErrorsTag does. Instead of errors.* it would support messages.header messages.footer messages.prefix messages.suffix
The tag would use the header and footer keys if they aren't provided as attributes. This way you don't have to specify the key every time you use the tag. Also, it would be nice if there were a "scope" attribute that told the tag what scope to look for the message bean in. Currently, it looks in the request but I would like to use the tag in a different way than the errors tag. It's fine for the errors tag to use the request because struts handles forwarding back to the input page when ActionErrors are returned from a form's validate() method. However, the messages tag could be used to display success messages on a page that you redirect to. This is not possible when the messages bean is in the request scope. If the messages bean is allowed to be in a greater scope such as session or application then it also makes sense to have a "remove" attribute that tells the tag to remove the bean once it's printed the messages. My preference is to default this to true. So, does anyone see value in these changes? Should I make the effort to implement them? Dave _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>