struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arnason, Tamara" <>
Subject RequiredIf Validation with nested
Date Tue, 22 Jul 2003 13:24:47 GMT

I'm trying to use the "requiredif" validation on fields in a nested
collection and am not having any luck.

Here's the excerpt from the validation.xml
        <form name="/submitFamily_2004">
              property="campus" indexedListProperty="alumni"
            <arg0 key=""/>

The jsp shows a collection (say, 2) of "alumni" beans.  Each alumnus has a
textbox for entering a first name and a textbox for entering a campus.  I
want the campus to be required IF the user enters a value for the first
name.  But, nothing happens.

If I change the validation.xml so that field[0] points to a variable outside
of the nested collection then everything works fine and messages appear
saything that the firstname in the collection is required.

Is there a way to modify the xml so this will work or is the requiredif-type
validation not (yet?) implemented to work with nested collections?

Thanks for the help!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message