In my validator class I am throwing a ValidationError here:
[code]
if (valueAdd.hasNEC(req.getNecCode())) {
throw new ValidationException("nonStockReq.necCode", "necExclusion");
}
[/code]
In my AbstractRequisitionActionBean I am catching the error:
[code]
catch (ApplicationException e) {
In your catch block, I see this:
validationExc.mapError(errors);
getContext().addError(validationExc.getMessage());
The definition for ValidationException#mapError(ValidationErrors) shows that
it adds the error to the ValidationErrors. I don't know what
YourActionBeanContext#addEr
rom: Ben Gunter [mailto:gunter...@gmail.com]
Sent: Tuesday, March 22, 2011 10:20 AM
To: Stripes Users List
Cc: Savoy, Melinda
Subject: Re: [Stripes-users] Question on why stripes error is displayed
duplicated in JSP page
In your catch block, I see this:
validationExc.mapError(errors);
better way to do this, any help is appreciated. Thanks.
From: Savoy, Melinda
Sent: Tuesday, March 22, 2011 10:33 AM
To: 'Ben Gunter'; 'Stripes Users List'
Subject: Re: [Stripes-users] Question on why stripes error is displayed
duplicated in JSP page
Thanks, Ben. I appreciate the
unter'; 'Stripes Users List'
Subject: Re: [Stripes-users] Question on why stripes error is
displayed duplicated in JSP page
Thanks, Ben. I appreciate the quick response.
My SCMISActionBeanContext which extends the ActionBeanContext has
the addError(final String msg) method whic