亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

關(guān)于foreach循環(huán)中遇到的問(wèn)題小結(jié)

 更新時(shí)間:2017年05月08日 08:49:43   作者:蘇書(shū)——小米  
這篇文章主要介紹了關(guān)于foreach循環(huán)中遇到的問(wèn)題總結(jié),非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下

1.列表頁(yè)面用"foreach循環(huán)"的時(shí)候數(shù)據(jù)沒(méi)有顯示,此時(shí)需要檢查你對(duì)象模型中屬性的首字母是否大寫(xiě),切記不能大寫(xiě)(本人在做一個(gè)項(xiàng)目的時(shí)候,對(duì)象模型是別人建立的,屬性首字母大寫(xiě)了,導(dǎo)致最后列表頁(yè)面數(shù)據(jù)不顯示,后來(lái)一問(wèn)老師,說(shuō)改為小寫(xiě),瞬間好了)。

2.數(shù)據(jù)存儲(chǔ)不到表里:在映射文件中沒(méi)有指定數(shù)據(jù)表列名的時(shí)候,數(shù)據(jù)表列名必須和屬性名相同(應(yīng)用于hibername操作數(shù)據(jù)庫(kù)中)。

3.用foreach的時(shí)候,從其他頁(yè)面跳到本頁(yè)面數(shù)據(jù)內(nèi)容不顯示,此時(shí)在其他頁(yè)面中必須把跳轉(zhuǎn)到本頁(yè)面的路徑改為瀏覽器中的訪問(wèn)路徑。

<table class="table_style">
              <thead>
                <tr>
                  <th>
                      <input id="all" type="checkbox" onclick="selectAll();" value="checkbox"> 
                    <label>全選 </label>
                  </th>
                  <th>樣本編號(hào)</th>
                  <th>被檢者姓名</th>
                  <th>被檢者ID</th>
                  <th>醫(yī)院名稱</th>
                  <th>樣本類型</th>
                  <th>手機(jī)</th>
                  <th>創(chuàng)建時(shí)間</th>
                </tr>
              </thead>
              <c:forEach var="hello" items="${key}" step="1" >
                <tr>
                  <td>
                     <input type="checkbox"  value="${hello.iD}" name="checkbox">
                  </td>
                  <td>
                    <a href="javascript:void(0)" rel="external nofollow" >${hello.sampleNo}</a>
                  </td>
                  <td>${hello.name}</td>
                  <td>${hello.pId}</td>
                  <td>${hello.hospitalName}</td>
                  <td>${hello.sampleType}</td>
                  <td>${hello.cellPhone}</td>
                  <td>${hello.createTime}</td>
                </tr> 
              </c:forEach>  
            </table>

相關(guān)文章

最新評(píng)論