Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

OA Framework - All Articles
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

Search Courses

Now that we can insert data from OAF screen as explained in Insert Record article. We need a way to search them for the most obvoious reasons. Below are the steps that explain to the same from an OAF page.

Requirement: To search records in a table from OAF screen

Step 1: Create a new OA workspace and OA project

Create a OA workspace with file name as: SearchRecord

Create a OA project with file name as: SearchRecord

Default package: oaf.oracle.apps.fnd.searchrecord

Once your project is created, double click on SearchRecord project and select Project content.

Click on 'Add' button next to the bottom pane in the Project content and select only that package which you want have in your project.

Click OK and save your project. 

 

Step 2: Create a ADF Business component - Application Module AM

Right click on InsertRecord project -> click New -> select ADF Business components -> select Application Module

Package: oaf.oracle.apps.fnd.searchrecord.server

AM Name: SearchRecordAM

Check Application Module Class: SearchRecordAMImpl Generate Java File(s)

Once the AM is created, double click on the AM just created and in the window that opens select Custom Properties and set the values as below, click on Apply and then Ok.

 

Step 3: Create a OA Components page

Right click on SearchRecord project -> click New -> select OA components under Web Tier -> select Page

Package: oaf.oracle.apps.fnd.searchrecord.webui

Page Name: SearchRecordPG

 

Step 4: Set Page properties

Select on the SearchRecordPG page and go to structure pane where a region of type 'pageLayout' and ID 'region1' is automatically created.

Click on region1 in structure page and set the project properties as in the below screenshot - set all the properties except the controller class, for now.

page_properties_searchrecord_article6.png

Step 5: Set new Controller

Select PageLayoutRN in the structure pane -> Right click on it -> Set new controller

Package: oaf.oracle.apps.fnd.searchrecord.webui

Controller name: SearchRecordCO

This automatically sets the controller class property in SearchRecordPG page properties.

Step 6: Insert values into insertrecord table created in InsertRecord article:

INSERT INTO insertrecord VALUES ('ijk', 'lmn', SYSDATE, 0, SYSDATE, 0, 0);

INSERT INTO insertrecord VALUES ('opq', 'rst', SYSDATE, 0, SYSDATE, 0, 0);

INSERT INTO insertrecord VALUES ('uvw', 'xyz', SYSDATE, 0, SYSDATE, 0, 0);

INSERT INTO insertrecord VALUES ('val1', 'val2', SYSDATE, 0, SYSDATE, 0, 0);

Step 7: Create a ADF Business component - Entity Object

Right click on SearchRecord project -> New -> ADF Business Components -> Entity Object

Name -> SearchRecordEO

Package: oaf.oracle.apps.fnd.searchrecord.schema.server

Database Object: INSERTRECORD

ROWID will be the default primary key if the table has no primary key. Check the Accessors, Create Method, Validation Method and Remove Method.

Step 8: Create a ADF Business component - View Object

Right click on SearchRecord project -> click New -> select ADF Business components -> select View Object

Package: oaf.oracle.apps.fnd.searchrecord.server

VO Name: SearchRecordVO

In the Step 2, select SearchRecordEO and shuttle them to selected list

In Step3, from the Attributes window select columns Column1, Column2 and shuttle them to selected list.

 

In step-8(Java) of VO creation uncheck all the pre-selected checkboxes and select View Row Class: ViewObjRowImpl -> Generate Java File -> Accessors check box Accept all other defaults in VO creation, click Finish to create the VO under the package specified.

Step 9: Attach VO to AM

After creating VO successfully, we must associate this VO with AM we have created

Right click on SearchRecordAM -> Edit SearchRecordAM

Select 'Data Model' on the window that pops up

You should find SearchRecordVO listed in the left panel, Shuttle the SearchRecordVO to the right pane to associate it with the SearchRecordAM which is displayed as SearchRecordVO1 as in the below screenshot

Click on Apply and OK to save the changes made to SearchRecordAM

 

Step 10: Create layout in SearchRecordPG

Right click on PageLayoutRN -> New -> Region

Now, this creates a new region of style header under PageLayoutRN

Select region1 - set the ID as QueryRN and set the region style to query

Set the properties of QueryRN as in the below screenshots:

QueryRN_searchrecord_article6.png

​Step 11: Create table in QueryRN

Right click on QueryRN > New > Region using Wizard..

During creation, Choose the AM and the associated VO :

Set the column properties during table creation as in the below screenshot:

table_column_properties_searchrecord_article6.png

Set the properties of the table itself as in screenshots below:

table_properties_searchrecord_article6.png

Set the properties of the columns Column1 and Column2 as below:

Column1: Column2:

table_column1_searchrecord_article6.png   table_column2_searchrecord_article6.png

  

Result:

On page load:

result_on_page_load_searchrecord_article6.png

You can Search for data:

 


Roopa jetR

Comments   

0 #1 pharmacepticacom 2021-06-21 09:41
tadalafil goodrx https://www.pharmaceptica.com/
Quote

Add comment


Security code
Refresh

About the Author

Roopa jetR

Roopa jetR is an budding OAF developer.

LinkedIn contact: https://www.linkedin.com/in/roopajetR

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Apr 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
  1  2  3  4  5  6  7
  8  91011121314
15161718192021
22232425262728
2930     

Enquire For Training

Related Items

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner