JSP页面中的ONGL表达式判断不准确的问题
<li>
<span class="online_docDate_span">周二</span>
<div class="online_docDate_div">
<s:iterator id="m" value="tueExpertSet">
<mytags:article type='getExpertBookNum' deptId='${m.id}' date='${tue}' excepts='front' />
<div class="online_docDate_div_span">
<a class="wjf" href="#"><mytags:format size="4" value="${m.name}" />
<s:if test="(setting.bookNum - getExpertBookNum) lte 0"><strong><span style="color:#0856a5">[满]</span></strong></s:if><s:else>[${setting.bookNum-getExpertBookNum}]</s:else>
<span style="display:none"><s:date name="tue" format="yyyy-MM-dd" /></span><p style="display:none" >${m.id}</p></a>
<div class="doc_box png">
<div class="doc_box_top">
<div class="doc_box_img"><img src="${m.picture}"/></div>
<div class="doc_box_content">
<div class="doc_box_content_name">
<span><strong>姓名:</strong>${m.name}</span>
<span><strong>科室:</strong>${m.department.name}</span>
<span><strong>资质:</strong>${m.level}</span>
<span><strong>荣誉:</strong>${m.glory}</span>
</div>
<div class="doc_box_content_text">
<strong>医生简介:</strong><mytags:format size="20" value="${m.introduce}" /><a href="/${type}/expertView/${art.url}.xhtml">查看详情>></a>
</div>
<div class="doc_box_content_peo"><strong>今天预约余额:</strong>
<s:if test="(setting.bookNum - getExpertBookNum) lte 0">
<span style="color:red">预约已满,请选择其他时间</span>
</s:if>
<s:else>
<span>${setting.bookNum-getExpertBookNum}</span>人
</s:else>
</div>
</div>
</div>
<div class="doc_box_middle">温馨提示:要预约我请点击我的姓名即可选择哦!</div>
<div class="doc_box_bottom png"></div>
</div>
</div>
</s:iterator>
</div>
</li>
上面代码中<s:if test="(setting.bookNum - getExpertBookNum) lte 0"> ,当(setting.bookNum - getExpertBookNum) = 0的时候,能正确判断,换其他数字的时候就出错 jsp
[解决办法]
用el表达式和jstl的啊。。。
[解决办法]
(setting.bookNum - getExpertBookNum) 这里取到的值应该是string类型。