*DESIGN FLAW*

Yep! You're quite right. If you want to build descendant ActionForms extend
base ActionForm class you will to iterate through ActionError and add
each one individually.  Doh!

Or you can provide, for now, a special convenience method that
adds to ActionErrors  lists together  and put that in the ActionForm base
class.

class BaseActionForm {
     public static ActionErrors addActionErrors(
           ActionErrors e1, ActionErrors e2 );     //DOH!
}

--
Peter Pilgrim                 ++44 (0)207-545-9923
                                                      //_\\
"Mathematics is essentially the study of islands of  =======
disparate subjects in a sea of ignorance."           || ! ||
Andrew Wiles _____________


---------------------------------------- Message History 
----------------------------------------


From: "Jonathan James" <[EMAIL PROTECTED]> on 09/11/2001 15:01 CST
--<CUT>--

Is there no way to add an ActionErrors object to another ActionErrors?

I had several ActionForms that had common data so I factored it out into a separate 
ActionForm. The validate for the outside ActionForm calls the validate for the inner 
ActionForm like so:

ActionErrors errors = contactInfo.validate( mapping, request );

Then proceeds to add other ActionError objects to errrors.

Now I want to factor out some different data into another ActionForm and do the same 
thing. I would LIKE to be able to just do this:

errors.add( otherInfo.validate( mapping, reqeust );

I guess I will extend ActionErrors and add a method to handle this. Has no one else 
run into this problem? Any other ideas for a workaround?

-Jonathan





--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to