Sei sulla pagina 1di 65

OAF Creating Search Page

Raju Ch

1. Right click on Applications and select New OA Workspace.

2. Set the below values for the Workspace.


Workspace Properties:
Name Apps88Search.jws
New OA Project Checked

3. The workspace is created under the default location which is <JDEV_USER_HOME>/myprojects.


4. A new OA Project is created automatically. Set the below values:
Project Properties:
Name Apps88SearchProject
Default Package apps88.oracle.apps.fnd.search

OAF Creating Search Page

5. Click Next and select the database connection and test.


11. Click Next and then set the below properties for the Run time connection.
Run Time Connection Details:
DBC File Name - <JDEV_USER_HOME>\dbc_files\secure\<DBSC File Name>.dbc
UserName Operations
Password welcome
Application Short Name FND
Responsibility Key - APPLICATION_DEVELOPER

Raju Ch

OAF Creating Search Page

12. Click Finish. Save your work and in the Application Navigator you will be
seeing a workspace and a project inside that.
13. The structure should look like below:

14. Right click on the project and select New.

Raju Ch

OAF Creating Search Page

15. Select Business Tier ADF Business Components Application Module.

Raju Ch

OAF Creating Search Page

16. Set the below values for the AM:


AM Properties:
Name Apps88SearchAM
Package apps88.oracle.apps.fnd.search.server

Raju Ch

OAF Creating Search Page

Raju Ch

17. Click Next and Finish.


18. Save your work and right click on Project and select Add
to Project Content.

OAF Creating Search Page

Raju Ch

19. Click Add and select only the apps88 folder and click Ok. This step will make sure that only the apps88
package will be available in the project

20. In the Application Navigator you will notice only the apps88 package.

OAF Creating Search Page

21. Right click on the project and select New. Select Business Tier ADF
Business Components Entity Object.

Raju Ch

OAF Creating Search Page

Raju Ch

OAF Creating Search Page

22. Set the below values for the EO:


EO Properties:
Name EmployeeEO
Package apps88.oracle.apps.fnd.search.server
Schema Object EMP

Raju Ch

OAF Creating Search Page

23. Click Next.

Raju Ch

OAF Creating Search Page


24. All the attributes from the EMP table will be displayed. The EO should
always contain the entire attributes from the table. Set the primary key for at least one column.

25. Click Next.


26. In the Java methods check the Create, Delete and Validation methods

Raju Ch

OAF Creating Search Page

27. Click Next and Finish.

Raju Ch

OAF Creating Search Page

28. Right click on apps88.oracle.apps.fnd.search.server and select New Entity Object.

Raju Ch

OAF Creating Search Page

29. Set the below values:


EO Properties:
Name DepartmentEO
Package apps88.oracle.apps.fnd.search.server
Schema Object DEPT

Raju Ch

OAF Creating Search Page

30. All attributes in the Dept table will be displayed.

Raju Ch

OAF Creating Search Page


31. Click Next.

Raju Ch

OAF Creating Search Page


33. Click Next and Finish.

Raju Ch

OAF Creating Search Page

Raju Ch

34. Right click on apps88.oracle.apps.schema.server and select New


Association.

35. An Association Object is created here in order to join the Emp and Dept table so that we get the Department
Name as well in the details.
36. Set the below values:
AO Properties:
Name EmpToDeptAO
Package apps88.oracle.apps.fnd.search.server

OAF Creating Search Page

37. Click Next and select the below values:


Cardinality - * to 0..1
Source Attribute Deptno(EmployeeEO)
Destination Attribute Deptno ( DepartmentEO)

Raju Ch

OAF Creating Search Page

38. Click Add and then Next and Finish

Raju Ch

OAF Creating Search Page

Raju Ch

OAF Creating Search Page

40. Right click on apps88.oracle.apps.search.server and select new View Object.

Raju Ch

OAF Creating Search Page

41. Set the below values:


VO Properties:
Name EmpDetailsVO
Package apps88.oracle.apps.search.server

Raju Ch

OAF Creating Search Page

Raju Ch

42. Click Next. Select the EmployeeEO and DepartmentEO and shuttle it to the
right side. Set the Association for DepartmentEO as EmpToDeptAO.DepartmemtEO1. Check the Updatable.
43. Click Next.

OAF Creating Search Page

Raju Ch

44. From the EmployeeEO select Empno, Ename,Sal,Job, Hiredate,Comm and from DepartmentEO select
Dname,Loc and Deptno.

OAF Creating Search Page

45. Click Next. In the SQL statement click on Expert Mode and use the below
query:
SQL Query:
SELECT EmployeeEO.EMPNO,
EmployeeEO.ENAME,
DepartmentEO.DEPTNO,
DepartmentEO.DNAME,
DepartmentEO.LOC,
EmployeeEO.JOB,
EmployeeEO.MGR,
EmployeeEO.HIREDATE,
EmployeeEO.SAL,
EmployeeEO.COMM
FROM DEPT DepartmentEO, EMP EmployeeEO
WHERE DepartmentEO.DEPTNO = EmployeeEO.DEPTNO

Raju Ch

OAF Creating Search Page

Raju Ch

OAF Creating Search Page

Raju Ch

46. Click Next and in the Java methods check EmpDetailsRowImpl.java and click Finish. Oracle standard is to
always create the rowImpl.java file for the VO's which will improve the performance.

OAF Creating Search Page

Raju Ch

