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

来源:互联网 发布:开源 学校网站 php 编辑:程序博客网 时间:2024/05/16 17:21
 

出现次错误,本人归集有:

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

 
原创粉丝点击