How to Define Custom Validator and Converter Messages

17-10 Web User Interface Developers Guide for Oracle Application Development Framework af:inputText af:outputText value={explorerBundle[help.extension]} af:inputText simple=true columns=4 af:convertNumber type=number integerOnly=true af:inputText af:panelLabelAndMessage Figure 17–15 shows how the panelLabelAndMessage and nested components are displayed in a browser. Figure 17–15 Examples Using the panelLabelAndMessage Component The panelLabelAndMessage component also includes an End facet that can be used to display additional components at the end of the group. Figure 17–16 shows how the telephone number fields would be displayed if the End facet was populated with an outputText component. Figure 17–16 End Facet in a panelLabelAndMessage Component Use a panelGroupLayout component within a panelLabelAndMessage component to group the components for the required layout. For information about using the panelGrouplayout component, see Section 8.12, Grouping Related Items. You set the simple attribute to true on each of the input components so that their individual labels are not displayed. However, you may want to set a value for the label attribute on each of the components for messaging purposes and for accessibility. Group and wrap components using the panelLabelAndMessage component. The panelLabelAndMessage component can be used to wrap any components, not just those that typically display messages and labels. To arrange form input components with one label and message: 1. Add input or select components as needed to the page. For each input and select component: ■ Set the simple attribute to true. ■ For accessibility reasons, set the label attribute to a label for the component.

2. In the Structure window, select the input andor select components created in Step

1. Right-click the selection and choose Surround With Panel Label And Message

.

3. With the panelLabelAndMessage component selected, in the Property

Inspector, set the following: Tip: If you have to use multiple panelLabelAndMessage components one after another, wrap them inside an af:panelFormLayout component, so that the labels line up properly. For information about using the panelFormLayout component, see Section 8.6, Arranging Content in Forms. Displaying Tips, Messages, and Help 17-11 ■ label : Enter the label text to be displayed for the group of components. ■ for : Use the dropdown menu to choose Edit. In the Edit Property dialog, select the ID of the child input component. If there is more than one input component, select the first component. Set the for attribute to the first inputComponent to meet accessibility requirements. If one or more of the nested input components is a required component and you want a marker to be displayed indicating this, set the showRequired attribute to true. 4. To place content in the End facet, drag and drop the desired component into the facet. Because facets accept one child component only, if you want to add more than one child component, you must wrap the child components inside a container, such as a panelGroupLayout or group component.

17.5 Displaying Help for Components

ADF Faces provides a framework that allows you to create and display three different types of help whose content comes from an external source, rather than as text configured on the component. Because it is not configured directly on the component, the content can be used by more than one component, saving time in creating pages and also allowing you to change the content in one place rather than everywhere the content appears. The first type of external help provided by ADF Faces is Definition help. Like a standard tip, the content appears in a message box. However, instead of appearing when the user mouses over the component, Definition help provides a help icon a blue circle with a question mark. When the user mouses over the icon, the content is displayed, as shown in Figure 17–17 . Figure 17–17 Definition Text for a Component Table 17–1 shows the components that support Definition help. Tip: If the facet is not visible in the visual editor: 1. Right-click the panelLabelAndMessage component in the Structure window. 2. From the context menu, choose Facets - Panel Label And Message facet name . Facets in use on the page are indicated by a checkmark in front of the facet name.