Documente Academic
Documente Profesional
Documente Cultură
10 Votes
Here are the steps to create a simple search page in OA Framwork. I have used OAF Version 12.1.1 for this
exercise. There are many ways to do this and here I have followed one of these.
Step 1: Create a Package
All BC4J model components must belong to a Business Components (BC4J) package. So create a package with
a name like xxhci.oracle.apps.custom.LabExamples.server.
To create a new entity object in the above defined Business Components (BC4J) package:
1. In the JDeveloper Navigator, select the BC4J package where you want to create your entity object.
2.2 In the Attributes page (Step 2 of 5), you should see all the columns in the table that you specified in the
Name page.
Select New to create a transient attribute that is used in the business logic, such as a calculated OrderTotal in
a purchase order that is used for approval checking.
2.3 In the Attribute Settings page (Step 3 of 5), verify or set the following information for each of the entity
objects attributes:
The Attribute and Database Column Name and Type properties default correctly from the table definition. For
primary key columns, ensure that the Primary Key and Mandatory checkboxes are selected. For columns that
are never updateable, or updateable only when new, select the appropriate Updateable radio button. For columns
whose values change after database triggers execute, select the Refresh After update or insert as appropriate.
2.4 In the Java page (Step 4 of 5) page:
Check the option for generating an Entity Object Class. In the Generate Methods box, opt to generate
Accessors, a Create Method and a Remove Method.
2.5 Click on Generate default view object to create a VO. Select Finish to save your entity object definition
and implementation. BC4J will create an XML definition file and a Java implementation file for your entity
object.
In the Java page (Step 4 of 5), deselect the Generate Java File(s) checkbox ONLY if you are certain that you
wont be writing any code for your application module (you can always delete the class later if you find that you
dont need it, so its probably best to simply generate it at this point unless you are creating a simple container
for LOV view objects).
Select Finish to create your application module. BC4J will create an XML definition and implementation file.
Select region1 page from Structure Window and change its properties as
ID PageLayoutRN
Right click on PageLayoutRN New Region. Set the properties of the new region as
ID QueryRN
Right click on QueryRN region on structure navigator New Region using wizard.
Select the AM and VO which we have created in earlier steps as shown in below figure.
Step8: Save
all changes (Save All).
Step9: Run the Page (EmpSearchPG)
Creation of search page is complete. Run the EmpSearchPG to test the page. If everything works fine for you,
you should able to view an output like below:
Few Note:
OA Framework automatically renders both the Simple and Advanced search regions based on the
designated queryable items in the associated table.
OA Framework automatically executes the underlying search when the user selects the Go button.
2] autoCustomizationCriteria:
OA Framework automatically renders both the Simple and Advanced search regions based on the
corresponding Simple search and Advanced search regions that you define and specify as named
children of the query region.
The search regions automatically include a Go button. In addition, the Advanced search region includes
a Clear button.
OA Framework automatically executes the underlying search when the user selects the Go button.
However, developers must explicitly define mappings between items in the Search panel and items in
the table region.
3] none
The Search regions are rendered based on the Simple Search and Advanced Search regions that you
define and specify as named children of the query region.