【发布时间】:2013-10-08 11:51:03
【问题描述】:
我无法很好地解释这一点 - 它需要查看: Video screencast
请解释一下会发生什么?
下一个代码工作并返回 true 或 false 但是当我把它放到 render="" 这不起作用。
#{!empty detailsBean.goods.pictures}
rendered="true" 渲染="false" 渲染="#{true}" - 工作
<p:commandButton id="btn_details" value="#{msg.btn_details}" oncomplete="PF('dlg-detailed').show()" update=":dlg-detailed-id">
<f:setPropertyActionListener target="#{detailsBean.goods}" value="#{goods}" />
<f:param name="id" value="#{goods.id}"/>
</p:commandButton>
对话框 - 我尝试使用条件渲染文本。
<p:dialog id="dlg-detailed-id" widgetVar="dlg-detailed" header="#{msg.btn_details}" dynamic="true" modal="true" draggable="false" width="800" height="600">
<h:outputText value="Some Text For Rendering" rendered="#{!empty detailsBean.goods.pictures}" />
</p:dialog>
Mojarra 2.1.7-jbossorg-1
JBoss AS 7.1.1
我为我的英语错误道歉
【问题讨论】:
-
无法理解问题:(
-
为什么当我将 render="#{!empty detailsBean.goods.pictures}" 放到
标签: jsf-2 primefaces