Wednesday 6 June 2018

Query Bean in OAF.How to Create Query Bean Search page in OAF


Query Bean in OAF.How to Create Query Bean Search page in OAF

 
Query Bean is a Search Region available in the OAG page to create the search page. This is the Standard Bean in OAF to create the search page. The important part of this Query search region is this , we don't need to Manually create the Search criteria and search buttons in the OAF search page but the Query Bean has the options to create search criteria based on the Search Table created to see the search results. We can also create the Search page in OAF with out using this Query Bean or Query region but for this , we need to create the Search Criteria and Buttons programmatically. But if we will use the Query Region in OAF , then we don't need to create the Search criteria and Search Page button automatically.
 
In others words, we can say , if we want to create the Search the page in OAF , then Query bean or Query Region is the region style to create the search page in OAF in more easy steps.
 

How to Create Query Bean Search page in OAF

I am assuming , We have created the OAF project and the View object for this search Page. I am just creating the OAF page to explain the process of Query Search Page.
 
Create OAF Page.

Right Click on the project "RohitSearchPage".Click New.
Query Bean in OAF.How to Create Query Bean Search page in OAF

Enter the Page Name="RohitSearchPagePG"

Default Package="rohit.oracle.apps.fnd.RohitSearchPage.webui"

we have created the page under the webui under the project directory

Click Ok Page has been created.

Below in the Structure Page Click on "region1"
Repalce the ID of the "region1" with "PageLayoutRN" in the property inspector.
Query Bean in OAF.How to Create Query Bean Search page in OAF

 Click on the "PageLayoutRN".On the right hand side In the property inspector we  will set the AM for the this page
AM Definition=rohit.oracle.apps.fnd.RohitSearchPage.server.RohitSearchPageAM.


AM has set.
Query Bean in OAF.How to Create Query Bean Search page in OAF


Right Click on the "PageLayoutRN" and then new and then click  region.
 Then region2 has created.

Replace the region2 ID with "MainRN" in the property Inspector.
Change the Region Style=query.
Query Bean in OAF.How to Create Query Bean Search page in OAF
 Change Proeprty for Region "MainRN".
Construction Mode=resultsBasedSearch.
IncludeSimplePanel=True
IncludeViewsPanel=True
IncludeAdvancedPanel=True.
Right Click on "MainRN".Click New=>Click RegionUsingWizard.
Query Bean in OAF.How to Create Query Bean Search page in OAF
Select "Application Module"=rohit.oracle.apps.fnd.RohitSearchPage.Server.RohitSearchPageAM.
View Object=SupplierVO.
RegionId=ResultsTable
RegionStyle=table.
Query Bean in OAF.How to Create Query Bean Search page in OAF

Seelct all the available attributes and shuttle them to right.
Query Bean in OAF.How to Create Query Bean Search page in OAF

Change the Style=messagestyledText




Set and verify Your Results Table Region Properties
ID – ResultsTable
Region Style – table
AM – Please Donot put any AM
Rendered – True
Records Displayed – 10
Width – 100%
User Personalization – True


Set or Verify Column1 SupplierId Properties
Search Allowed -- True
Sort Allowed – ascending
Initial Sort Seqence – first
Selective Search Criteria – True
User Personalization – True


 
Set or Verify Column1 SupplierName Properties
Search Allowed -- True
Sort Allowed – ascending
Initial Sort Seqence – first
Selective Search Criteria – True
User Personalization – True

 
 

Now we have to write the code for insert data so we need the Controller.

Create Controller.

Right Click on "PageLayoutRN".Click Set New Controller.
 Enter The Controller Name=RohitSearchPageCO
Package=rohit.oracle.apps.fnd.RohitSearchPage.webui
Query Bean in OAF.How to Create Query Bean Search page in OAF


 
Query Bean in OAF.How to Create Query Bean Search page in OAF

 Put the Code under the "Process Request" Block of  Controller "RohitSearchPageCO".


OAQueryBean querybean=(OAQueryBean)webBean.findIndexedChildRecursive("MainRN");
    querybean.clearSearchPersistenceCache(pageContext);



 
After this Right Click on the project "RohitSearchPage" and then Click Rebuild.

Rebuild is the compilation of the project.

After successful compilation , Right Click on the page "RohitSearchPagePG".
Click Run.
Query Bean in OAF.How to Create Query Bean Search page in OAF
 
 
Query Bean in OAF.How to Create Query Bean Search page in OAF

0 comments:

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *