VW user tip2: User Friendly Error Messages For Woodstock AutoValidation
By winston on Apr 26, 2008
One of the powerful features of Woodstock TextField components bundled with Netbeans Visual Web is, client side auto validation. However, it is kind of tricky, if you want to change the default messages it displays. David Heffelfinger sent me this neat tip on how to achieve this.
For other user tips, visit Netbeans Visualweb user tips and code snippets
A while back I was experimenting with Woodstock. One of the things I
liked about it was the "ajaxified" auto validation of text fields and
text areas. Unfortunately when I tried it out I was disappointed that
neither <h:message> nor <webuijsf:message> would "catch"
validation errors when auto validation "kicked in". Reading about it I
noticed that we can use an alert component to display validation
errors, via the "notify" attribute.
Unfortunately by default both the "Header" and the "body" of the alert display the same message, not exactly user friendly.
After some research I found a solution, we need to override the "detail" and "summary" error messages via a resource bundle.
I blogged about this at http://www.jroller.com/heffel/entry/user_friendly_error_messages_for