|
Oracle Fusion Middleware Java API Reference for Oracle ADF Faces 11g Release 1 (11.1.1) E10684-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
javax.faces.component.UIComponent
org.apache.myfaces.trinidad.component.UIXComponent
org.apache.myfaces.trinidad.component.UIXComponentBase
oracle.adf.view.rich.component.UIXPopup
oracle.adf.view.rich.component.rich.RichPopup
public class RichPopup
The popup component is an invisible container control whose contents will be used in popup windows, such as context menus, note windows, dialogs and popup selectors. These types of "popup windows" are within the same browser window and using layers of HTML to simulate an external browser window.
The inline popup should not be confused with the dialog framework. See the command family of components for more information on the dialog framework.
There are several types of inline popups that provide different user experiences. The following matrix compares the properties of the inline popups.
Type | Demarcation | Display Properties | Behaviors | Common Use Cases |
---|---|---|---|---|
Inline Selector |
The inline selector type of popup is the default type when one of the other qualifying components ( <af:popup id="inlineSelector"> Hello World! </af:popup> |
This type of popup has rounded corners in the rich skin and square corners in the medium and simple skins. |
An inline selector type of popup should be aligned to another element. If alignment properties are not specified, the default alignment will be to the top-start of the page. When shown, this type of popup will steal focus for the primary window and set focus to the first focusable element within its content. The inline selector type of popup will auto dismiss when focus leaves the content of the popup. Activating the popup's launch source when the inline selector is shown will dismiss this type of popup. When the popup is not visible, activating the launch source will cause the popup to be shown. An inline selector will automatically dismiss when its alignment element is clipped and no longer visible in the browser window. |
The inline selector is good for displaying arbitrary content. Because of its dismissal properties, it should not be used with other input components. It is best used to display read-only content. |
Note Window |
The note window type of popup is defined using the popup and <af:popup id="noteWindow"> <af:noteWindow> Hello World! </af:noteWindow> </af:popup> |
The note window popup has square corners with a cone pointing to the alignment component. |
The note window popup must be aligned to another element or to a mouse position. A default alignment is provided when using the The note window popup will not steal focus when shown. Focus will remain on the launch source. A note window will automatically dismiss when focus is made outside of the note window's content or from the launch source component. A note window will auto dismiss when its aligning element is clipped and no longer visible. |
Note windows are designed for displaying read-only information that is associated with another component. The note window cone will point to the associated aligning component. Note windows are not intended to hold editable components. |
Dialogs |
There are two dialog components, <af:popup id="dialog"> <af:dialog title="test"> <af:inputText text="Say" value="Hello World!"/> </af:dialog> </af:popup> <af:popup id="panelWindow"> <af:panelWindow title="test"> <af:inputText text="Say" value="Hello World!"/> </af:panelWindow> </af:popup> |
The dialogs components resemble a window. They are framed with a title bar and close icon. They have rounded corners in the rich skin and square corners in the medium and simple skins. Both components can be displayed modal or modeless. When displayed as modal, a glass pane covers the primary window and the dialog becomes the new primary window. The |
Dialogs can align to a component but generally are used with default alignment. The default alignment of dialogs is the center of the browser window. A dialog can be repositioned on the page using drag-and-drop. The title bar is the gripper for the drag source. Dialogs will be auto positioned to stay within the browser window when the browser is resized as long as the browser window is larger than the dialog. Dialogs will not auto dismiss like other types of popups. Dialogs will not dismiss when loosing focus. They will not auto dismiss when cropped like other types of popups. Dialogs can be closed using the close icon, predefined button configurations ( When a dialog is opened, it will steal focus from the primary window. The ctrl+alt+w key combination can be used to cycle through open dialog instances above the primary window. A modal dialog is defined as a primary window. When a dialog loose focus, its appearance changes to an inactive state. |
Dialogs are designed for data entry. They do not have implicit dismissal properties like the other types of popups making them ideal additional data collection flows. |
Menus |
Popup menus are provided using a combination of the <af:popup id="popupMenu"> <af:menu> <af:commandMenuItem text="Item 1"/> <af:commandMenuItem text="Item 2"/> <af:commandMenuItem text="Item 3"/> </af:menu> </af:popup> |
Popup menus will have square corners in all skins and take on the display properties of menus. |
Popup menus are commonly used for context menus but don't necessary have to be launched using the Popup menus will auto dismiss after a child command menu item has been selector or when focus is taken from the menu. Popup menus will steal focus from the primary window when opened. |
Popup menus are commonly used as context menus to provide context sensitive navigation. |
The popup component is a container that contains a page fragment. The page fragment is hidden by default and requires a client action or event in order to be shown. The popup conditionally determines when markup is sent to the client by its contentDelivery
property. The default content delivery is lazy
. This means the content of the popup is not delivered to the client until shown the first time.
The options are:
lazy
-- the default strategy described above. The content isn't loaded until you show the popup once, but then is cached.
immediate
-- load the content onto the page immediately, so it displays as rapidly as possible. Use this for popups that are certain to be used by all users every time they use this page.
lazyUncached
-- the content isn't loaded until you show the popup, and then is re-fetched every subsequent time you show the popup. Use this strategy if the popup shows data that can become stale.
The popup's content delivery options are often misinterpreted. The content delivery defines when the markup is delivered to the client browser. The popup component doesn't try to intelligently manage a sub view of components like the af:region
component. It assumes the sub component tree that represents its content has already been built.
By default, an inline popup will auto-dismiss when the markup that defines it has been replaced. This behavior is controlled by the autoCancel
property. There are several scenarios that might cause implicit auto-dismissal of inline popups.
af:showDetailItem
in a af:panelTabbed
is an example.For these scenarios, if the autoCancel
property is set to enabled
, the popup in question will not restore visibility. It will implicitly auto-dismiss.
However, if the autoCancel
property is disabled
, the popup will restore visibility instead of auto-dismissing. The popup must be explicitly dismissed by one of the expected/assumed dismissal behaviors for the type of popup or programmatically handled. See the next section on displaying and hiding popups.
The inline popup is client centric meaning that its states and behaviors are based on client events and actions. The client popup component has operations for showing and dismissing the popup. Beside JavaScript extension points, there are declarative and assumed behaviors.
The best way to show a popup is with the af:showPopupBehavior
tag. Simply add this tag to a command component anywhere on your page, and activating that command will show a popup behavior tag. When used to open various types of popups, inline selector, note window, menu, dialog and panelWindow, you are sure to get many of the built in - assumed behaviors for free without having to write JavaScript.
For example, the af:showPopupBehavior
tag adds a delay when showing a popup using the mouseHover
trigger type and added logic to track from what launch source a popup request was made to determine if the popup is shown in the correct context. Many of the auto dismissal options for the various types of popup's are dependent on using this special behavior tag.
<af:outputText id="text" value="hover over this text with the mouse to launch a note window"> <af:showPopupBehavior popupid="noteWindow" triggerType="mouseHover" alignid="text"/> </af:outputText>
Popups can be opened using JavaScript although using the af:showPopupBehavior
tag is best-practice. In order to open a popup in script, you need to know how to use the client framework API to find the popup and invoke the show method. The show method is passed a map of hints. The popup hints parameters communicate various behaviors such as alignment. Most of the hints are considered private and only a few are exposed as public. The af:showPopupBehavior
tag uses the private hits exposing features not possible with the programmatic method of showing a popup.
There are two classifications of popup dismissals, hide and cancel. When a popup is closed by auto-dismissal, it is canceled. If it is closed by an affirmative condition, it is hidden. Both types of dismissals will result in raising a popup closed event. Canceling a popup will raise a client popup canceled event that has an associated server-side counter part.
The popup hints that are considered public are found on the AdfRichPopup
client component and are used for alignment positioning. There are two map keys that define where a popup is shown on the page. The first key, AdfRichPopup.HINT_ALIGN_ID
is used to specify the client component's id that the popup should align to. Unlike the popupId attribute of the af:showPopupBehavior
tag that uses relative positioning from the associated launcher component, this must be the fully qualified client id of the popup component. The second parameter, AdfRichPopup.HINT_ALIGN
defines how the popup should align to the aligning component.
There are nine predefined align enumerations represented by constants:
AdfRichPopup.ALIGN_AFTER_START
: The popup appears underneath the element with the popup's upper-left corner aligned with the lower-left corner of the element. The left edges of the element and the popup are aligned.
AdfRichPopup.ALIGN_AFTER_END
: The popup appears underneath the element with the popup's upper-right corner aligned with the lower-right corner of the element. The right edges of the element and the popup are aligned.
AdfRichPopup.ALIGN_BEFORE_START
: The popup appears above the element with the popup's lower-left corner aligned with the upper-left corner of the element. The left edges of the element and the popup are aligned.
AdfRichPopup.ALIGN_BEFORE_END
: The popup appears above the element with the popup's lower-right corner aligned with the upper-right corner of the element. The right edges of the element and the popup are aligned.
AdfRichPopup.ALIGN_END_AFTER
: The popup appears to the right of the element with the popup's lower-left corner aligned with the lower-right corner of the element. The bottom edges of the element and the popup are aligned.
AdfRichPopup.ALIGN_END_BEFORE
: The popup appears to the right of the element with the popup's upper-left corner aligned with the upper-right corner of the element. The top edges of the element and the popup are aligned.
AdfRichPopup.ALIGN_START_AFTER
: The popup appears to the left of the element with the popup's lower-right corner aligned with the lower-left corner of the element. The bottom edges of the element and the popup are aligned.
AdfRichPopup.ALIGN_START_BEFORE
: The popup appears to the left of the element with the popup's upper-right corner aligned with the upper-left corner of the element. The top edges of the element and the popup are aligned.
AdfRichPopup.ALIGN_OVERLAP
: The popup appears over top of the element with the upper-left corners aligned.
The third popup hint doesn't have to do with positioning but rather the context that the popup fetch event is invoked. The AdfRichPopup.HINT_LAUNCH_ID
hint defines the component that launched the popup. The value should be set with the clientId of the launcher component. If the eventContext
property is set to "launcher", this popup hint is required in order for the popup fetch event to be fired from the context of the launcher component.
Following snippet of JSP and script demonstrates how to programmatically show and hide a popup:
... ... <f:facet name="metaContainer"> <f:verbatim> <script> function showPopup(event) { event.cancel(); var source = event.getSource(); var popupid="popup"; var popup = AdfPage.PAGE.findComponentByAbsoluteId(popupId); if (!popup.isPopupVisible()) { var hints = {}; hints[AdfRichPopup.HINT_LAUNCH_ID] = source.getClientId(); hints[AdfRichPopup.HINT_ALIGN_ID] = source.getClientId(); hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_AFTER_START; popup.show(hints); } } function hidePopup(event) { event.cancel(); var source = event.getSource(); var popupId = source.getProperty("popupId"); var isCanceled = source.getProperty("isCanceled"); var popup = AdfPage.PAGE.findComponentByAbsoluteId(popupId); if (popup.isPopupVisible()) { if (isCanceled) popup.cancel(); else popup.hide(); } } </script> </f:verbatim> </f:facet> ... ... <af:form> <af:popup id="popup"> Hello World! </af:popup> <af:outputText value="Show Popup"> <af:clientListener method="showPopup" type="mouseOver"/> </af:outputText> <br/><br/><br/><br/> <af:outputText value="Hide Popup"> <af:clientListener method="hidePopup" type="mouseOver"/> <af:clientAttribute name="popupId" value="popup"/> </af:outputText> <af:outputText value="Cancel Popup"> <af:clientListener method="hidePopup" type="mouseOver"/> <af:clientAttribute name="popupId" value="popup"/> <af:clientAttribute name="isCanceled" value="true"/> </af:outputText> </af:form> ... ...
Server-side listeners, such as action listeners, can show a popup. This might sound inconsistent with the description of the inline popup framework as being client centric but similar operations exist on the server-side popup component to show, hide and cancel a popup. One caveat to keep in mind is that the popup must be in the proper context when the server-side API is called. This is particularly important for a popup in a stamped component such as a table. The model must be position to the right row key in order for the client id to be properly encoded. The following code demonstrates how to open and close a popup server-side:
... ... <af:form> <af:popup id="popup" binding="#{testBean.popup}"> <af:panelWindow title="Test"> <af:commandButton text="Hide" partialSubmit="true" actionListener="#{testBean.hidePopupActionListener}"/> <af:commandButton text="Cancel" partialSubmit="true" actionListener="#{testBean.cancelPopupActionListener}"/> </af:panelWindow> </af:popup> <af:commandButton text="Show" partialSubmit="true" actionListener="#{testBean.showPopupActionListener}"/> </af:form> ... ... public void showPopupActionListener(ActionEvent event) { FacesContext context = FacesContext.getCurrentInstance(); UIComponent source = (UIComponent) event.getSource(); String alignId = source.getClientId(context); // get the popup component - see binding="#{testBean.popup}" in the tag source UIComponent popup = getPopup(); RichPopup.PopupHints hints = new RichPopup.PopupHints(); hints.add(RichPopup.PopupHints.HintTypes.HINT_ALIGN_ID, source) .add(RichPopup.PopupHints.HintTypes.HINT_LAUNCH_ID, source) .add(RichPopup.PopupHints.HintTypes.HINT_ALIGN, RichPopup.PopupHints.AlignTypes.ALIGN_AFTER_END); popup.show(hints); } public void hidePopupActionListener(ActionEvent event) { FacesContext context = FacesContext.getCurrentInstance(); // get the popup component - see binding="#{testBean.popup}" in the tag source UIComponent popup = getPopup(); popup.hide(); } public void cancelPopupActionListener(ActionEvent event) { FacesContext context = FacesContext.getCurrentInstance(); // get the popup component - see binding="#{testBean.popup}" in the tag source UIComponent popup = getPopup(); popup.cancel(); }
Besides the operations, the inline popup has several client events. Most of the client events do not have corresponding faces events or server-side listeners. However, the popupCanceled
event does provide a corresponding server-side event. These events can be exploited using the clientListener tag and custom JavaScript functions.
popupOpening
: A client only event that can be canceled. If this event is canceled in a client-side listener, the popup will not be shown.
popupOpened
: This event is fired after the popup becomes visible. This event could be used to create custom rules for overriding default focus within the popup.
popupCanceled
: The canceled event is fired when a popup is unexpectedly dismissed by auto-dismissal or by explicitly invoking the popup client component's cancel
method.
popupClosed
: The closed event is a client only event fired when the popup is hidden.
Not all inline popup's provide server-side counter parts for all client events. However, custom client event listeners can invoke JavaScript that raises a CustomEvent
that is handled by a af:serverListener
.
... ... <f:facet > <f:verbatim> <script> function popupClosedListener(event) { var source = event.getSource(); var popupId = source.getClientId(); var params = {}; params['popupId'] = popupId; var type = "serverPopupClosed"; var immediate = true; AdfCustomEvent.queue(source, type, params, immediate); } </script> </f:verbatim> </f:facet> <af:form> <af:popup id="popup"> <af:dialog title="Test"> <f:verbatim>Hello World</f:verbatim> </af:dialog> <af:clientListener method="popupClosedListener" type="popupClosed"/> <af:serverListener type="serverPopupClosed" method="#{testBean.serverPopupClosedListener}"/> </af:popup> <af:commandButton text="show"> <af:showPopupBehavior popupid="popup"/> </af:commandButton> </af:form> ... ... public void serverPopupClosedListener(ClientEvent event) { String popupId = (String) event.getParameters().get("popupId"); System.out.print("Popup Closed: " + popupId); }
The PopupFetchEvent
is one of two server-side popup events but doesn't have a corresponding client event. The popup fetch event is invoked during content delivery. This means that the event will only queue for popups that have a contentDelivery
type of lazy
or lazyUncached
. Another caveat is that the event will only work when the launch id is set. This is automatically handled by the af:showPopupBehavior but must be provided as a popup hint if programmatically shown.
The popup has two properties and a listener that work with this PopupFetchEvent
event. The eventContext
property is used to establish the currency that the popupFetchListener
is invoked in. This is a similar concept seen with stamped components such as the af:table
component. In fact, this property allows creating a shared popup instance launched from a component within a af:table
using the af:showPopupBehavior
tag. The launcher component is placed in context and an instance made available using the popup's launcherVar
property.
Besides the popupFetchListener
, the af:setPropertyListener
can be used to move a value from one place to another when the PopupFetchEvent
is queued.
The following example demonstrates using the popup fetch event:
<af:popup id="noteWindow" contentDelivery="lazyUncached" eventContext="launcher" launcerVar="source"> <af:noteWindow> <af:outputText value="#{testBean.fullName}"/> </af:noteWindow> <af:setPropertyListener from="#{source.attributes.fullName}" to="#{testBean.fullName}" type="popupFetch"/> </af:popup> <af:table var="person" value="#{testBean.people}"> <af:column id="firstName"> <f:facet name="header"> <af:outputText value="First Name"/> </f:facet> <af:commandLink text="#{person.firstName}"> <af:showPopupBehavior popupid="O__noteWindow" triggerType="mouseHover"/> <af:clientAttribute name="fullName" value="#{person.fullName}"/> </af:commandLink> </af:column> </af:table>
The PopupCanceledEvent
is the second type of server-side event. Unlike the PopupFetchEvent
, it has a corresponding client event. The canceled event is fired when the popup is unexpectedly closed by auto-dismissal or by calling the cancel method on the client component.
The af:dialog
and af:panelWindow
extend this notion of unexpected dismissal to the cancel button and close icon. For these components, selecting the cancel button (af:dialog only) or close icon will raise the canceled event.
The PopupCanceledEvent
event has optimized event delivery meaning that it will not propagate to the server unless there are server listeners registered for this event. The canceled event is immediate but it will prevent processing of the reset of the lifecycle on the popup's children whereby ignoring any submitted values and bypassing validation. This event is also flagged as discrete. Discrete events are sent to the server isolated in a single request. They are never combined with multiple events in a single server request.
The following example demonstrates using the popup canceled event:
<af:popup contentDelivery="lazyUncached" eventContext="launcher" launcherVar="source" id="popupRegion1" popupCanceledListener="#{pageFlowScope.PopupDynamicRegionBean.swapEmptyTaskFlow}"> <af:setPropertyListener from="#{source.attributes.employee}" type="popupFetch" to="#{pageFlowScope.employeeId}"/> <af:setPropertyListener from="#{pageFlowScope.PopupDynamicRegionBean.popupTaskFlowId}" to="#{pageFlowScope.PopupDynamicRegionBean.dynamicTaskFlowId}" type="popupFetch"/> <af:panelWindow title="Employee Popup" id="window"> <af:region value="#{bindings.dynamicRegion1.regionModel}" id="dynam1" regionNavigationListener="#{pageFlowScope.PopupDynamicRegionBean.navigationListener}"/> </af:panelWindow> </af:popup> ... ... <af:column> <af:commandButton text="Update" partialSubmit="true" clientComponent="true" id="updateEmployee"> <af:clientAttribute name="employee" value="#{row.Empno}"/> <af:showPopupBehavior popupid="O__popupRegion1"/> </af:commandButton> </af:column> ... ... public void swapEmptyTaskFlow(PopupCanceledEvent event) { setDynamicTaskFlowId(""); }
Type | Phases | Description |
---|---|---|
oracle.adf.view.rich.event.PopupFetchEvent |
Any | The popupFetchEvent is delivered when the contentDelivery is lazy or lazyUncached and the popup is asked to retrieve content from the server. |
oracle.adf.view.rich.event.PopupCanceledEvent |
Apply Request Values | The PopupClosedEvent is delivered when the popup is unexpectedly dismissed or by invoking the cancel method on the client popup component. |
org.apache.myfaces.trinidad.event.AttributeChangeEvent |
Invoke Application Apply Request Values |
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing. |
Nested Class Summary | |
---|---|
static class |
RichPopup.PopupHints Server-side representation of popup hints passed to the RichPopup 's show method. |
Field Summary | |
---|---|
static java.lang.String |
ANIMATE_DEFAULT |
static java.lang.String |
ANIMATE_FALSE |
static org.apache.myfaces.trinidad.bean.PropertyKey |
ANIMATE_KEY |
static java.lang.String |
AUTO_CANCEL_DISABLED |
static java.lang.String |
AUTO_CANCEL_ENABLED |
static org.apache.myfaces.trinidad.bean.PropertyKey |
AUTO_CANCEL_KEY |
static java.lang.String |
CHILD_CREATION_DEFERRED |
static java.lang.String |
CHILD_CREATION_IMMEDIATE |
static org.apache.myfaces.trinidad.bean.PropertyKey |
CHILD_CREATION_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
CLIENT_ATTRIBUTES_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
CLIENT_COMPONENT_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
CLIENT_LISTENERS_KEY |
static java.lang.String |
COMPONENT_FAMILY |
static java.lang.String |
COMPONENT_TYPE |
static java.lang.String |
CONTENT_DELIVERY_IMMEDIATE |
static org.apache.myfaces.trinidad.bean.PropertyKey |
CONTENT_DELIVERY_KEY |
static java.lang.String |
CONTENT_DELIVERY_LAZY |
static java.lang.String |
CONTENT_DELIVERY_LAZY_UNCACHED |
static org.apache.myfaces.trinidad.bean.PropertyKey |
CUSTOMIZATION_ID_KEY Deprecated. |
static org.apache.myfaces.trinidad.bean.PropertyKey |
EVENT_CONTEXT_KEY |
static java.lang.String |
EVENT_CONTEXT_LAUNCHER |
static java.lang.String |
EVENT_CONTEXT_SELF |
static org.apache.myfaces.trinidad.bean.PropertyKey |
LAUNCHER_VAR_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
PARTIAL_TRIGGERS_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
POPUP_CANCELED_LISTENER_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
POPUP_FETCH_LISTENER_KEY |
static org.apache.myfaces.trinidad.bean.FacesBean.Type |
TYPE |
static org.apache.myfaces.trinidad.bean.PropertyKey |
VISIBLE_KEY Deprecated. |
Fields inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase |
---|
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY |
Fields inherited from class javax.faces.component.UIComponent |
---|
bindings |
Constructor Summary | |
---|---|
|
RichPopup() Construct an instance of the RichPopup. |
protected |
RichPopup(java.lang.String rendererType) Construct an instance of the RichPopup. |
Method Summary | |
---|---|
static boolean |
__captureFetchRequest(javax.faces.context.FacesContext context, RichPopup popup) Called at JSP tag and Facelets handler execution time to save the client id as a scope indicator. |
static boolean |
__isFetchRequest(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.bean.FacesBean bean, java.lang.String clientId) Called form the render phase of the popup to determine if the popup has queued a fetch event for a stamped instance during this request/reponse. |
static void |
__markFetchRequest(javax.faces.context.FacesContext context, RichPopup popup) Called immediately after queuing a popup fetch event to mark a stamped instance of a popup as having queued a popup event. |
void |
addPopupCanceledListener(PopupCanceledListener listener) Adds a popupCanceled listener. |
void |
addPopupFetchListener(PopupFetchListener listener) Adds a popupFetch listener. |
void |
broadcast(javax.faces.event.FacesEvent event) |
void |
cancel() Hides the popup component and queues the (@link oracle.adf.view.rich.event.PopupCanceledEvent} pending completion of the JSF lifecycle. |
java.lang.String |
getAnimate() Gets Specifies the animation to be used for the popups. |
java.lang.String |
getAutoCancel() Gets Controls how the popup reacts to an unexpected dismissal due to a document reload (full submit action command) or a DOM replacement (included in a PPR target). |
protected org.apache.myfaces.trinidad.bean.FacesBean.Type |
getBeanType() |
java.lang.String |
getChildCreation() Gets Controls when the children are created. |
java.util.Set |
getClientAttributes() Gets a set of client attribute names. |
ClientListenerSet |
getClientListeners() Gets a set of client listeners. |
java.lang.String |
getContentDelivery() Gets whether the popup content is delivered with the initial page. |
java.lang.String |
getCustomizationId() Deprecated. This attribute is deprecated. This attribute will be removed in the next release. Use the 'id' attribute instead. |
java.lang.String |
getEventContext() Gets |
java.lang.String |
getFamily() |
java.lang.String |
getLauncherVar() Gets Name of the variable used to reference the launch component on the request, which makes it EL reachable. |
javax.faces.component.UIComponent |
getParent() |
java.lang.String[] |
getPartialTriggers() Gets the IDs of the components that should trigger a partial update. |
javax.el.MethodExpression |
getPopupCanceledListener() Gets a method reference to a popupCanceledListener method. |
PopupCanceledListener[] |
getPopupCanceledListeners() Returns an array of attached popupCanceled listeners. |
javax.el.MethodExpression |
getPopupFetchListener() Gets a method reference to a popupFetchListener method |
PopupFetchListener[] |
getPopupFetchListeners() Returns an array of attached popupFetch listeners. |
void |
hide() Hides the popup component pending completion of the JSF lifecycle. |
boolean |
isClientComponent() Gets whether a client-side component will be generated. |
boolean |
isVisible() Deprecated. visible has been deprecated. Use the af:showPopupBehavior tag or the show/hide methods on the popup client component. |
void |
queueEvent(javax.faces.event.FacesEvent event) |
void |
removePopupCanceledListener(PopupCanceledListener listener) Removes a popupCanceled listener. |
void |
removePopupFetchListener(PopupFetchListener listener) Removes a popupFetch listener. |
void |
setAnimate(java.lang.String animate) Sets Specifies the animation to be used for the popups. |
void |
setAutoCancel(java.lang.String autoCancel) Sets Controls how the popup reacts to an unexpected dismissal due to a document reload (full submit action command) or a DOM replacement (included in a PPR target). |
void |
setChildCreation(java.lang.String childCreation) Sets Controls when the children are created. |
void |
setClientAttributes(java.util.Set clientAttributes) Sets a set of client attribute names. |
void |
setClientComponent(boolean clientComponent) Sets whether a client-side component will be generated. |
void |
setClientListeners(ClientListenerSet clientListeners) Sets a set of client listeners. |
void |
setContentDelivery(java.lang.String contentDelivery) Sets whether the popup content is delivered with the initial page. |
void |
setCustomizationId(java.lang.String customizationId) Deprecated. This attribute is deprecated. This attribute will be removed in the next release. Use the 'id' attribute instead. |
void |
setEventContext(java.lang.String eventContext) Sets |
void |
setLauncherVar(java.lang.String launcherVar) Sets Name of the variable used to reference the launch component on the request, which makes it EL reachable. |
void |
setPartialTriggers(java.lang.String[] partialTriggers) Sets the IDs of the components that should trigger a partial update. |
void |
setPopupCanceledListener(javax.el.MethodExpression popupCanceledListener) Sets a method reference to a popupCanceledListener method. |
void |
setPopupFetchListener(javax.el.MethodExpression popupFetchListener) Sets a method reference to a popupFetchListener method |
void |
setVisible(boolean visible) Deprecated. visible has been deprecated. Use the af:showPopupBehavior tag or the show/hide methods on the popup client component. |
void |
show(RichPopup.PopupHints hints) Causes the popup to be shown on the client pending completion of the JSF lifecycle. |
Methods inherited from class oracle.adf.view.rich.component.UIXPopup |
---|
processDecodes |
Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase |
---|
adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, createFacesBean, decode, decodeChildren, decodeChildrenImpl, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientId, getContainerClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getId, getIntProperty, getLifecycleRenderer, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, invokeOnChildrenComponents, invokeOnComponent, invokeOnNamingContainerComponent, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, processUpdates, processValidators, removeAttributeChangeListener, removeFacesListener, restoreState, satisfiesPartialTrigger, saveState, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setValueBinding, setValueExpression, toString, updateChildren, updateChildrenImpl, validateChildren, validateChildrenImpl |
Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponent |
---|
addPartialTarget, encodeFlattenedChild, encodeFlattenedChildren, isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setPartialTarget, setUpEncodingContext, setupVisitingContext, tearDownEncodingContext, tearDownVisitingContext, visitTree, visitTree |
Methods inherited from class javax.faces.component.UIComponent |
---|
encodeAll, getContainerClientId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CONTENT_DELIVERY_IMMEDIATE
public static final java.lang.String CONTENT_DELIVERY_LAZY
public static final java.lang.String CONTENT_DELIVERY_LAZY_UNCACHED
public static final java.lang.String ANIMATE_DEFAULT
public static final java.lang.String ANIMATE_FALSE
public static final java.lang.String EVENT_CONTEXT_SELF
public static final java.lang.String EVENT_CONTEXT_LAUNCHER
public static final java.lang.String AUTO_CANCEL_ENABLED
public static final java.lang.String AUTO_CANCEL_DISABLED
public static final java.lang.String CHILD_CREATION_IMMEDIATE
public static final java.lang.String CHILD_CREATION_DEFERRED
public static final org.apache.myfaces.trinidad.bean.FacesBean.Type TYPE
public static final org.apache.myfaces.trinidad.bean.PropertyKey CONTENT_DELIVERY_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey ANIMATE_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey EVENT_CONTEXT_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey LAUNCHER_VAR_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey POPUP_FETCH_LISTENER_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey POPUP_CANCELED_LISTENER_KEY
@Deprecated
public static final org.apache.myfaces.trinidad.bean.PropertyKey CUSTOMIZATION_ID_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_COMPONENT_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_ATTRIBUTES_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey PARTIAL_TRIGGERS_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_LISTENERS_KEY
@Deprecated
public static final org.apache.myfaces.trinidad.bean.PropertyKey VISIBLE_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey AUTO_CANCEL_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey CHILD_CREATION_KEY
public static final java.lang.String COMPONENT_FAMILY
public static final java.lang.String COMPONENT_TYPE
Constructor Detail |
---|
public RichPopup()
protected RichPopup(java.lang.String rendererType)
Method Detail |
---|
public void broadcast(javax.faces.event.FacesEvent event) throws javax.faces.event.AbortProcessingException
broadcast
in class org.apache.myfaces.trinidad.component.UIXComponentBase
javax.faces.event.AbortProcessingException
public void queueEvent(javax.faces.event.FacesEvent event)
queueEvent
in class org.apache.myfaces.trinidad.component.UIXComponentBase
public void show(RichPopup.PopupHints hints)
RichPopup.PopupHints
characteristics about how the popup is shown. The popup must also be in the right context when this method is invoked. Meaning that if the popup is within a UIData family component or another stamped component, the model must be positioned in order for this component's client id to be encoded with the correct context. If the show method is called before the render response phase, the popup's content will be delivered in the same request. Otherwise, the popup's content delivery will require a second trip to the server provided the content delivery is not immediate. Example:
public void showPopup(ActionEvent event) { UIComponent source = (UIComponent) event.getSource(); RichPopup popup = this.getPopup(); RichPopup.PopupHints hints = new RichPopup.PopupHints(); hints.add(RichPopup.PopupHints.HintTypes.HINT_ALIGN_ID, source) .add(RichPopup.PopupHints.HintTypes.HINT_LAUNCH_ID, source) .add(RichPopup.PopupHints.HintTypes.HINT_ALIGN, RichPopup.PopupHints.AlignTypes.ALIGN_AFTER_END); popup.show(hints); }
hints
- defines characteristics about how the popup is shownpublic void cancel()
public void hide()
public javax.faces.component.UIComponent getParent()
getParent
in class org.apache.myfaces.trinidad.component.UIXComponentBase
public static final boolean __captureFetchRequest(javax.faces.context.FacesContext context, RichPopup popup)
PopupFetchEvent
was queued during this request/response (applies to a postback).context
- faces contextpopup
- not in stamped context but at tag execution timetrue
if PopupFetchEvent
was queued during this requestpublic static final void __markFetchRequest(javax.faces.context.FacesContext context, RichPopup popup)
context
- faces contextpopup
- instance of the popup in (stamped) contextpublic static boolean __isFetchRequest(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.bean.FacesBean bean, java.lang.String clientId)
context
- faces contextbean
- popup state holderclientId
- id in (stamped) contexttrue
if the popup has queued a fetch event.public final java.lang.String getContentDelivery()
public final void setContentDelivery(java.lang.String contentDelivery)
contentDelivery
- the new contentDelivery valuepublic final java.lang.String getAnimate()
public final void setAnimate(java.lang.String animate)
animate
- the new animate valuepublic final java.lang.String getEventContext()
Whether events delivered by the popup and its descendents are delivered in the context of the launch source.
What does 'in context' mean? In something like a table, for example, when an event is delivered 'in context' then the data for the row clicked is made 'current' before the event listener is called, so if getRowData() is called on the collectionModel in the event listener it will return the data of the row that triggered the event.
In the case of a shared popup you really want the popup to 'act' as if it's been reparented to the launch source when the popup opens. In other words, you want any event from the popup delivered in the context of the launch source so that you can access data available to the launch source. When eventContext is set to 'launcher' both the popupFetch event and events fired from inside the popup are delivered in the context of the launch source.
public final void setEventContext(java.lang.String eventContext)
Whether events delivered by the popup and its descendents are delivered in the context of the launch source.
What does 'in context' mean? In something like a table, for example, when an event is delivered 'in context' then the data for the row clicked is made 'current' before the event listener is called, so if getRowData() is called on the collectionModel in the event listener it will return the data of the row that triggered the event.
In the case of a shared popup you really want the popup to 'act' as if it's been reparented to the launch source when the popup opens. In other words, you want any event from the popup delivered in the context of the launch source so that you can access data available to the launch source. When eventContext is set to 'launcher' both the popupFetch event and events fired from inside the popup are delivered in the context of the launch source.
eventContext
- the new eventContext valuepublic final java.lang.String getLauncherVar()
public final void setLauncherVar(java.lang.String launcherVar)
launcherVar
- the new launcherVar valuepublic final javax.el.MethodExpression getPopupFetchListener()
public final void setPopupFetchListener(javax.el.MethodExpression popupFetchListener)
popupFetchListener
- the new popupFetchListener valuepublic final javax.el.MethodExpression getPopupCanceledListener()
public final void setPopupCanceledListener(javax.el.MethodExpression popupCanceledListener)
popupCanceledListener
- the new popupCanceledListener value
@Deprecated
public final java.lang.String getCustomizationId()
@Deprecated
public final void setCustomizationId(java.lang.String customizationId)
customizationId
- the new customizationId valuepublic final boolean isClientComponent()
public final void setClientComponent(boolean clientComponent)
clientComponent
- the new clientComponent valuepublic final java.util.Set getClientAttributes()
public final void setClientAttributes(java.util.Set clientAttributes)
clientAttributes
- the new clientAttributes valuepublic final java.lang.String[] getPartialTriggers()
public final void setPartialTriggers(java.lang.String[] partialTriggers)
partialTriggers
- the new partialTriggers valuepublic final ClientListenerSet getClientListeners()
public final void setClientListeners(ClientListenerSet clientListeners)
clientListeners
- the new clientListeners value
@Deprecated
public final boolean isVisible()
@Deprecated
public final void setVisible(boolean visible)
visible
- the new visible valuepublic final java.lang.String getAutoCancel()
public final void setAutoCancel(java.lang.String autoCancel)
autoCancel
- the new autoCancel valuepublic final java.lang.String getChildCreation()
public final void setChildCreation(java.lang.String childCreation)
childCreation
- the new childCreation valuepublic final void addPopupFetchListener(PopupFetchListener listener)
listener
- the popupFetch listener to addpublic final void removePopupFetchListener(PopupFetchListener listener)
listener
- the popupFetch listener to removepublic final PopupFetchListener[] getPopupFetchListeners()
public final void addPopupCanceledListener(PopupCanceledListener listener)
listener
- the popupCanceled listener to addpublic final void removePopupCanceledListener(PopupCanceledListener listener)
listener
- the popupCanceled listener to removepublic final PopupCanceledListener[] getPopupCanceledListeners()
public java.lang.String getFamily()
getFamily
in class UIXPopup
protected org.apache.myfaces.trinidad.bean.FacesBean.Type getBeanType()
getBeanType
in class UIXPopup
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Faces 11g Release 1 (11.1.1) E10684-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |