2012-10-22 44 views

回答

0

的RichFaces提供了一個名爲豐富的另一種組分: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> 
1

使用標籤hideEvent="none"

<rich:toolTip name="tooltipTest" id="tooltipTest" hideEvent="none"> 
    <a4j:commandButton value="Close" onclick="#{rich:component('tooltipTest')}.hide(); return false;" /> 
</rich:toolTip>