How to Use JavaScript to Launch an External Help Window How to Create a Java Class Help Provider

Displaying Tips, Messages, and Help 17-23

17.5.6 How to Access Help Content from a UI Component

Use the HelpTopicId attribute on components to access and display the help. To access help from a component: 1. In the Structure window, select the component to which you want to add help. For a list of components that support help, see Table 17–1 and Table 17–2 .

2. In the Property Inspector, expand the Appearance section, and enter a value for

the helpTopicId attribute. This should include the prefix to access the correct help provider and the topic name. It should not include the help type, as all help types registered with that name will be returned and displayed, for example: af:inputText label=Credit Card helpTopicId=XLIFF_CREDIT_CARD This example will return both the definition and instruction help defined in the XLIFF file in Example 17–5 . 3. If you want to provide help for a component that does not support help, you can instead add an outputText component to display the help text, and then bind that component to the help provider, for example: af:outputFormatted value={adfFacesContext.helpProvider[XLIFF_CREDIT_CARD].instructions} This will access the instruction help text.

17.5.7 What You May Need to Know About Combining Different Message Types

When you add help messages to input components that may already display messages for validation and conversion, ADF Faces displays the messages in the following order within the note window: 1. Validation and conversion error messages. 2. Validation and conversion hints. 3. For input and select components only, Instruction help. For panelHeader components, Instruction help is always displayed below the header. 4. Value for shortDesc attribute. Figure 17–21 shows an inputDate component that contains a converter, instruction help, and a tip message. Figure 17–21 Different Message Types Can Be Displayed at One Time 17-24 Web User Interface Developers Guide for Oracle Application Development Framework 18 Working with Navigation Components 18-1 18 Working with Navigation Components This chapter describes how to use ADF Faces navigation components such as commandButton, navigationPane, and train to provide navigation in web user interfaces. This chapter includes the following sections: ■ Section 18.1, Introduction to Navigation Components ■ Section 18.2, Using Buttons and Links for Navigation ■ Section 18.3, Configuring a Browser’s Context Menu for Command Links ■ Section 18.4, Using Buttons or Links to Invoke Functionality ■ Section 18.5, Using Navigation Items for a Page Hierarchy ■ Section 18.6, Using a Menu Model to Create a Page Hierarchy ■ Section 18.7, Creating a Simple Navigational Hierarchy ■ Section 18.8, Using Train Components to Create Navigation Items for a Multi-Step Process

18.1 Introduction to Navigation Components

Like any JSF application, an application that uses ADF Faces components contains a set of rules for choosing the next page to display when a button or link or other navigation component is clicked. You define the rules by adding JSF navigation rules and cases in the application’s configuration resource file faces-config.xml. JSF uses an outcome string to select the navigation rule to use to perform a page navigation. ADF Faces navigation components that implement javax.faces.component.ActionSource interface generate an ActionEvent event when users activate the component. The JSF NavigationHandler and default ActionListener mechanisms use the outcome string on the activated component to find a match in the set of navigation rules. When JSF locates a match, the corresponding page is selected, and the Render Response phase renders the selected page. For more information about the JSF lifecycle, see Chapter 4, Using the JSF Lifecycle with ADF Faces . Also note that navigation in an ADF Faces application may use partial page rendering. For more information, see Section 7.4, Using Partial Page Navigation . Command components in ADF Faces include: ■ Button and link components for navigating to another location with or without server-side actions. See Section 18.2, Using Buttons and Links for Navigation . 18-2 Web User Interface Developers Guide for Oracle Application Development Framework ■ Components that render items such as tabs and breadcrumbs for navigating hierarchical pages. See Section 18.5, Using Navigation Items for a Page Hierarchy . ■ Train components for navigating a multistep process. See Section 18.8, Using Train Components to Create Navigation Items for a Multi-Step Process . In addition to using command components for navigation, ADF Faces also includes listener tags that you can use in conjunction with command components to have specific functionality execute when the action event fires. For more information, see Section 18.4, Using Buttons or Links to Invoke Functionality .

18.2 Using Buttons and Links for Navigation

Buttons and links in ADF Faces include the command components commandButton, commandLink, and commandImageLink, as well as the go components goButton, goImageLink, and goLink. The main difference between command components and go components is that while command components submit requests and fire ActionEvent events, go components navigate directly to another location without delivering an action. Visually, the rendered command and go components look the same, as shown in Figure 18–16 . Figure 18–1 Command Components and Go Components The commandImageLink and goImageLink components render images as links, along with optional text, as shown in Figure 18–2 . You can determine the position of the image relative to the optional text by setting a value for the iconPosition attribute. In addition, you can set different icons for when the user hovers over an icon, or the icon is depressed or disabled. Tip: ADF Faces also provides specialized command components that can be used inside menus and toolbars. For more information, see Chapter 14, Using Menus, Toolbars, and Toolboxes .