Seems like my previous email to the list did not make it. Here it goes again. Thanks.
By the way, I can work around the problem of nested:messagePresent not finding the
ActionError by mannualy generating the property attribute like this:
<nested:messagesPresent property='<%= "nameList[" + i + "].value" %>'>
But this kind of defeated the purpose of nested tags, does it?
I still could not figure out why there is only ActionError (for property
nameList[0].value) is in request scope when I should have three, since
nameList[1].value and nameList[2].value are blank and should fail validation.
Thank you.
Feng
-----Original Message-----
From: Wu, Feng
Sent: Monday, June 30, 2003 5:08 PM
To:
Subject: Validator indexed property not working in Struts 1.1 Final
Release
Hi,
First, great works on Struts 1.1 final release. Just in time since we are designing a
major project using Struts.
Got a couple questions regarding validator and indexed properties in Struts 1.1 final
release:
1. Seems that the validation of indexed property in struts-validator application (in
type.jsp) is broken. Specifically the page has an indexed property nameList[].value.
After I switched to Struts 1.1 final, the error message no longer shows up. Does any
one has the same problem? I knew this was working in RC1.
In request scope, I saw ActionError saved for property nameList[0].value. In type.jsp
the following code is used to output errors for this property:
<nested:messagesPresent property="value">
<br>
<ul>
<nested:messages id="error" property="value">
<li><bean:write name="error"/></li>
</nested:messages>
</ul>
</nested:messagesPresent>
It seems nested:message can no longer match up "value" with "nameList[0].value".
Any expert opinions on this?
2. Related (this is not 1.1 final release specific), say I want to display error
messages for all the members of an indexed property, i.e., in the type.jsp example, I
want to display like:
* nameList value 1 is mandatory
* nameList value 2 is mandatory
* nameList value 3 is mandatory
instead of just displaying "nameList value is mandatory" only once even though all
three fields are blank. Is there a simple way of doing that? Again, looks like only
nameList[0].value is used as the key to save an ActionError when all three fields are
blank (thus all warranting error messages).
Is it the designed behavior to save only one ActionError for indexed property no
matter how many actual members of the indexed property actually have?
Thanks very much.
Feng
***********************************************************************
This e-mail and any files transmitted with it are intended
solely for the use of the addressee. This e-mail may
contain confidential and/or legally privileged information.
Any review, transmission, disclosure, copying, or any action
taken or not taken, by other than the intended recipient, in
reliance on the information, is prohibited. If you received
this e-mail in error, notify the sender and delete this e-mail
(and any accompanying material) from your computer and
network. In addition, please be advised that 21st Century
Insurance Group reserves the right to monitor, access and
review all messages, data and images transmitted through
our electronic mail system. By using our e-mail system, you
consent to this monitoring.
***********************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]