日期:2014-05-20  浏览次数:20665 次

webwork对页面名字相同,action中为list如何保存?
Action如下:
public   class   MovieAction   extends   ActionRoot   {
private   List   playactors;

//get/set

//other
}

在playactors里面存放的是Playactor类型.里面名含名字等信息.

在页面如下:
<input   name= "playactors.name "   value= "abc ">
<input   name= "playactors.name "   value= "aaa ">

这样不对.不能对List里面设置值.

google了一下,有一个是XworkList的方法,不过XworkList不建议使用。
还有一个添加配置文件,
Collection_playactor=a.b.c.Playactor

还是也没有成功。请教?  
页面的 <input   name= "playactors.name ">   是用js动态添加的.  


------解决方案--------------------
问错地方啦,
帮顶一下吧。
------解决方案--------------------
好象可以加个ID比如
<input id= "a1 " name= "playactors.name " value= "abc ">
<input id= "a2 " name= "playactors.name " value= "aaa ">
然后根据ID 来取值
这样可以?