• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Manual Search

In this lesson we are going to see how to create manual search page in OAF manually. Manual Search page we need to enter the data value to search for example employee names starting with ‘A’ then we used to type A% in oracle apps forms similarly in OAF the manual search page will work like.

Step 1: Create Workspace, project , AM and create one page assign AM to the page give page title and window title.

For example :

workspace name : ManualSearch

Project Name : ManualSearchPRJ

package name : xxmanualsearch.oracle.apps.po.manualsearchprj.webui

AM name : ManualSearchAM

AM Package name: xxmanualsearch.oracle.apps.po.manualsearchprj.server

Step 2:-  Create VO and attach VO to AM

VO Name is : ManualsearchVO

Query in the VO is :-

SELECT * FROM dept

WHERE deptno LIKE NVL(:1, deptno)

AND dname LIKE NVL (:2, dname)

AND loc LIKE NVL(:3, loc)

Step 3:-  The below picture shows the requirement so there fore we need to create a page to achieve the requirement.

35

Now if we observe the above image we need to create three Message Text Input items for search and two button items.

After entering data in Message Text Input items and once we click on Go button then according to the search item provided the resultant values must be displayed in the below table region.

steps to construct the page like above picture:

step 1: Create one message component layout region

step 2: Under message component layout region create three message text input items.

step 3: Create one Row Layout Region under main region, under Row Layout Region create two Submit buttons and if we want a space between two buttons then create one Spacer item between two submit button items.

step 4: Create one region using wizard and select region style as Table, select proper package name in which we created VO (ManualsearchVO).

After creating all the page structure may look like :

36

Step 4:- Open the java file of AM and create one method in AM and write the logic.
public void xxSearchParams (OAPageContext pc,OAWebBean wb)

{

String dno = null;

String dname = null;

String loc = null;

//ManualsearchVOImpl vo= getManualsearchVO1();

OAViewObject vo= getManualsearchVO1();

if(pc.getParameter(“item1”)!=null)

{

dno = pc.getParameter(“item1”).toString();

vo.setWhereClauseParam(0,dno);

}

else

{

vo.setWhereClauseParam(0,null);

}

if(pc.getParameter(“item2”)!=null)

{

dname =pc.getParameter(“item2”).toString();

vo.setWhereClauseParam(1,dname);

}

else

{

vo.setWhereClauseParam(1,null);

}

if(pc.getParameter(“item3”)!=null)

{

loc = pc.getParameter(“item3”).toString();

vo.setWhereClauseParam(2,loc);

}

else

{

vo.setWhereClauseParam(2,null);

}

vo.executeQuery();

}
Step 5:-  Create the controller and write the logic for buttons in Process Form Request of controller and here is the logic.

 

public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)

{

super.processFormRequest(pageContext, webBean);

ManualsearchAMImpl am=(ManualsearchAMImpl)pageContext.getApplicationModule(webBean);

if(pageContext.getParameter(“item4”)!=null)

{

am.xxSearchParams(pageContext,webBean);

}

if(pageContext.getParameter(“item6”)!=null)

{

OAMessageTextInputBean msb = (OAMessageTextInputBean)webBean.findChildRecursive(“item1”);

msb.setValue(pageContext,null);

OAMessageTextInputBean msb2 = (OAMessageTextInputBean)webBean.findChildRecursive(“item2”);

msb2.setValue(pageContext,null);

OAMessageTextInputBean msb3 = (OAMessageTextInputBean)webBean.findChildRecursive(“item3”);

msb3.setValue(pageContext,null);

}

}
Step 6:- After writing logic in AM and Controller rebuild the code and run the page to see the output.

The resultant page may look like the following figure:

37

 

Give some text in any Text input field and click on go button.

38

Summary
Review Date
Reviewed Item
Manual Search
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Manual Search"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Site Disclaimer, Copyright © 2016 - All Rights Reserved.

    Support


    Please leave a message and we'll get back to you soon.

    I agree to be contacted via e-mail.