Hi Gary- what happens when you try it thru JS ? <SCRIPT type="text/javascript" language="javascript">
var errorsObject = StrutsUtils.getValidationErrors(text); </SCRIPT> ? M-- ----- Original Message ----- From: "Gary Affonso" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <user@struts.apache.org> Sent: Saturday, December 15, 2007 1:00 PM Subject: What's up with validationErrors? > I made the mistake of using the "validationErrors" map in my Freemarker > page... > > <td>${(validationErrors["postalAddress.firstName"]) !}</td> > > I did this reflexively without thinking and it worked. For awhile. > Then it broke. In very strange ways. > > The problem I'm having with it is that if I add a fieldError, by hand, > in my action right before returning success (which shows the form) I > don't see the fieldError in the validationErrors map. > > In other words this fails... > > In my actions execute() method: > > addFieldError("emailAddress", "temp"); > return Action.SUCCESS; > > In my view mapped to SUCCESS: > > ${(validationErrors["emailAddress"]) !} > > I get nada. > > But in some instances I do get errors in the validationErrors map. For > example, if I add fieldErrors from within a validate() method on my > form-processing action and then preserve those errors across the > redirect (via the MessageStoreInterceptor) to my form-show action, > *some* (but not all) of the validation errors are shown. > > WTF?! > > Anybody know what the deal is with the validationErrors map? What is it > supposed to contain? When does it get updated/synchronized with > actionErrors and fieldErrors? > > I'll avoid it for now (and just use the fieldErrors map directly) but > now I'm curious what validationErrors is supposed to do. Is it vestigal? > > Thanks! > > - Gary > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]