代码小新 2015-06-08 02:29 采纳率: 0%
浏览 1522

Java Struts2 框架页面传参问题就

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+="";
div0+="";
div0+="";
div0+="";
div0+="";
div0+="";
div0+="";
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")

  • 写回答

2条回答

  • 我是主厨 2015-06-08 02:37
    关注

    你一步一步调试一下嘛,看看在哪儿出错了。

    评论

报告相同问题?

悬赏问题

  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型
  • ¥15 求学软件的前人们指明方向🥺
  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn