--- "Wu, Feng" <[EMAIL PROTECTED]> wrote:
> Thanks, I have opened a bug report on item one, it is at
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21254.  Regarding the
> second item, is there a paticular reason that the validator is designed
> to "stops validating a list of values on the first failure"?  

It's not really designed that way, it just doesn't work right now.  I
haven't investigated what it would take to make this work yet.

David

> This
> morning I actually modified Validator.java so that it validates all
> memebers of the list and saves error messages for them all.  So now I
> get it to display like this:
> 
> value is mandatory
> value is mandatory
> value is mandatory
> 
> This is of course not very clear to the user, because I really wanted is
> to display:
> 
> nameList value 1 is mandatory
> nameList value 2 is mandatory
> nameList value 3 is mandatory
> 
> I guess I still need to figure out a way of contructing the error
> messages in a different way so that it works for both indexed and
> non-indexed property.
> 
> On the other hand, the validwhen rules that's supposed to come after 1.1
> final, will it be able to handle this kind of validation?  How difficult
> it would be possible to plug that piece into Strut 1.1?  The reason I
> ask is because it will be much difficult for me to sell to the
> management the idea of delivering our project on nightly build than on
> Struts 1.1 final.
> 
> 
> Thanks a lot.
> 
> Feng
> 
> 
> -----Original Message-----
> From: David Graham [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 01, 2003 3:21 PM
> To: Struts Users Mailing List
> Subject: Re: Repost: Validator indexed property not working in Struts
> 1.1 Final Release
> 
> 
> --- "Wu, Feng" <[EMAIL PROTECTED]> wrote:
> > 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?
> 
> It is indeed broken in 1.1 final and 1.1 RC2 (1.1 RC1 works fine). 
> Please
> open a bug report on the tag so we can track this in bugzilla.
> 
> > 
> > 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.
> 
> This is a current limitation of the validator.  It stops validating a
> list
> of values on the first failure.
> 
> David
> 
> > 
> > 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]
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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

Reply via email to