Global error message with tiles
Is there any generic way to determine if there is an error in any of the objects bound on the page?
I am using tiles and my example is:
HeaderTile
CurrentUserTile
ErrorMessageTile
PageMessageTile
ContentTile
The way I understand it, in order to display an error message I have to know what the name of the form is to bind spring to.
So, if my jsp in ContentTile is bound to form "Blah1", then my ErrorMessageTile (which is generic) must also be bound to form "Blah1".
All I want my ErrorMessageTile to do is to display "Please correct errors below". Is there any way to not have to have a different error jsp tile for each bean I am binding too (i.e. not have it be bean aware)?
The way struts handles it is binds the errors under a defined attribute name. Therefore you can just check to see if that attribute exists and keep your ErrorMessageTile generic.
Any suggestions?
thanks alot