You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/07/15 17:40:22 UTC
DO NOT REPLY [Bug 21613] New: -
nested:error tag stopped displaying error messages (of certain scenario) when upgraded from Struts1.1 R1 to Final version
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21613>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21613
nested:error tag stopped displaying error messages (of certain scenario) when upgraded from Struts1.1 R1 to Final version
Summary: nested:error tag stopped displaying error messages (of
certain scenario) when upgraded from Struts1.1 R1 to
Final version
Product: Struts
Version: 1.1 Final
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Validator Framework
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: dulonz@talk21.com
1. SUMMARY:
nested:error tag stoped displaying error messages of a certain scenario when I
upgraded from Struts1.1 R1 to Final version (also R2 version of Struts1.1 does
not display the error message so it looks like the change was introduced in R2
version.)
2. SCENARIO WHERE PROBLEM OCCURS:
This problem occurs as far as I can see on properties that I iterate on:
JSP extract:
...
<nested:iterate id="info" property="infoCollection" type="example.InfoBean">
<nested:text property="title" />
<nested:errors property="title" /> <!-- no error messages gets displayed
here since R2 version of Struts 1.1 -->
<nested:iterate>
...
When I look at the html output of what the JSP produces, it is as follows:
...
<input type="text" name="infoCollection[0].title" />
...
In my Action class, here is an example of how it adds an error message:
...
errors.add("infoCollection[0].title", new ActionError("some.error.key"));
...
3. EXPECTATION: (what it should have done)
Display the error message in the html output in place of where this jsp code
appears:
<nested:errors property="title" />
This worked in version R1 of Struts 1.1
4. THE PROBLEM:
The problem is that now that I am using the final version of 1.1, when an error
message is added with an appropriate key, the error message does not show, but
when I was using the R1 version of Struts 1.1, it did show the error message.
Also, R2 seems to have the same problem has the final version...
I tried using <nested:errors/> and then it does show the error messages, but
<nested:errors property="title"> does not. I tried using the "html" instead
of "nested" ones but had no luck.
All other error messages that are not based on iterated properties displays
correctly (however, in my application, I only have the one instance where I am
using iterated properties that need to display the exact field that the errors
occur).
5. FURTHER INFORMATION
I am using the Resin webserver. Also my code has not changed in between the
upgrades (i.e. I tried reverting back to R1 and then the error messages got
displayed). No exceptions are thrown and I after putting log statements, have
ensured that the error messages gets added correctly.
R1, R2 and Final versions of Struts that I used are all milestone versions.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org