47. Right click on Apps88SearchAM and click Edit Apps88SearchAM. Whenever a VO is created it needs to be
associated with the AM before use.

OAF Creating Search Page

48. Shuttle the EmpDetailsVO to the right side and click Ok.

Raju Ch

OAF Creating Search Page

49. Right click on the project and select New.

Raju Ch

OAF Creating Search Page

50. In Web Tier OA Components select Page.

Raju Ch

OAF Creating Search Page

51. Set the below values:


Page Properties:
Name EmployeeManagerPG
Package apps88.oracle.apps.fnd.search.webui

52. In the structure pane of EmployeeManagerPG, set the below properties for region1.

Raju Ch

OAF Creating Search Page

Region1 properties:
Id PageLayoutRN
AM Definition apps88.oracle.apps.fnd.search.server.apps88searchAM
Window Title Oracle Application Search Page
Page Title Search Employee

Raju Ch

OAF Creating Search Page

53. Right click PageLayoutRN and select New Region.

Raju Ch

OAF Creating Search Page

54. Set the below properties


QueryRN properties:
Id QueryRN
Region Style query
Construction Mode autoCustomizationCriteria

Raju Ch

OAF Creating Search Page

55. Right click on QueryRN and select New Region using wizard.

Raju Ch

OAF Creating Search Page

56. Select the Apps88SearchAM and then select EmpDetailsVO1 and click Next.

57. Set the Region Id as ResultsTable and Region Style as table. Click Next.

Raju Ch

OAF Creating Search Page

58. Shuttle all the attributes to the right side.

Raju Ch

OAF Creating Search Page

Raju Ch

59. Change the item style of all the attributes to messageStyledText and set the Prompt as per the screen shot.
Click Next and finish.

60. Set the Width of ResultsTable to 100%.

OAF Creating Search Page

61. Right click on QueryRN and select new simpleSearchPanel.

Raju Ch

OAF Creating Search Page

62. Set the header Id to SimpleSearchHeader.

63. Right click Region1 and select new messageTextInput.

64. Set the below properties

Raju Ch

OAF Creating Search Page


MessageTextInput Properties:
Id SearchEmpName
Prompt Name

65. Right click Region1 and select new messageTextInput.

Raju Ch

OAF Creating Search Page

66. Set the below properties


MessageTextInput Properties:
Id SearchEmpNo
Prompt Number

Raju Ch

OAF Creating Search Page

67. Right click on QueryRN and select new simpleSearchMappings.

Raju Ch

OAF Creating Search Page

Raju Ch

68. Set the below properties for the default criteriaMap1.


CriteriaMap1 Properties:
Id NameMap
Search Item SearchEmpName
Results Item Ename

69. Right click simpleSearchMappings and click new queryCriteriaMap.Set the below properties
CriteriaMap2 Properties:

OAF Creating Search Page


Id NoMap
Search Item SearchEmpNo
Results Item Empno

70. Save your work and run the EmployeeManagerPG

Raju Ch

OAF Creating Search Page

Raju Ch

71. When you are running the page sometimes you will get below errors. Basically OAF assumes, when building
Entities against tables, that you have added the standard WHO columns to your table.
In order to fix this problem, add:
LAST_UPDATE_DATE date
LAST_UPDATE_LOGIN integer

OAF Creating Search Page

Raju Ch

LAST_UPDATED_BY integer
CREATION_DATE date
CREATED_BY integer
to your table, and import them into the EO you have created.

72. Click on apps88.oracle.apps.fnd.search.server.DepartmentEO then you will see the DepartmentEO structure.

OAF Creating Search Page

73. Double click on DepartmentEOImpl.java then implement the methods.

Raju Ch

OAF Creating Search Page

Raju Ch

OAF Creating Search Page

Raju Ch

OAF Creating Search Page

Raju Ch

OAF Creating Search Page


74. Repeat the above steps for EmployeeEO also

Raju Ch

OAF Creating Search Page

Raju Ch

OAF Creating Search Page

Raju Ch

OAF Creating Search Page

75. Save your work and run the EmployeeManagerPG

Raju Ch

OAF Creating Search Page

Raju Ch

OAF Creating Search Page

Raju Ch

OAF Creating Search Page

Raju Ch

:~:~:~:~:~:~:~:~: END :~:~:~:~:~:~:~:~:

Adding Attachments to the Results Table

OAF Creating Search Page

Raju Ch

Attachments can be added in a table or an advanced table where we can attach a file or text or URL. Let us see the
steps involved in implementing the attachments.
1. Go to the EmployeeManagerPG and in the Structure pane right click on the
ResultsTable and select New Item.

2. Set the below properties for the new Item.


ID Attachment
Item Style attachmentImage
View Instance EmployeeVO1
Automatic Save True
Prompt Attach

OAF Creating Search Page

3. A entityMap1 gets created automatically and set its Entity property to apps88.
4. Right click on entityMap1 and select new primary Keys.

Raju Ch

OAF Creating Search Page

5. Set the below values for the PrimaryKey1.


View Attribute Empno

6. Save your work and Run the EmployeeManagerPG.


7. You can notice a new column in the ResultsTable .

Raju Ch

OAF Creating Search Page

8. Click on the + symbol and attach a new file.

9. Select a file and click on Apply.

10. A confirmation message is displayed. You can notice a new icon in the Attach column.

Raju Ch

Potrebbero piacerti anche