jsp el表达式解析嵌套集合对象(多层list,map嵌套),基于struts

action中对象

1 private List<PerforSalaryBase> cityBaseDetails

bean对象

 1 public class PerforSalaryBase extends AbstractPersistencePaymentObject {
 2 
 3     private static final long serialVersionUID = -134052330509224847L;
 4 
 5     private Long orgUnitId = null;
 6     
 7     private String payStdItem = null;
 8     
 9     private String perforLevel = null;
10     
11     private BigDecimal payStandard = null;
12     
13     private String remark = null;
14 
15     private Map<String, String> levelMap = new HashMap<String, String>();
16     
17 }

jsp页面解析

 1 <c:forEach items="${placesType_base}" var="placeType" varStatus="rowStatus">    <!--set集合-->
 2     <tr>
 3         <td width="100">
 4             ${placeType.codeName}
 5             <input type="hidden" name="cityBaseDetails[${rowStatus.index}].orgUnitId" value="${perforSalaryForm.queryParameterMap.countyId}">
 6         <input type="hidden" name="cityBaseDetails[${rowStatus.index}].payStdItem" value="${placeType.codeValue}">
 7         <c:set var="rowIndex" value="${rowStatus.index}"></c:set>
 8         </td>
 9         <c:forEach items="${level_base}" var="level" varStatus="colStatus">
10         <td>
11             <c:set var="levelValue" value="${level.codeValue}"></c:set>
12             <input type="text" class="textfield11" name="cityBaseDetails[${rowStatus.index}].levelMap.${level.codeValue}" onKeyPress="onlyDigital(this);" onBlur="checkMoney(this);" value="<c:choose><c:when test="${null==perforSalaryForm.cityBaseDetails[rowIndex].levelMap[levelValue]}">${rowIndex}.${levelValue}</c:when><c:otherwise><fmt:formatNumber type="number" pattern="0.00" value="${perforSalaryForm.cityBaseDetails[rowIndex].levelMap[levelValue]}"/></c:otherwise></c:choose>"  />
13         </td>
14         </c:forEach>
15     </tr>
16 </c:forEach>

 

 

转载于:https://www.cnblogs.com/yuanhui69/p/3491907.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值