javax.el.PropertyNotFoundException: Property 'key' not found on type java.lang.String

來源:互聯網
上載者:User
 

出現次錯誤,本人歸集有:

1、確實沒有該欄位

2、用了集合儲存,而直接用集合調用,即:(集合.欄位名)

3、用標籤時,沒寫標籤,直接上集合名,調用

以上幾種情況可能是可能出現的比較普遍的情況,也是出現這個錯誤最可能的情況;

不過我本人遇到的這種錯誤是另外一種情況,之前一直是其他方面的問題,最後才發現是我用到了多層的標籤遍曆,

使用多層標籤遍曆本無錯,錯就錯在取名字不注意:

<s:iterator value="othersVo.buttonList" var="item" status="status">
       <s:if test="#status.count%8 ==0">
        <span> <input class="ui-custom-process-check" type="checkbox" value="${item.key }"
          id="${item.key }" />${item.name}<input type="hidden"
          value="${item.selected }" /> <br /> </span>
       </s:if>
       <s:else>
        <span> <input class="ui-custom-process-check" type="checkbox" value="${item.key }"
          id="${item.key }" />${item.name}<input type="hidden"
          value="${item.selected }" /> <br />
         <c:if test='${item.key eq "processBack"}'>
          <div id="selected" class="ui-custom-process-div" name="selected">
           <table width="100%" border="0" cellspacing="0" class="grid_biserial">
            <tr>
             <td>
              前置節點
             </td>
             <td>
          
              &nbsp;
             </td>
             <td>
              回退節點
             </td>
            </tr>
            <tr>
             <td width="45%" >
              <select name="LeadNode" ondblclick="moveOver();" size="10"
               multiple="multiple" style="width: 100%;">
               <c:forEach items="${designVo.forwardNodes}" var="item1"
                varStatus="status">
                <option>
                 ${item1}
                </option>
               </c:forEach>
              </select>
              &nbsp;
             </td>
             <td style="text-align: center;">
              <p style="margin-bottom: 5px; margin-top: -20px;">
               <input type="button"
                onclick="moveToRight(this.form.LeadNode,this.form.backNode);"
                class="buttonPro" style='width:30px'  value="&gt;" />
              </p>
              <p style="margin-bottom: 5px;">
               <input type="button"
                onclick="moveAll(this.form.LeadNode,this.form.backNode);"
                class="buttonPro" style='width:30px'
                value="&gt;&gt;" />
              </p>
              <p style="margin-bottom: 5px;">
               <input type="button" onclick="removeMe();"
                class="buttonPro" style='width:30px'   value="&lt;" />
              </p>
              <p>
               <input type="button" onclick="reMoveAll('0');"
                class="buttonPro" style='width:30px'  value="&lt;&lt;" />
              </p>
      
             </td>
             <td width="45%">
              <select name="backNode" id="backNode"
               ondblclick="removechild(this)" size="10" multiple="multiple"
               style="width: 100%">
               <s:iterator value="designVo.backNodes" status="status"
                var="item"> 以上標紅的就是出錯的根源,如果都叫item也會報錯:javax.el.PropertyNotFoundException: Property 'key' not found on type java.lang.String


 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.