yes i agree. my error checking is going into a buisness level helper class (instead of the form) because it is so complex. it onvolves going into the database, and making sure there are a minimum number of an item left, before a user can make changes to it. it also needs to check various other attributes from the db. i thought that this was too cumbersome to be in the form.
andrew mentioned some ways to forward back to the form with an error in 1.1. i am using 1.0, will these techniques still work? are there any other suggestions on how to do this in 1.0? unfortunately i need to stick to 1.0, so suggestion to upgrade are not going to help much :-) thanks, -mark -----Original Message----- From: David Graham [mailto:dgraham1980@;hotmail.com] Sent: Monday, October 28, 2002 10:38 PM To: [EMAIL PROTECTED] Subject: Re: error checking in Action 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> -- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>