Hello:
I am trying to decide the best way to implement data validation in my
beans:
1. Add a boolean validate() method that checks the bean's properties,
populating a message Vector that can be retrieved later.
2. Throw a custom ValidationException in the setters.
Number 1 is clean, but lets bad data into the bean, and requires the
developer to know the sequence of calls.
Number 2 puts a hard shell on the bean, but is a little cumbersome
because of the try/catch around calls to the setters.
Opinions?
--
Quinn Stone
Stone Consultants
2214 1/2 Santa Clara Ave.
Alameda, CA 94501
510.865.7342
www.stoneconsultants.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html