File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Validation -JSR303 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
JavaRanch » Java Forums » Java JSRs » Validation -JSR303
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to handle Severity error level
 
Similar Threads
Backend validation - a complete example
Spring or EJB
Bind global errors to Spring form and throw them to view
spring:bind not setting values in the command object
Spring validation