是否有一种简单的方法可以向rich:toolTip添加“关闭按钮”(以便在点击此按钮之前它仍然可见)?
非常感谢
答案 0 :(得分:1)
使用代码hideEvent="none"
<rich:toolTip name="tooltipTest" id="tooltipTest" hideEvent="none">
<a4j:commandButton value="Close" onclick="#{rich:component('tooltipTest')}.hide(); return false;" />
</rich:toolTip>
答案 1 :(得分:0)
richfaces提供了另一个名为rich:popupPanel的组件来实现这一点。
<h:panelGrid onmouseover="#{rich:component('popup')}.show()">
<h:outputText value="Open popup" />
</h:panelGrid>
<rich:popupPanel id="popup" modal="false" autosized="true" resizeable="false">
<f:facet name="controls">
<h:outputLink value="#"
onclick="#{rich:component('popup')}.hide(); return false;">X</h:outputLink>
</f:facet>
...
</rich:popupPanel>