`
wangrl
  • 浏览: 149107 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

struts2标签判断集合中是否有值

 
阅读更多

1,Action中:

cinemaList是一个影院集合。在Action中的cinemaList()方法中用 ActionContext.getContext().get("request").put("cinemaList", cinemaList),进行传递搜索结果;

2,jsp页面中:
<s:if test="#request.list == null || #request.list.size() == 0">
<div class="searchTooltip" id="searcheTool">抱歉,没有找到与此搜索条件相关的结果,请改用其他条件重新搜索。</div>
</s:if>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics