Javascript 为使用逻辑迭代的每一行设置datepicker:iterate

Javascript 为使用逻辑迭代的每一行设置datepicker:iterate,javascript,jsp,Javascript,Jsp,我正在使用logic:iterate在jsp 对于通过logic:iterate迭代的每一行,我们需要为名为dateOfDetection的字段提供datepicker 参考代码: <logic:iterate id="dbOject" name="fakeNotesListInSession" scope="session" indexId="tableCounter"> <TR > <TD> <html:text name="dbOject

我正在使用
logic:iterate
jsp 对于通过
logic:iterate
迭代的每一行,我们需要为名为dateOfDetection的字段提供datepicker

参考代码:

<logic:iterate  id="dbOject"   name="fakeNotesListInSession" scope="session"
indexId="tableCounter"> 

<TR >
<TD> <html:text name="dbOject" property="dateOfDetection"   readonly="true" size="10" ></html:text>
<img src="web/images/cal[2].gif" id="trigger<%=tableCounter.toString()%>" alt="Calendar"/> 
<script type="text/javascript">

                     Calendar.setup({

                           inputField : "dateOfDetection", 

                           ifFormat : "%d/%m/%Y", 

                           button : "trigger<%=tableCounter.toString()%>" 
                     });

                   </script></TD>

         <TD> <html:text name="dbOject" property="fives"  size = "5"  ></html:text></TD>

         <TD> <html:text name="dbOject" property="tens"  size = "5"  ></html:text></TD>


           </TR>

 </logic:iterate>

“alt=”日历“/>
日历设置({
输入字段:“检测日期”,
ifFormat:“%d/%m/%Y”,
按钮:“触发器”
});

对于它迭代的每一行,日期选择器都会出现,但当我们选择日期值时,它只是将值设置为第一行。
原因是“在Calendar.setup函数中,我们将inputField指定为“dateOfDetection”。这被定义为字符串dateOfDetection[]=null;在action表单内部,以便可以在action claas中将其作为数组获取。

Pl更新上述问题的快速解决方案。