U Kan use like following way,

        <s:iterator value="v" var="id" status="stat">
                <s:textfield name="v[%{#stat.index}].key"  />
                <s:textfield name="v[%{#stat.index}].value" />
        </s:iterator>

Regards,
Nikunj

-----Original Message-----
From: EoneZhang [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2008 7:44 AM
To: user@struts.apache.org
Subject: [HELP]: struts tag and OGNL


Hi, everyone.

I have something wrong about the usage of struts tag and OGNL.

Here is my problem:

I want to generate the following html with <s:textfiled/> tag:

    
<input name="mylist[0].dstn" value="CNS" type="text"><br/>
<input name="mylist[1].dstn" value="CNS" type="text"><br/>
<input name="mylist[2].dstn" value="CNS" type="text"><br/>


I use the tag like following:

    
  <s:iterator status="sts" value="mylist">
   <s:textfield name="mylist[#sts.index].dstn"/>
  </s:iterator>
  

But it generate the below html:


<input type="text" name="mylist[#sts.index].dstn" value="CNS"
id="list_mylist__sts_index__dstn"/>
<input type="text" name="mylist[#sts.index].dstn" value="CNS"
id="list_mylist__sts_index__dstn"/>
<input type="text" name="mylist[#sts.index].dstn" value="CNS"
id="list_mylist__sts_index__dstn"/>


Is there anyone who can give some help,thanks a lot:handshake:





-- 
View this message in context:
http://www.nabble.com/-HELP-%3A-struts-tag-and-OGNL-tp20653798p20653798.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


__________ NOD32 3632 (20081121) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com



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

Reply via email to