【发布时间】:2014-08-11 06:30:51
【问题描述】:
我想在我的网页上添加一个条件来检查检索到的值是否为空或其他:
xhtml
<div id="topbarMsg" class="topbar-msg">
<c:if value="#{Bean.loginCustomer}" test = EMPTY>
<h:outputFormat id="welId" value="#{msg['label.welcome']} ">
</h:outputFormat>
<c:if test = NOT EMPTY>
<h:outputFormat id="welId" value="#{msg['label.welcomeUser']} ">
<f:param id="paramOneId" value="First Name" />
</div>
java 豆
private Customer loginCustomer;
public final Customer getLoginCustomer() {
return loginCustomer;
}
从上面的代码中,它将检查名字是否为空,并从那里调用正确的标签以在网页中打印,但似乎无法正常工作。有人吗???
【问题讨论】: