Hi Thiago,

> Well, I am facing a problem while a validation error and executing a  
> default view class.
> I check the source code and saw that in a validation error state a  
> getSourcePageResolution is called!
> But I need to use the default view method implemented to find some  
> data in a database and display to the user!

You can gain control of what happens in the presence of validation errors
by having the action bean implement the ValidationErrorHandler interface,
which has one method:

public interface ValidationErrorHandler {
  Resolution handleValidationErrors(ValidationErrors errors)
    throws Exception;
}

This method is called after the validation process if at least one validation
error occurred and the list of errors is passed as a parameter. In
the method, you can do pretty much anything, including the following:

• Change the list by adding, modifying, or deleting errors
• Change properties in the action bean
• Make calls to a DAO, and so on

If you return a Resolution, it is executed directly instead of returning
to the source page.

Hope that helps.

Cheers,
Freddy
http://www.stripesbook.com



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to