当前位置: 代码迷 >> Java Web开发 >> Cannot retrieve definition for form bean null on action /savePlanB解决方案
  详细解决方案

Cannot retrieve definition for form bean null on action /savePlanB解决方案

热度:515   发布时间:2016-04-17 11:07:52.0
Cannot retrieve definition for form bean null on action /savePlanB
配置文件:
<form-bean name="savePlanBForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="planAmount" type="java.lang.String" />
<form-property name="memo" type="java.lang.String" />
<form-property name="planDate" type="java.lang.String" />
<form-property name="storage" type="java.lang.String" />
<form-property name="operator" type="java.lang.String" />
<form-property name="documentNo" type="java.lang.String" />
<form-property name="factory" type="java.lang.String" />
</form-bean>

<!-- @3.采购计划 -->
<action path="/expPlanB" 
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="success" path="/equipment/displayExpPlan.jsp" />
</action>

<!-- 消耗品生成采购计划 -->
<action
path="/savePlanB" attribute="savePlanBForm" name="savePlanBForm"  
parameter="operate" scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="success" path="/equipment/LexpPlanB.jsp" />
</action>

页面部分

<html>
<head>
<title>加中科技医院信息系统</title>
<link href="<%=path%>/inc/style.css" rel="stylesheet">
<script language="javascript" src="<%=path%>/inc/select_date.js"
charset="utf-8"></script>
<script language="javascript" type="text/javascript" charset="utf-8"
src="<%=path%>/inc/ajax.js"></script>
<script>
  function check(){
  if(document.all.documentNo.value==""){
  alert("采购单号不能为空!");
  document.all.documentNo.select();
  document.all.documentNo.focus();
  return false;
  }
  if(document.all.factory.value==""){
  alert("供货方不能为空!");
  document.all.factory.focus();
  return false;
  }
  if(document.all.storage.value==""){
  alert("库存管理单位不能为空!");
  document.all.storage.focus();
  return false;
  }
  if(document.all.planDate.value==""){ 
  alert("计划采购日期不能为空!");
  return false;
  }
  document.savePlanBForm.submit();
  }  
  function clear(){
  var info='<%=info%>';
if(info!='null'){
alert(info);
}
cument.all.documentNo.value="<%=nextDoumentNo%>" ;
  document.all.factory.value="";
  document.all.storage.value="";
  document.all.planDate.value="";
  document.all.planAmount.value="";
  document.all.memo.value="";
  }
  </script>
</head>
<body onload="clear()" oncontextmenu="window.event.returnValue=false">
<table align="center" border="0" cellspacing="1" cellpadding="0"
class="tableborder" width="95%">
<tr>
<td height="30px" align="left" class="row" colspan="8">
  相关解决方案