Description
Renders a popup which displays on a mouse event.
Screen Shot
API
component-family |
javax.faces.Panel |
renderer-type |
org.apache.myfaces.Popup |
component-class |
org.apache.myfaces.custom.popup.HtmlPopup |
renderer-class |
org.apache.myfaces.custom.popup.HtmlPopupRenderer |
tag-class |
org.apache.myfaces.custom.popup.HtmlPopupTag |
Links to javadoc and tlddoc
http://myfaces.apache.org/tomahawk/popup.html
Usage
<t:popup styleClass="CSSClass" closePopupOnExitingElement="{true|false}" closePopupOnExitingPopup="{true|false}" displayAtDistanceX="int" displayAtDistanceY="int"> <h:outputText value="String"/> <f:facet name="popup"> <h:panelGroup> <h:panelGrid columns="int"> <h:outputText value="String"/> </h:panelGrid> </h:panelGroup> </f:facet> </t:popup>
Syntax
<t:popup [tomahawk_popup_attributes] [ui_panel_attributes] [html_universal_attributes] [html_event_handler_attributes] [user_role_attributes] > ... inner tags ... </t:popup>
Instructions
With popup component you can assign a hint popup messages to other components by bringing cursor over component (if you know java script, with occurrence of mouse onmouseover
and Onmouseout
events). Popup can display simple text or contain other tags to display more sophisticated contents. When you want to assign a hint popup to a component you should surrender the target tag(s) within a popup tag with a sibling facet tag with attribute name="popup"
the facet should contain whatever you want to display in popup. It can be a simple JSF compoent (which can contain other components) like first example; or if you want to display more sophisticated popup you should put them inside a panel as you can see in second example.
Attributes
name |
required |
description |
displayAtDistanceX |
false |
Pop the panel up in horizontal distance of x pixels from event. |
displayAtDistanceY |
false |
Pop the panel up in vertical distance of y pixels from event. |
closePopupOnExitingElement |
false |
Close the popup when the triggering element is left. |
closePopupOnExitingPopup |
false |
Close the popup when the popup itself is left. |
Configuration
Don't need any extra configuration.
Notes and Known issues
Examples
Hint Popup without panel
<t:popup> <h:outputText value="text1"/> <f:facet name="popup"> <h:outputLink value= "http://myfaces.apache.org/tomahawk" > <h:outputText value="My popup message"/> </h:outputLink> </f:facet> </t:popup>
Hint Popup with a panel
<t:popup styleClass= "popup" > <h:outputText value= "This is the message1"/> <h:outputText value= "This is the message2"/> <f:facet name= "popup" > <h:panelGroup> <h:panelGrid columns= "1" > <h:outputText value= "Popup text 1"/> <h:outputLink value= "http://myfaces.apache.org" > <h:outputText value= "MyFaces homepage "/> </h:outputLink> <h:outputText value= "Popup text 2"/> <h:outputLink value= "http://myfaces.apache.org/tomahawk" > <h:outputText value= "Tomahawk MyFaces homepage "/> </h:outputLink> </h:panelGrid> </h:panelGroup> </f:facet> </t:popup>
FAQ
Post your (or potential) questions here.
Additional Information
none
– ArashRajaeeyan <<DateTime(2006-11-04T13:43:30Z)>>