Hi
   http://jakarta.apache.org/struts/faqs/indexedprops.html

Struts doc. seems to be sufficient for this query.
Mohan



-----Original Message-----
From: Florent LOTHON [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 5:41 PM
To: Struts Users Mailing List
Subject: multiple input form editing problem


LO,

I have a form with multiple input as this

<input type="text" name="surname">
<input type="text" name="name">
<input type="text" name="surname">
<input type="text" name="name">
<input type="text" name="surname">
<input type="text" name="name">
...

i made a usersForm as this :

private String[] name = null;
private String[] surname = null;
...

I would like to show the content of a the "usersForm " object


I tried as this :
<%
    int i=0;
%>
<html:form name="xxx.do">
    <logic:iterate...>
<%
    String surname = "surname["+i+"]";
    String name = "name["+i+"]";
    i++;
%>
        <input type="text" name="<%= surname %>">
        <input type="text" name="<%= name %>">
    </logic:iterate>
</html:form>

This show magically the correct values on screen but as this in HTML code :

<input type="text" name="surname[0]" value="toto">
<input type="text" name="name[0]" value="TO">

<input type="text" name="surname[1]" value="tata">
<input type="text" name="name[1]" value="TA">

So when i submit this form
The usersForm can't retrieve new values because of the bad name of property
(surname[0], name[0], surname[1], name[1],...)

I think it must exist a simpliest solution using "indexed" attribute or
others but i don't know what.
And the documentations on struts are so poor for this kind of problem.

sincerly

Florent




------------------------------
Ce message est protege par les regles relatives au secret des
correspondances ; il peut en outre contenir des informations a caractere
confidentiel ou protegees par differentes regles et notamment le secret des
affaires ; il est etabli a destination exclusive de son destinataire. Toute
divulgation, utilisation, diffusion ou reproduction (totale ou partielle) de
ce message, ou des informations qu'il contient, doit etre prealablement
autorisee.
Tout message electronique est susceptible d'alteration et son integrite ne
peut etre assuree. Les AGF declinent toute responsabilite au titre de ce
message s'il a ete modifie ou falsifie.
Si vous n'etes pas destinataire de ce message, merci de le detruire
immediatement et d'avertir l'expediteur de l'erreur de distribution et de la
destruction du message.
This message is protected by the secrecy of correspondence rules ;
furthermore it may contain privileged or confidential information that is
protected by law, notably by the secrecy of business relations rule ; it is
intended solely for the attention of   the addressee . Any disclosure, use,
dissemination or reproduction (either whole or  partial) of this message or
the information contained herein is strictly prohibited without prior
consent.
Any electronic message  is susceptible to alteration  and  its integrity can
not be assured.  AGF declines any  responsibility for  this message in the
event of  alteration  or falsification..
If you are not the intended  recipient, please destroy it immediately and
notify the sender of the wrong delivery and the mail deletion.
------------------------------



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

Reply via email to