How to Access Help Content from a UI Component What You May Need to Know About Combining Different Message Types

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 . Working with Navigation Components 18-3 Figure 18–2 Command Image Link and Go Image Link ADF Faces also includes a toolbar button that provides additional functionality, such as a popup facet that can open popup menus from a toolbar button. For more information, see Section 14.3, Using Toolbars . You can configure your application to allow end users invoke a browser’s context menu when they right-click a command component that renders a link. End users who right-click the link rendered by a command component may use a browser’s context menu to invoke an action that you do not want them to invoke for example, open the link in a new window. For more information, see Section 18.3, Configuring a Browser’s Context Menu for Command Links. You can show a warning message to users if the page that they attempt to navigate away from contains uncommitted data. Add the checkUncommittedDataBehavior component as a child to command components that have their immediate attribute set to true. If the user chooses not to navigate, the client event will be cancelled. You can add the checkUncommittedDataBehavior component as a child to the following components: ■ af:commandButton ■ af:commandLink ■ af:commandImageLink ■ af:commandToolbarButton ■ af:activeCommandToolbarButton For the warning message to appear to end users, the page must contain uncommitted data and you must have also set the document tag’s uncommittedDataWarning attribute to on, as described in Section 8.2.5, How to Configure the document Tag. 18-4 Web User Interface Developers Guide for Oracle Application Development Framework

18.2.1 How to Use Command Buttons and Command Links

Typically, you use commandButton, commandLink, and commandImageLink components to perform page navigation and to execute any server-side processing. To create and use command components: 1. Create a commandButton component by dragging and dropping a Button from the Component Palette to the JSF page. Create a commandLink component by dragging and dropping a Link. Create a commandImageLink component by dragging and dropping an Image Link.

2. In the Property Inspector, expand the Common section and set the text attribute.

3. Set the icon attribute to the URI of the image file you want to use for inside a commandButton or commandImageLink component this is not supported for commandLink. For a commandImageLink component, you can also set the hoverIcon, disabledIcon, and depressedIcon attributes. 4. Set the action attribute to an outcome string or to a method expression that refers to a backing bean action method that returns a logical outcome String. For more information about configuring the navigation between pages, see Section 2.3, Defining Page Flows . The default JSF ActionListener mechanism uses the outcome string to select the appropriate JSF navigation rule, and tells the JSF NavigationHandler what page to use for the Render Response phase. For more information about using managed bean methods to open dialogs, see Chapter 13, Using Popup Dialogs, Menus, and Windows . For more information about outcome strings and navigation in JSF applications, see the Java EE 6 tutorial at http:download.oracle.comjavaeeindex.html . Note: A warning message may also appear for uncommitted data if you set the document tag’s uncommittedDataWarning tag to on and your page renders an ADF Controller bounded task flow that is configured as critical, as described in the How to Enable Implicit Save Points section of the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. Tip: Alternatively, you can use the textAndAccessKey attribute to provide a single value that defines the label along with the access key to use for the button or link. For information about how to define access keys, see Section 22.3.4, How to Define Access Keys for an ADF Faces Component Tip: You can use either the text attribute or textAndAccessKey attribute or the icon attribute, or both.