You can put log statements in your form bean's setter methods to verify that they are being called. My guess is that your configuration is causing struts to reinitialize the form somehow and that resets the form values. All I can do is guess, though, since I have no idea how your mappings are configured.
Hubert --- Frank Burns <[EMAIL PROTECTED]> wrote: > I have a validate() method in my ActionForm class that includes some > cleanup > (removes redundant whitespace) of some of the ActionForm bean's properties. > The related Action has validate="true" set in struts-config. So validate() > should always be called. > > The Action class then uses the ActionsForm's getters to read these > properties and saves them. > > However, the saved properties have only been cleaned when errors are found > by the validate() method. > > Why? > > The validate() method is ALWAYS called and executes the cleanup methods on > the properties whether validate() discover errors or not, right? > > Specifically, in the code below, the answer1, answer2, etc., are only > "cleaned" if there is an error found in the email address. > > /*** code snippet ***/ > > public ActionErrors validate( > ActionMapping mapping, > HttpServletRequest request) { > > /* clean redundant whitespace from answers properties */ > answer1 = cleanWhitespace(answer1); > answer2 = cleanWhitespace(answer2); > answer3 = cleanWhitespace(answer3); > > ActionErrors errors = new ActionErrors(); > > /*** validate email address ***/ > > /* check is email address is not empty */ > if ((emailAddr == null) || (emailAddr.length() < 1)){ > errors.add("emailaddressempty", > new ActionError("errors.required.emailaddress")); > } > > ... > > return errors; > } > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? Yahoo! Search - Find what you’re looking for faster http://search.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]