Hi All,

I have question regarding use of validate() method in Struts 1.3.8.

I have simple form to collect couple of information (e.g. code and name) and have to add them to the Database. All database operations are handled by my DAO layer.

Both code and name are unique in Database. So I want to validate code and name before calling INSERT SQL statement.

Three methods I have in DAO layer are
     - Cutomer findByCode(String code);
     - Customer findByName (String name);
     - void createCustomer (Cutomer cust);

So I am calling first two methods in validate() method and third one in execute() method.

Is this a good way to do validation before inserting the record? Or there is better logic/design than this?

I will be glad if anyone can answer my curiosity.

Thanks,
Anjib




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to