zoukankan      html  css  js  c++  java
  • EL表达式得不到后台传过来的值

    两种jsp获得action传过来的值

    第一种:

    <s:iterator value="#pagination.datas" var="supplier" status="s">
      <tr>
        <%-- ${pagination.datas}得不到值 --%>

        <%-- ${supplier}得不到值 --%>
        <%-- <s:property value="#supplier"/> --%>
        <td><input type="checkbox" name="IDCheck" value="<s:property value="#supplier.supplierId"/>" class="acb" /></td>
        <td><s:property value="#supplier.supplierName"/></td>
        <td><s:property value="#supplier.abbreviation"/></td>
        <td><s:property value="#supplier.legalPerson"/></td>
        <td><s:property value="#supplier.address"/></td>
        <td><s:property value="#supplier.telephone"/></td>
        <td><s:property value="#supplier.credibility"/></td>
        <td><a href="archiv/supplier_edit?supplierId=<s:property value="#supplier.supplierId"/>" id="edit">编辑</a>
        <a href="javascript:del('<s:property value="#supplier.supplierId"/>','${pagination.pageIndex}');">删除</a>
        <a href="archiv/supplier_detail?supplierId=<s:property value="#supplier.supplierId"/>" id="detail">详情</a>
        </td>
      </tr>
    </s:iterator>

    原因:红色的那块,action中的supplier 再有modelDriven的基础上还加了getter和setter方法。删掉就可以使用方法二了

    方法二: 

    <s:iterator value="#pagination.datas" var="supplier" status="s">
      <tr>
        <td><input type="checkbox" name="IDCheck" value="${supplier.supplierId}" class="acb" /></td>
        <td>${supplier.supplierName}</td>
        <td>${supplier.abbreviation}</td>
        <td>${supplier.legalPerson}</td>
        <td>${supplier.address}</td>
        <td>${supplier.telephone}</td>
        <td>${supplier.credibility}</td>
        <td><a href="archiv/supplier_edit?supplierId=${supplier.supplierId}" id="edit">编辑</a>
          <a href="javascript:del('${supplier.supplierId}','${pagination.pageIndex}');">删除</a>
          <a href="archiv/supplier_detail?supplierId=${supplier.supplierId}" id="detail">详情</a>
        </td>
      </tr>
    </s:iterator>

  • 相关阅读:
    Linux openkvm disk expansion
    FineReport 交叉报表
    Linux crontab 查看所有用户的crontab任务
    Nginx 配置操作注意事项
    MYSQL Packet for query is too large (12054240 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.
    Navicat Premium 12 mysql show error: connection is being used
    SpringMVC RequestLoggingFilter log to file
    JEECG MiniDao优劣
    网站安全统一监测平台(WebPecker)
    Spring @Transactional at interface
  • 原文地址:https://www.cnblogs.com/haimishasha/p/6224302.html
Copyright © 2011-2022 走看看