81,094
社区成员
发帖
与我相关
我的任务
分享
jsp页面中输入数量:
<input type="text"
name="productItemList[${t.index}].sum" size="8" />
Action中:
private List<ProductItem> productItemList;
ProductItem类中有Long 类型的sum。
invalid.fieldvalue.productItemList[0].sum=\u7528\u6237\u53F7\u5FC5\u987B\u662F\u6574\u6570
invalid.fieldvalue.productItemList[1].sum=\u7528\u6237\u53F7\u5FC5\u987B\u662F\u6574\u6570
提示:
•Invalid field value for field "productItemList[1].sum".
<table>
<tr class="head">
<td width="100px">
ID
</td>
<td align="center">
产品名称
</td>
<td>
产品购买形式
</td>
<td align="center">
单价
</td>
<td>
数量
</td>
</tr>
<s:iterator value="productItemList" var="product" status="t">
<tr>
<td width="20">
<input type="hidden"
name="productItemList[${t.index}].productId"
value="${product.id}" />
<input type="checkbox" name="productItemList[${t.index}].check"
value="${product.id}"/>
${product.id}
</td>
<td width="150">
<input type="hidden"
name="productItemList[${t.index}].name"
value="${product.name}" />
${product.name}
</td>
<td align="center" width="100">
<select name="productItemList[${t.index}].buyType" id="p${t.index}"
onchange="test5(${product.id},p${t.index})">
<option value="1" selected="selected">
周期
</option>
<option value="0">
定期
</option>
</select>
</td>
<td width="50">
<input type="hidden" name="productItemList[${t.index}].price" value="${product.price}" width="20"/>${product.price}/月
</td>
<td width="10">
<s:set name="stDiv" value="#product.id"></s:set>
<div id="tp_${stDiv}" style="display: none">
<input type="text"
name="productItemList[${t.index}].sum" size="8" />
</div>
</td>
</tr>
</s:iterator>
</table>
<div style="color:red">
<s:fielderror></s:fielderror>
</div>
public class JbpmHardwareApplicationAction extends ActionSupport{
// 硬件申请
private HardwareapllicationVo hardwareApplicationVo;
}
public class HardwareapllicationVo implements java.io.Serializable {
// 主健标识
private String id;
// 流水号
private String hardwareapllicationNum;
// 申请人
private UserVo applyer;
// 是否存档
private Integer isRemark;
// 备注
private String remark;
// 详细单
private List<HardwareapplicationDetailVo> detailVoList;
}
public class HardwareapplicationDetailVo implements java.io.Serializable {
// 主健标识
private Integer id;
// 名称
private String name;
// 数量
private Integer account;
// 用途
private String use;
// 单位
private String unit;
}