How to Create a Panel Window

Using Popup Dialogs, Menus, and Windows 13-11 ■ Animate : Select true to enable animation. Animation is determined by configuration in the trinidad-config.xml file and by its skin properties for more information, see Section A.6.2.1, Animation Enabled . You can override this setting by selecting false. ■ LauncherVar : Enter a variable name for example, source to be used to reference the launch component. This variable is reachable only during event delivery on the popup or its child components, and only if the EventContext is set to launcher. ■ EventContext : Set to launcher if the popup is shared by multiple objects, for example if the menu within the popup will display information for the selected row in a table. Setting this attribute to launcher makes the row clicked current before the event listener is called, and returns only data for that row. For more information, see Section 13.2.5, What Happens at Runtime: Popup Component Events. 3. Optionally, in the Property Inspector, expand the Other section and set a value for the AutoCancel property to determine the automatic cancel behavior. For more information, see Section 13.6, Controlling the Automatic Cancellation of Inline Popups.

4. From the Component Palette, drag and drop a Menu as a direct child to the popup

component, and build your menu using commandMenuItem components, as documented starting with Step 6 in Section 14.2.1, How to Create and Use Menus in a Menu Bar. 5. Add logic on the parent page to invoke the popup and context menu. For more information, see Section 13.4, Invoking Popup Elements.

13.2.4 How to Create a Note Window

Use the noteWindow component to display read-only text. The popup component that contains the noteWindow component must be contained within a form component. To create an inline window: 1. In the Component Palette, from the Common Components panel, drag and drop a Popup onto the JSF page. 2. In the Property Inspector, expand the Common section and set the following attributes. ■ ContentDelivery : Determines how the content is delivered to the component in the popup. ■ Animate : Select true to enable animation. Animation is determined by configuration in the trinidad-config.xml file and by its skin properties Tip: Because this is a context menu, you do not need to create a menu bar or multiple menus, as documented in Steps 1 through 5 in Section 14.2.1, How to Create and Use Menus in a Menu Bar. Tip: It does not matter where the popup component appears on the page, as the position is driven by the component used to invoke the popup. However, the popup component must be within a form component. 13-12 Web User Interface Developers Guide for Oracle Application Development Framework for more information, see Section A.6.2.1, Animation Enabled . You can override this setting by selecting false. ■ LauncherVar : Enter a variable to be used to reference the launch component. This variable is reachable only during event delivery on the popup or its child components, and only if the EventContext is set to launcher. ■ EventContext : Set to launcher if the popup is shared by multiple objects, for example if the window within the popup will display information for the selected row in a table. Setting this attribute to launcher makes the row clicked current before the event listener is called, and returns only data for that row. For more information, see Section 13.2.5, What Happens at Runtime: Popup Component Events. ■ PopupCancelListener : set to an EL expression that evaluates to a handler with the logic that you want to invoke when the window is dismissed. 3. Optionally, in the Property Inspector, expand the Other section and set a value for the AutoCancel property to determine the automatic cancel behavior. For more information, see Section 13.6, Controlling the Automatic Cancellation of Inline Popups.

4. From the Component Palette, drag and drop a Note Window as a direct child to

the popup component. 5. To enter the text to display in the window:

1. Click the Source tab to view the page source code.

2. Remove the closing slash from the af:noteWindow tag. 3. Below the af:noteWindow tag, enter the text to display, using simple HTML tags, and ending with a closed af:noteWindow tag. Example 13–3 shows text for a note window. Example 13–3 Text Within an af:noteWindow Tag af:popup id=popupHead contentDelivery=lazyUncached af:noteWindow inlineStyle=width:200px id=nw3 pIn anatomy, the head of an animal is the rostral part from anatomical position that usually comprises the brain, eyes, ears, nose, and mouth all of which aid in various sensory functions, such as sight, hearing, smell, and taste. Some very simple animals may not have a head, but many bilaterally symmetric forms do.p af:noteWindow af:popup Figure 13–3 shows how the note would display. Figure 13–3 Text Displayed in a Note Window Using Popup Dialogs, Menus, and Windows 13-13 6. Optionally, in the Property Inspector, expand the Other section and specify a number of seconds for the AutoDismissalTimeout property. The value you specify determines the time in seconds that the note window displays before the application automatically dismisses it. Any value you specify overrides the default automatic dismissal behavior. This override is revoked if the end user moves the mouse over the content of the note window because this gesture reverts the automatic dismissal behavior back to the default automatic dismissal behavior for the note window. The default automatic dismissal behavior is to dismiss the note window when focus changes from the launching source or from the content of the popup. 7. Add logic on the parent page to invoke the popup and note window. For more information, see Section 13.4, Invoking Popup Elements.

13.2.5 What Happens at Runtime: Popup Component Events

When content is delivered to the popup, and the contentDelivery attribute is set to either lazy or lazyUncached, the popupFetch server-side event is invoked. This event has two properties, eventContext and launcherVar. The eventContext property determines the context from which the event is delivered, either from the context of the popup self or from the component that launched the popup launcher. Setting the context to launcher can be very useful if the popup is shared by multiple components, because the framework will behave as though the component that launched the popup had launched the event, and not the popup. The launcherVar property is used to keep track of the current launcher, similar to the way in which variables are used to stamp out rows in a table. For example, say you have a column in a table that displays a person’s first name using a command link. When the command link is hovered over, a popup noteWindow is invoked that shows the person’s full name. Because this noteWindow will be used by all rows in the table, but it needs to display the full name only for the row containing the command link that was clicked, you need to use the eventContext property to ensure that the context is that row, as shown in Example 13–4 . Example 13–4 Using eventContext for Shared Popup elements af:popup id=noteWindow contentDelivery=lazyUncached eventContext=launcher launcherVar=source af:noteWindow af:outputText value={testBean.fullName} af:noteWindow af:popup af:table var=person value={testBean.people} af:column id=firstName af:commandLink text={person.firstName} af:showPopupBehavior popupId=::noteWindow triggerType=mouseHover af:commandLink af:column af:table Note: The feature enabled by this property is not accessible friendly because a mouse over triggers the timeout cancellation period and there is no keyboard equivalent.