struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burr Sutter" <>
Subject Re: Adding ActionErrors to ActionErrors
Date Sat, 10 Nov 2001 01:38:57 GMT
Since you are calling the validate method yourself you could pass in the
ActionErrors object.
Something like:
the downside is that it won't allow the little "subforms" to work
You might also just write a utility class that merges ActionErrors objects.
Call the get() method which returns an Iterator of all messages. I believe
you then get individual ActionError objects. I had to do this once for
another reason but I can't find the code at this point.


----- Original Message -----
From: "Jonathan James" <>
To: <>
Sent: Friday, November 09, 2001 4:01 PM
Subject: Adding ActionErrors to ActionErrors

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?


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message