First page Back Continue Last page Text

oracle adf workshop

Notes:


Creating a Test Client

If you want to test custom code, you can create a test client program. Create a Java class by using the Create Java Class Wizard that you invoke from the New Gallery under the General category.

1. Enter a class name and a package.

2. In the Optional Attributes, deselect the Generate Default Constructor check box.

3. Select the Generate Main Method check box.

4. Click OK to create the class.

The file opens in the editor to show you the skeleton code:

Place the cursor on a blank line inside the body of the main() method and use the bc4jclient code template to create the few lines of necessary code. To use this predefined code template, type the characters bc4jclient, then press [Ctrl] + [Enter] to expand the code template.

Adjust the values of the amDef and config variables to reflect the names of the application module definition and the configuration that you want to use, respectively, such as module.FODCategoryAM and FODCategoryAMLocal.

Finally, change the view object instance name in the call to findViewObject() to be the one you want to work with. Specify the name exactly as it appears in the Data Model tree on the Data Model panel of the Application Module editor, such as CategoryVO1.