Reputation: 551
Is there an easy way for adding a "close button" to a rich:toolTip (so that it will remain visible until one clicks such button)?
Thanks a lot
Upvotes: 0
Views: 857
Reputation: 81
use tag hideEvent="none"
<rich:toolTip name="tooltipTest" id="tooltipTest" hideEvent="none">
<a4j:commandButton value="Close" onclick="#{rich:component('tooltipTest')}.hide(); return false;" />
</rich:toolTip>
Upvotes: 1
Reputation: 551
richfaces provides a further component called rich:popupPanel to achieve this.
<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>
Upvotes: 0