首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

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

2012-01-19 
struts tag 如何对list对象的属性值进行条件判断s:iterator valuecarsaveinfolist idcars:if tes

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">
挨个试试吧 哈哈

热点排行