You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Keith Pemberton <kb...@cox.net> on 2003/07/18 22:28:16 UTC

Re: Reasonable to use EJBs for validation in ActionForm validate method?

The validation code of if the custom is already in the database should
be in your create method on the entity EJB.  Other validation code
concerning the webform (such as valid address) should go in the validate
method on the ActionForm that you have specified for the webform.  Hope
this helps.  Let me know if you need code samples.

Keith

On Tue, 2003-06-10 at 08:55, Aaron Robinson wrote:
> For validation that can only be done against the database, should this go in 
> the validate method or in the execute method?
> 
> For example checking that a customer doesn't alerady exist before inserting 
> it, or checking that a user has entered a valid address before the execute 
> method is called to try and create it.
> 
> Also, with the validator framework, does this just apply to basic (non model 
> based) validation?
> 
> _________________________________________________________________
> Find a cheaper internet access deal - choose one to suit you. 
> http://www.msn.co.uk/internetaccess
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
-- 
Keith Pemberton <kb...@cox.net>


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