jsp页面 这是动态生成 拼接的代码
if($(v).attr("checked")){
var shufeidiv=$("#shoufei_"+id).html();
if(shufeidiv==null||shufeidiv==""){
var shoufieDetails=$("#shoufieDetails");
var div0=shoufieDetails.html();
div0+="
div0+=""+name+"";
div0+="
"+name+"率: | ";"; div0+=''; div0+=""; div0+=" | ";费率计算天数: | ";"; div0+=""; div0+="请选择..."; div0+=""; div0+=" | ";
---|
div0+="
alert(div0);
shoufieDetails.html(div0);
make_select_data(6,'tianshu'+id);
index++;
}
action 代码 :
@Controller("addFundInvestAction")
@Scope("prototype")
public class AddFundInvestAction extends BaseSupportAction {
/**
*
*/
private static final long serialVersionUID = 1L;
@Autowired
FundInvestService fundInvestService;
@Autowired
private FundProjectService fundProjectService;
FundInvest fundInvest;//基金对象
List fAccount=new ArrayList(); //这是页面传来的集合
@Override
public String _execute() throws Exception {
//投资所属产品
FundProject fundProject = fundProjectService.findFundProjectById(Long.valueOf(23713));
FundUtil.setNullWhenDataValueIdIsNull(fundInvest);
FundUtil.setNullWhenDataValueIdIsNull(fundProject);
fundInvest.setFundInvestAccounts(new HashSet<FundInvestAccount>(fAccount));
fundInvest.setFundProject(fundProject);
DataValue tzzt = new DataValue();
tzzt.setDataValueId(Long.valueOf(7306));
fundInvest.setTzzt(tzzt);
fundInvestService.addFundInvest(fundInvest);
return Action.SUCCESS;
}
提交表单的时候报错:
2015-06-08 10:28:18,948 [http-8080-1] WARN [com.opensymphony.xwork2.ognl.OgnlValueStack] - Error setting expression 'fAccount[0].costtypepart.costTypePartID' with value '[Ljava.lang.String;@189e397'
ognl.OgnlException: source is null for getProperty(null, "0")
2015-06-08 10:28:18,958 [http-8080-1] WARN [com.opensymphony.xwork2.ognl.OgnlValueStack] - Error setting expression 'fAccount[0].feilv' with value '[Ljava.lang.String;@671e1'
ognl.OgnlException: source is null for getProperty(null, "0")
2015-06-08 10:28:18,961 [http-8080-1] WARN [com.opensymphony.xwork2.ognl.OgnlValueStack] - Error setting expression 'fAccount[0].jsts.dataValueId' with value '[Ljava.lang.String;@1ccc63'
ognl.OgnlException: source is null for getProperty(null, "0")