Professional Documents
Culture Documents
In our example, the Posting's Job Title and Organization Name that were entered during step 4 of the
Vacancy Create process are not offered in the delivered VO. These values are shown during data entry
in the below screen print. We will write PL/SQL functions to retrieve them; our extended VO will then
call these functions to return the values so they can be rendered on the page:
In order to find which VO to extend, the page definition must be analyzed. There is a distinct
VO behind the fields shown in the results table. Only a portion of the available fields are
shown by default. Click the "About this Page" link in the lower left corner to see the page
definition.
Any attribute listed on this page can be added "declaratively", or without programming
required by personalizing the results table. You’re not limited to what Oracle provides in the
delivered View Objects, however, as you will soon come to know.
To find the version of JDeveloper that's right for you, see Note:416708.1 or 787209.1 (newer)
on Metalink titled "How to find the correct version of JDeveloper to use with eBusiness Suite
11i or Release 12".
Open JDeveloper and Create a new OA Workspace and project following these steps.
Naturally, my workspace and project is called 'hack':
It is best practice to place extended objects in a custom package. If you are extending an
object in the delivered package oracle.apps.per.irc.vacancy.server, the custom package
would be hack.oracle.apps.per.irc.vacancy.server
Continue to step 3 and specify a DBC file. This file is found on the application tier at
$FND_TOP/secure. It must be copied to
C:\JDEVOAF\jdevbin\jdev\multi\system\oa\dbc_files\secure on your local machine, where
"JDEVOAF" is the directory where you installed JDeveloper. Enter an Oracle Applications user
and valid short name and responsibility key before finishing:
When you have finished marveling over your newly created project, right click it and choose
"New Business Components":
If you don't have a connection to use already defined, follow these steps below to create a
new one. The connection name is arbitrary:
Enter a Valid Oracle Applications user name/password:
Enter the appropriate box information:
Test and Finish:
Click Finish and return to the Navigator. The custom package where the extended VO will be
created is complete, but we must import the delivered VO before continuing. These files are
stored in the $JAVA_TOP directory on the application (middle) tier and must be downloaded.
Since we are extending the View Object (VO)
oracle.apps.per.irc.vacancy.server.IrcVacancyVO, we must import the
oracle.apps.per.irc.vacancy.server pacakge and all dependent packages. In order to do this
efficiently, I perform the following steps:
and answer "Yes" when presented with the dialog "The following XML file is on the classpath.
Would you like to add these objects to your project?"
Upon importing the first package, you may see an information message telling you that
additional packages are needed. In this example, import the oracle.apps.per.schema.server
(server.xml) package next. Repeat this process until no additional messages appear.
If you see an Information message like the following, it means that the server.xml has defined
a file not contained in the classpath directory. It can be ignored; if it really bothers you, open
an SR and request that Oracle fix the server.xml file.
Be sure to close JDeveloper and re-open after importing all packages. You may see an
additional warning to import more. Your project will look like the following:
We must now create a new View Object in our custom package that extends the delivered VO.
A common practice is to use a PL/SQL function for the new column so that any custom logic
can be maintained easily. Rather than re-implementing the VO extension, the PL/SQL can be
updated anytime the business rules change.
Package spec:
Continue to step 3 and click New and configure as shown in the following two screen prints.
This is the actual extension to the VO where the values from Step 4 of the Vacancy Create
process are added to the VO:
Repeat for the Posting Organization:
Continue to step 6 and configure as shown below and Finish. Check the "Generate Java File" if
you need to extend the methods delivered with the VO:
Double click the .jpx file in your project to add a substitution, which tells Oracle to use your
View Object instead of the delivered VO. Highlight the delivered VO and the extended VO and
click "Add".
To upload the substitution, open a command prompt on the local machine and run the
following command:
C:\JDEVOAF\jdevbin\jdev\bin\jpximport
C:\JDEVOAF\jdevhome\jdev\myclasses\hack.jpx -username apps -password apps
-dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle.hack.com)
(PORT=1521))(CONNECT_DATA=(SID=hack)))"
To deploy the files, zip the compiled project files in C:\\jdevhome\jdev\myclasses\hack and
FTP them to $JAVA_TOP. Unzip them:
Bounce Apache and then return to iRecruitment Recruiter -> Search for Vacancies -> About
this Page. The delivered VO has been replaced by your extended VO:
Create the necessary personalization fields on the Advanced Table Region of the page to
render the new column, beginning with the Job Posting:
Yay-yeah...you are now an Oracle Hack:
Now challenge yourself by repeating the personalizations for the Posting Organization without
the assistance of screen prints. Duplicate this effort on another Self Service page to practice
your newly minted VO substitution hacking capabilities.