You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paul Niedenzu <pa...@interaccess.nl> on 2006/12/05 14:16:18 UTC
Re: Trouble with validation of nested properties - indexedListProperty?
John Tangney <johnt <at> jdtangney.com> writes:
>
> Hi all,
>
> I have memorized the docs, scoured the archives, googled 'till my eyes were
> crossed, experimented at great length, but have not been able to solve this
> riddle.
>
> I have a JSP that looks like this:
>
> <nested:iterate property="allUsers">
> <tr>
> <td><nested:text property="userName"/></td>
> <td><nested:text property="email"/></td>
> </tr>
> </nested:iterate>
>
> My form bean has
>
> public List getAllUsers() {
> return this.allUsers;
> }
>
> Which returns a collection of...
>
> public static class Info { // an inner class of the form bean, FWIW
> private String email;
> private String userName;
>
> public void setEmail(String string) {
> email = string;
> }
>
> public String getEmail() {
> return email;
> }
> ...
> }
>
Hi John (and others)
I read your article with great interest since I encounter this exact problem!
I read the posted answers too that come to the conclusion that the wrong js is
generated. So far so good, but how do we solve the problem? I tried (as in one
of the answers) addressing the first elelement of the List directly by its
index in validation.xml . That works fine... BUT... I have a variable size
List on the jsp :-(
Any suggestions?
Thanks in advance!!
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org