my dog learned polymorphism*
The moose likes EJB and other Java EE Technologies and the fly likes how to handle Severity error level Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "how to handle Severity error level" Watch "how to handle Severity error level" New topic
Author

how to handle Severity error level

gianluca gian
Ranch Hand

Joined: Aug 14, 2009
Posts: 31
hello, actually I'm using jsr 303 feature to validate user input and on jsp page I'm using Spring library to display error messages. This is my validator class:



on the jsp i'm displaying error messages with spring like:


I'm looking a way to set on the validator code, some king of "flag" that could bring to client side, the the error level severity information (error, warning, info), so that I could style messages on jsp with different colour (es. red for error level, blue for warning one). Could you please help me? thank you
gianluca gian
Ranch Hand

Joined: Aug 14, 2009
Posts: 31
hello, at the end I resolved in this way, inside validator:



and within jsp:



not sure if it is formally correct. Thnak u. Bye
 
wood burning stoves
 
subject: how to handle Severity error level
 
Similar Threads
Backend validation - a complete example
Bind global errors to Spring form and throw them to view
Spring or EJB
Spring validation
spring:bind not setting values in the command object