Enter a String for the Category field. Enter a number for the Field Order field that represents where in the group this In the Project Properties dialog, select the JSP Tag Libraries node. On the JSP Tag Libraries page, click Add. In the Choose Tag Librar

Creating a Basic Databound Page 3-23 information in the Edit Form Fields dialog as you drop the control onto the page. Then if you want to change how the data displays, you need only change it in the structure definition file, and all dynamic components bound to that Java object will change their display accordingly. With standard components, if you want to change any display attributes such as the order or grouping of the attributes, you would need to change each page on which the data is displayed. For example, in the Suppliers module, you could set the category and field order attribute hints on the Suppliers Java object that groups the supplierName and supplierID attributes together and at the top of a form or at the leftmost columns of a table, the supplierStatus at the bottom of a form or the rightmost columns of a table, and the email and phoneNumber together and at the middle of a form or table. Figure 3–10 shows a dynamic form at runtime created by dragging and dropping the Supplier collection with control hints set in this manner. Figure 3–10 Dynamic Form Displays Based on Hints Set on the Metatdata for the Java Object

3.8.1 How to Use Dynamic Forms

To use dynamic forms you first need to set control hints especially the order and grouping hints on the structure file for the corresponding Java objects. Next you import the libraries for the dynamic components. You can then drop the dynamic form or table widgets onto your page. Before you begin: You need to set the category and field order control hints on the attributes in the structure file for the associated Java object. For example, for the dynamic form in Figure 3–10 , you would set the category and field order control hints for the supplierId, supplierName, phoneNumber, email , and supplierStatus attributes, as follows:

1. Enter a String for the Category field.

Use this same String for the Category value for any other attribute that you want to appear with this attribute in a group. For example, the Category value for both the phoneNumber and email attributes is contact.

2. Enter a number for the Field Order field that represents where in the group this

attribute should appear. For example, the phoneNumber has a Field Order value of 1 and the email attribute has a value of 2. For procedures on creating control hints, see the Defining Attribute Control Hints for View Objects section of the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. 3-24 Java EE Developers Guide for Oracle Application Development Framework To use dynamic components: 1. If not already included, import the dynamic component library. 1. In the Application Navigator, right-click the view project in which the dynamic components will be used, and from the context menu, choose Project Properties .

2. In the Project Properties dialog, select the JSP Tag Libraries node.

3. On the JSP Tag Libraries page, click Add.

4. In the Choose Tag Libraries dialog, select ADF Dynamic Components and

click OK. 5. On the JSP Tag Libraries page, click OK. 2. From the Data Controls panel, drag the collection onto the page, and from the context menu, choose Forms ADF Dynamic Form.

3. In the Property Inspector, enter the following: for the Category field:

■ Category : Enter the string used as the value for the Category UI hint for the first group you’d like to display in your form. For example, in Figure 3–10 , the Category value would be id. ■ Editable : Enter true if you want the data to be editable the default. Enter false if the data should be read-only. 4. Repeat Steps 2 and 3 for each group that you want to display on the form. For example, the form in Figure 3–10 is actually made up of three different forms: one for the category id, one for the category contact, and one for the category status .

3.8.2 What Happens When You Use Dynamic Components