struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Longwell <>
Subject Please Help: ActionForm Re-Population
Date Mon, 14 Jul 2003 15:00:53 GMT
I am on the last leg of a web application, and I've run into problems 
adding validation to the mix.

I have an "edit" Action that retrieves a database record, a list of 
drop-down options, and then populates the "editor" ActionForm. Works 
great, and I LOVE STRUTS!

Now I've implemented validation (through the Validator Framework, but I 
think my problem is with validate() in general).

After the user clicks submit, their post is sent to my "update" action.

If they do not break any validation rules, all goes well. The problem 
occurs when a validation rule is broken.... They are returned to the 
form... but the drop-downs (which are populated in the "edit" Action) 
are empty. I have set breakpoints in the code... and I see that the page 
neither my "edit" Action code (the part where the drop-down data is 
retrieved), nor my "update" Action code is actually running.

Question.... between pressing submit and returning the "edit" JSP with a 
populated ActionErrors object. Where is "validate()" actually called? 
Where can I insert code to populate a drop-down with a set of values so 
that it will appear both when the form is presented the first time, and 
after a validation error?

Thank you for your help,
Aaron Longwell

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

View raw message