VO Extension
Now we are going to learn about how to extend the view object in OAF.
Step1:- Navigate to the page where you want to extend the view object.
Analyze the page and note down in which region you want to extend.
Click on about this page and note down the VO associated with that region.
And also note down the path of the VO.
Step2:- Let us consider now we are extending the standard iProcurement page.
Now in My Requisition region in the existing table we are adding one more new column.
Note down the below details:-
VO Name:- MyReqsGlanceVO.
VO Path:- [Link]. (U will get the path of the VO
in Business components section ).
Step3:- Get the corresponding files from the server $JAVA_TOP to local machine.
Step4:- Convert the class file to java file.
Step5:- Open the jDeveloper.
Create the new workspace.
Create one project
Give the package name ([Link])
Step6:- Right click on project select new
ADF Business Components
In that select View Object
Name:- (xxMyReqsGlanceVO)
Package:-Give the package name ([Link])
Extends:-Brows the standard
VO ([Link])
Click on next
It will open the sql query window in that do the required changes according to the requirement.
Don't forget to generate the java file
After creating the extended view object compile the java files.
Step7:- Goto the project right click select project properties
Business Components
Substitutions
In the substitution window select standard VO in left hand side and select custom VO on right
hand side and click on ADD button.
Step8:- Move that newly created folder back to the server
From C:\dev\oaf\r1211\jdevhome\jdev\myclasses
(the newly created VOExtension folder)
To /oracle/apps/r12/visr12/apps/apps_st/comn/java/classes
Step9:- JAVA import utility
Open the command prompt
change the directory to:- C:\oaf\p9879989_R12_GENERIC\jdevbin\oaext\bin
after that import the following:-
make the fallowing path in a single line for that in notepad go format uncheck word
wrap:-
jpximport C:\oaf\p9879989_R12_GENERIC\jdevhome\jdev\myprojects\[Link]
-username apps -password apps dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)
(HOST= [Link])(PORT=1521))(CONNECT_DATA=(SID= visr12)))"
C:\dev\oaf\r1211\jdevhome\jdev\myprojects\[Link] this the path where
your jpx file located in your machine.
Step10:- To check the extension has done or not go to the sql developer execute the
following command
begin
jdr_utils.listCustomizations('/oracle/apps/icx/por/reqmgmt/server/MyReqsGlanceVO');
end;
It will give the path.
Step11:- Bounce the Apache Web Server.
Step12:- Go to the front end go to the page which u want to extend.
Click on about this page. Expand all in business components check whether the extended VO is
reflecting or not.
Step13:- Do some personalization
Add a new item of column type for the newly added filed.
Add a new item for displaying the information.
provide the required info
View attribute of the new field
View Instance (Give the standard View Instance name)
Create one item for column header.
That finishes the view object extension.
Go back to the page and check the newly added field is appearing or not.