111
我一直在試圖評估如果這個數組列表爲空或沒有,但這些都沒有,甚至編譯:評估,如果列表爲空JSTL
<c:if test="${myObject.featuresList.size == 0 }">
<c:if test="${myObject.featuresList.length == 0 }">
<c:if test="${myObject.featuresList.size() == 0 }">
<c:if test="${myObject.featuresList.length() == 0 }">
<c:if test="${myObject.featuresList.empty}">
<c:if test="${myObject.featuresList.empty()}">
<c:if test="${myObject.featuresList.isEmpty}">
如何評估,如果一個ArrayList是空的?
我不知道我更討厭什麼,jstl,我對它的知識缺乏,或者我該死的應用程序服務器需要幾年的時間來重新加載最簡單的jsp更改。感謝bobince。我應該在這之前問過這個問題。你碰巧有我的參考資料嗎? – OscarRyz 2009-09-23 02:35:18
請參閱:http://ndpsoftware.com/JSPXMLCheatSheet.html – RHSeeger 2009-09-23 04:14:04
雖然有記錄顯示空操作符在v2.0之前的JSTL中的集合集合實現方面表現不佳 – casey 2010-08-19 20:28:14