Nice restatement Rob. That's exactly how I see the validation working. I know I'm in trouble when my action class gets too big :-).

David



From: Rob Leland <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: error checking in Action
Date: Tue, 29 Oct 2002 00:14:55 -0500

David Graham wrote:

Why do you "need" to move error checking into an action?  Why not just
let the form bean do it's job and validate itself?  Have you looked at
using the validator?  Validation belongs in the form bean; actions' main
job is to direct traffic and execute business layer methods.

David

Agreed,
For Generic type of validation the ActionForm is an appropiate
place to do validation. To restate what David said, the ActionForm
is designed to be passive, and have values info it needs passed
to it. It should definately not make method calls to other Business Logic.

To add to that,Any complex validation would take place in the Business Logic, with the Action being the go between loading and unloading the
ActionForm and calling validation methods in the Business Logic.


-Rob


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

_________________________________________________________________
Get faster connections -- switch to MSN Internet Access! http://resourcecenter.msn.com/access/plans/default.asp


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

Reply via email to