How to Use the af:showPopupBehavior Tag

13-20 Web User Interface Developers Guide for Oracle Application Development Framework Figure 13–8 Dialog launched From contextInfo Component

13.5.1 How to Create Contextual Information

You use the showPopupBehavior component as a child to the contextInfo component, which allows the popup component to align with the component that contains the contextInfo component. Before you begin: 1. Create the component that will be the parent to the contextInfo component. The following components support the contextInfo component: ■ column ■ commandLink ■ inputComboboxListOfValues ■ inputListOfValues ■ inputText ■ outputFormatted ■ outputText ■ selectOneChoice 2. Create the popup element to display, as documented in Section 13.2, Declaratively Creating Popup Elements. To use a contextInfo component: 1. In the Component Palette, from the Common Components panel, drag a Context Info and drop it into the Context facet of the component that is to display the additional information icons.

2. If you need server-side logic to execute when the contextInfo component

displays, bind the contextInfoListener attribute to a handler that can handle the event. Tip: If the facet is not visible in the visual editor: 1. Right-click the outputText component in the Structure window. 2. From the context menu, choose Facets - component name Context. Facets in use on the page are indicated by a checkmark in front of the facet name. Using Popup Dialogs, Menus, and Windows 13-21

3. In the Component Palette, from the Operations panel, drag a Show Popup

Behavior and drop it as a child to the contextInfo component. 4. With the showPopupBehavior tag selected in the editor, in the Property Inspector, set the attributes as described in Section 13.4.1, How to Use the af:showPopupBehavior Tag. For the triggerType value, be sure to enter contextInfo.

13.6 Controlling the Automatic Cancellation of Inline Popups

You can use the af:popup component with a number of other components to create inline popups. That is, inline windows, dialogs, and context menus. These other components include the: ■ Dialog component to create an inline dialog For more information, see Section 13.2.1, How to Create a Dialog. ■ panelWindow component to create an inline window For more information, see Section 13.2.2, How to Create a Panel Window. ■ Menu components to create context menus For more information, see Section 13.2.3, How to Create a Context Menu. ■ noteWindow component to create a note window For more information, see Section 13.2.4, How to Create a Note Window. By default, a Fusion web application automatically cancels an inline popup if the metadata that defines the inline popup is replaced. Scenarios where this happens include the following: ■ Invocation of a command component that has its partialSubmit property set to false. The Fusion web application renders the entire page after it invokes such a command component. In contrast, a command component that has its partialSubmit property set to true causes the Fusion web application to render partial content. For more information about page rendering, see Chapter 7, Rerendering Partial Page Content. ■ A component that renders a toggle icon for end users to display or hide content hosts the popup component. Examples include the showDetailItem and panelTabbed components. For more information about the use of components that render toggle icons, see Section 8.8, Displaying and Hiding Contents Dynamically. ■ Failover occurs when the Fusion web application displays an inline popup. During failover, the Fusion web application replaces the entire page. You can change the default behavior described in the previous list by disabling the automatic cancellation of an inline popup component. This means that the Fusion web Note: If you use the showPopupBehavior tag to launch the popup, then delivery of the contextInfoEvent to the server is cancelled. If you need to invoke server-side logic based on this event, then you must launch the popup by using either JavaScript or a custom event as documented in Section 5.4, Sending Custom Events from the Client to the Server. 13-22 Web User Interface Developers Guide for Oracle Application Development Framework application does not automatically cancel the inline popup if any of the above events occur. Instead, the Fusion web applications restores the inline popup.

13.6.1 How to Disable the Automatic Cancellation of an Inline Popup

You disable the automatic cancellation of an inline popup by setting the popup component’s autoCancel property to disabled. Before you begin: It may be helpful to understand how other components can affect functionality. For more information, see Section 13.6, Controlling the Automatic Cancellation of Inline Popups. To control the automatic cancellation of inline popups: 1. In the Structure window, right-click the af:popup component for which you want to configure the automatic cancellation behavior and choose Go to Properties . 2. In the Property Inspector, expand the Other section and use the dropdown menu for the AutoCancel property to choose disabled.

13.6.2 What Happens When You Disable the Automatic Cancellation of an Inline Popup

JDeveloper sets the af:popup component autoCancel property’s value to disabled, as shown in Example 13–11 : Example 13–11 Metadata to Prevent the Automatic Cancellation of an Inline Popup af:popup id=p1 autoCancel=disabled ... af:popup At runtime, the Fusion web application restores an inline popup after it rerenders a page if the inline popup displayed before invocation of the command to rerender the page.