【发布时间】:2016-06-23 06:39:57
【问题描述】:
我需要在 Primefaces 日历上有条件地更改标签。我有以下代码
<p:calendar value="#{requestMBean.requestTO.startDate}" id="startDate"
label="#{requestMBean.requestTO.requestType eq 'SINGLEDAY'}?#{msg['wfmt.label.request.fromDate']}:#{msg['wfmt.label.request.visitingDate']}}"
pattern="dd.MM.yyyy"/>
当验证失败时,我希望只看到一个标签。但我得到 "请输入:true?fromDate:visitingDate" 。
如何有条件地只渲染一个标签?
【问题讨论】:
-
您的 el 不正确。 #{requestMBean.requestTO.requestType eq 'SINGLEDAY'}?#{msg['wfmt.label.request.fromDate']}:#{msg['wfmt.label.request.visitingDate']}} 像#{健康)状况 ?真:假}
-
我应该如何改变它?
标签: jsf primefaces