复选框的存储信息和回显

复选框的存储信息和回显


向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>  


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值