struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Jouravlev" <>
Subject Re: How to execute code in an Action when ActionForm validation fails?
Date Tue, 18 Apr 2006 18:46:00 GMT
On 4/18/06, Eric Rank <> wrote:
> I agree that the manual validation approach is very good at keeping
> related code in one place. This is how I'm currently choosing to solve
> this problem.
> However, I feel that it's sloppy because it requires additional logic.
> I try to avoid using unecessary logic for the sake of keeping code
> readable. When I have a bunch of nested logic to sift through, it
> doesn't take more than 3 levels before I begin to lose my place in my
> own neural memory stack. Suddenly, 'execute' starts doing too much.
> In my mind, optionally implementing an interface / method designed to
> run when the form validation fails seems very elegant to me. The code
> is much more compartmentalized.

In my mind, the code is readable when I can read what it's doing. With
validate="true" I cannot.

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

View raw message