我有一个关于 rich:toolTip 组件的问题。我有以下 jsf 代码:
<rich:toolTip followMouse="true" >
<h:outputText value="#{messages.dto.Station}" escape="false" converter="bbCodeConverter" />
</rich:toolTip>
这个工具提示工作得很好,但如果 messages.dto.Station 也为空,它将签署一个空的工具提示。如果 messages.dto.Station 为空,我该如何解决这个问题,工具提示不可见?
谢谢你帮助我!
格雷兹 马尔维夫
最佳答案
<rich:toolTip followMouse="true"
rendered="#{messages.dto.Station !=null or messages.dto.Station !=''}" >
<h:outputText value="#{messages.dto.Station}"
escape="false" converter="bbCodeConverter"/>
</rich:toolTip>
使用渲染属性将帮助您仅在 #{messages.dto.Station} 不为空时显示 rich faces doc link
关于java - 如何使 JSF 中的 Rich ToolTip 可见或不可见?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19295883/