struts传递list
function resetIndex(par,sx,formid)
{
for(var t=0;t<sx.length;t++)
{
?var inputs =$("#"+formid+" input[name^="+par+"[0]."+sx[t]+"]");
?for(var i=0;i<inputs.length;i++)
?{
??if(inputs[i].name.indexOf(par+'[')!=-1){
???var index =i;
???inputs[i].name = inputs[i].name.replace(/\d+/,index);
??}
?}
?}
}
?
function subMitOrder(th)
{
? ?var sb=new Array("ball","odds","orderFee");
? ?resetIndex("orderTO",sb,th.name");
???return true;
}
==============
???<form-bean name="orderForm"
???type="org.apache.struts.validator.LazyValidatorForm">
????? <form-property name="orderTO" type="com.zh.lottery.to.OrderTO[]"></form-property>
?</form-bean>
==============
DynaBean orderForm=(DynaBean) form;
OrderTO[] u=(OrderTO[]) orderForm.get("orderTO");??
List<OrderTO> list=new ArrayList<OrderTO>(Arrays.asList(u));
???