当前位置: 代码迷 >> Java Web开发 >> struts tag 怎么对list对象的属性值进行条件判断
  详细解决方案

struts tag 怎么对list对象的属性值进行条件判断

热度:459   发布时间:2016-04-17 11:13:55.0
struts tag 如何对list对象的属性值进行条件判断
<s:iterator value="carsaveinfolist" id="car">
<s:if test="(#carpic.islahuo == 'on') || (#carpic.ischaochang == 'on')">
--+<s:property value="#car.carno"/>+--
--+<s:property value="#car.islahuo"/>+-----
--+<s:property value="#car.ischaochang"/>+<br/>
</s:if>
</s:iterator>

没有反映

------解决方案--------------------
="(#carpic.islahuo == 'on') 是不是 有这个属性哟 没见过喃 LZ 换中方式 试一试
你要判断 什么条件?
------解决方案--------------------
<s:if test="#carpic.islahuo == %{on}">
试一下 我也不知道行不行 或者是 <s:if test="#carpic.islahuo == %{'on'}">

------解决方案--------------------
<s:if test="#carpic.islahuo == on">
挨个试试吧 哈哈
  相关解决方案