struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rassmann, Natalie D" <>
Subject Re: Validate values in a collection
Date Fri, 26 Sep 2003 10:13:42 GMT

I would try to avoid using the requiredif because it will be deprecated with the
next release of struts.  validwhen will replace it.  validwhen is much more
powerful and easier to use.  To get the validwhen code, you have to go and
download a nightly build.  I just did it a few days ago and everything works
fine.  I actually built the validwhen stuff into my app rather than used the new
struts.jar file.

If you don't want to try and use the validwhen then you can modify Matt Raible's
design for validating two fields.  I did that too.  The only problem I had was
when I was trying to validate an indexed property and a non-indexed property.  The
getProperty method in the common-beanutils kept getting an error when trying to
use reflection to find the second property (the one that was not no part of the
collection).  In other words, I was trying to compare an item in an ArrayList with
a property that was just a String (not part of the ArrayList).  I had and still am
having problems with that.  I am going to try again this morning and try to get it
to work because the validateTwoFields works great when it works.

I hope this helps,


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message