I'm at a loss for why, but I did a lot of trial and error and the following
solved my first problem:

<logic:iterate id="children" name="adForm" property="children"
indexId="index">
  <% String errorKeyChildFirstName =
"children["+index.intValue()+"].firstName"; %>
  <html:errors property="<%=errorKeyChildFirstName%>"/>
</logic:iterate>

I'm still stuck with problem #2 though ("null\r\n" added to the start and
end of every error message).

Mike

-----Original Message-----
From: Mike Hoeffner [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 08, 2001 2:12 PM
To: [EMAIL PROTECTED]
Subject: 2 problems with <html:errors>


I am using the nightly build from 12/07.

1) I have JSP that looks like this:

<logic:iterate id="children" name="adForm" property="children"
indexId="index">
  A: <html:errors property="children[0].firstName"/>
  B: <html:errors
property="<%="children["+index.intValue()+"].firstName"%>"/>
</logic:iterate>

This is what gets printed out:

  A:
  B: <html:errors property="children[0].firstName"/>

When do the <html:errors> tags get evaluated?  Is their a way to set the
property dynamically and still have it be replaced with the appropriate
error message?

2) All of my <html:errors> tags are now replaced with:

null
<error message>
null

instead of just the error message.  This started happening when I upgraded
from 1.0 to nightly-12-07.  I've tried setting errors.header and
errors.footer, but they don't make it into the error either.  I looked at
the source for ErrorTag, MessageResources, and RequestUtil (all seemed to
have changed quite a bit), but I wasn't able to easily figure anything out.

Thanks for any help!
Mike


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to