复选框的存储信息和回显
向jsp传递的controller信息
PrintData printData=new PrintData();
if(list.size()-yishenpi==1){//该流程已经到达财务出纳的地方
printData=normalreimbursementService.findPrintData(timestamp);
}
ActionContext.getContext().put("timestamp", printData.getTimestamp());
ActionContext.getContext().getValueStack().push(printData);
jsp页面信息:
<script type="text/javascript">
function printData(){
document.form.action="reinbursementAction_save.action";
document.form.submit();
}
</script>
<c:if test="${timestamp!=null}">
<form action="" name="form" id="form" method="post">
<table width="90%" border="0" cellpadding="0" cellspacing="1"
bgcolor="b5d6e6" >
<tr>
<td colspan="6">财务出纳确定以下工作是否完成</td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF">
<div align="center" class="STYLE1">
<div align="center">是否打印装订 </div>
</div></td>
<td height="25" bgcolor="#FFFFFF">
<div align="center" class="STYLE1">
<div align="center">
<input type="checkbox" name="printda" id="printda" value="1" <s:property value="%{printda==null?'':'checked'}" />></div>
<input type="hidden" name="timestamp" id="timestamp" value="${timestamp}">
</div></td>
<td height="25" bgcolor="#FFFFFF">
<div align="center" class="STYLE1">
<div align="center">是否现金或转账</div>
</div></td>
<td height="25" bgcolor="#FFFFFF">
<div align="center" class="STYLE1">
<div align="center"><input type="checkbox" name="money" id="money" value="2" <s:property value="%{money==null?'':'checked'}" />></div>
</div></td>
<td height="25" bgcolor="#FFFFFF">
<div align="center" class="STYLE1">
<div align="center">是否记账</div>
</div></td>
<td height="25" bgcolor="#FFFFFF">
<div align="center" class="STYLE1">
<div align="center"><input type="checkbox" name="account" id="account" value="3" <s:property value="%{account==null?'':'checked'}" />></div>
</div></td>
</tr>
<tr>
<s:if test="%{printda==null||money==null||account==null}">
<td bgcolor="#FFFFFF" colspan="6" align="center">
<input type="button" value="保存" οnclick="printData()" />
</td>
</s:if>
</tr>
</table>
</form>
</c:if>
复选框的存储信息和回显
最新推荐文章于 2021-07-02 12:10:59 发布