关于Struts2标签,判断集合为空时不显示的问题。
<s:iterator value="listTestTotal" id="listTestTotal" status="a">
<s:if test="listTestTotal!=null">
<tr>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1"> <s:property value="#a.index+1"/></span> </div></td>
</tr>
</s:if>
<s:if test="listTestTotal==null||listTestTotal.isEmpty()">
您查询的记录为空
</s:if>
</s:iterator>
<s:iterator value="listTestTotal" id="listTestTotal" status="a">
<s:if test="listTestTotal!=null">
<tr>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1"> <s:property value="#a.index+1"/></span> </div></td>
</tr>
</s:if>
<s:else>您查询的记录为空</s:else>
</s:iterator>
<s:if test="listTestTotal==null
[其他解释]