06-Auto Customization Criteria Search in Oracle OAF

Make sure you have setup your jDeveloper properly and created OAWorkspace. In case you have not done that before, click here to see how.

Click here to know different types of search pages in OAF.

Below are the steps in brief:

  • Create Application Module (AM)
  • Create View Object (VO)
  • Add VO to AM
  • Create a page
  • Add Query Region to the page
  • Add Simple Search Panel to the query region and add the text fields to be used for search
  • Add Simple Search Mapping to the query region to map the text fields to the result table

We will add new package (accsearch as subcomponent of component demo) in our previous application workspace. For detailed tutorial on adding all the business components view the previous post here. 


  • Right click demo package and add new application module:









  • Add new View Object AccSearchVO with below query:
SELECT
    ooha.header_id,
    ooha.order_number,
    ooha.cust_po_number,
    ooha.ordered_date,
    ooha.org_id,
    hou.name org_name
FROM
    oe_order_headers_all  ooha,
    hr_operating_units    hou
WHERE
    ooha.org_id = hou.organization_id







  • Add the view object to application module



  • Add new page AccSearchPG 


  • Change the properties of Page Layout Region

  • Add query region inside page layout region


  • Right click QueryRN and select New -> Region Using Wizard and choose AccSearchVO. Change all the fields style to messageStyledText





  • Right click QueryRN and add new simpleSearchPanel. Add two messageTextInput fields for OrderNumber and OrgName


  • Right click QueryRN and add new simpleSearchMappings for OrderNumber and OrgName. Each criteria map is for one mapping. This mapping is used to link the text fields to the result table. Search Item is for text fields that we added in simple search panel and Result Item is for result table fields

We missed to change QueryRN properties, please change these properties (otherwise go button will not appear in search panel):








  • Right click the AccSearchPG and click Run



Comments