Академический Документы
Профессиональный Документы
Культура Документы
What is OAF ?
Oracle Application Framework (OA Framework or OAF) is a proprietary framework developed by Oracle
Corporation for application development within the Oracle E-Business Suite (EBS)
Oracle Application Framework (OAF) provides visual and declarative approaches.
The OA framework is also available to customers for personalizations, customizations and customapplication development.
The OA Framework helps in creating self Service pages in Oracle EBS.
It controls the flow of the application.
This framework works on the basis of Java EE principles.
We must know the Basics of Core Java and Advanced Java to learn and incorporate OAF.
In OAF User Interface is Very Interactive.
We can view OA Framework pages in mobile phones which contain Internet browsing feature
OA Framework is J2EE based but it also supports various standards like HTML, XML, SQL, and JSP.
Importance of OAF in Oracle Apps:
General Page 1
OAF
Oracle FORMS
The COMMIT_FORM or
DO_KEY(COMMIT_FORM) commands can be
invoked by any trigger that allows restricted
procedures.
Previous Unit
Mark this Unit Complete
Next Unit
General Page 2
- Structure f OAF
Friday, December 05, 2014
4:32 PM
Structure of OAF
Let us discuss the architecture followed by OAF:
As J2EE follows MVC architecture, OAF also follows MVC architecture as its based on and follows J2EE.
The abbreviation of MVC is Model View Controller.
MVC is the clean design interface between Model, View, and Controller.
MVC is software pattern for implementing the user interface.
It divides a software application into three interconnected parts which makes the implementation of request
and response easier.
Model mainly consists of application data, business rules, logic and functions.
Model contains the components which handles data directly from Database. It includes business components
for Java which mainly are:
The view is updated with the change and the representation as given by the model time to time.
The view in OAF comprises of various page level items like text fields, buttons, regions, links etc. These are
visible on any OAF page.
General Page 3
Controller accepts input and converts it into commands for the model or view.It can also change the views
presentation of the model.
The figure given below shows the interaction between Model, View, and Controller:
Next Unit
General Page 4
The core layer represents the database and the surface layer represents the application pages.
In between is a number of business logic and user interface layers.
This layering allows for generic code and components to be implemented at the inner layers to maximize
their reuse across the outer layers
Previous Unit
Mark this Unit Complete
General Page 5
OAF
Oracle FORMS
The COMMIT_FORM or
DO_KEY(COMMIT_FORM) commands can be
invoked by any trigger that allows restricted
procedures.
Previous Unit
General Page 6
1.
2.
3.
4.
Previous Unit
Mark this Unit Complete
Next Unit
General Page 7
- About Model
Friday, December 05, 2014
4:34 PM
About Model
The entire Database related transactions in OAF pages will be taken care by the MODEL.
Callable Statement
Prepare Statement
OADB Transactions
Callable statement is used to call a PL/SQL statements, Prepare statements are used if we are using single
SELECT statement, and OADB transactions will take care of Oracle APPS related Data Base transactions.
General Page 8
Previous Unit
Mark this Unit Complete
Next Unit
General Page 9
The entity objects are used if one wishes to do some insert/update operations.
Entity Objects represents a Data Base Row of a table.
Entity Objects will be based on the View (Oracle View), Synonyms or snapshots.
We need to create Entity Object if we want to perform DML operations on the OAF Page.
All the Entity Objects end with the EO.
Example: employeeEO
Entity Association is the relationship between two Entity Objects having one common column.
All the Entity Association ends with the AO (Association Object).
Example: EmpDeptAO
If we want to perform DML operations on Master Detail page then we go for Entity Association.
If we want to know common column between two tables then we will go for Entity Association.
Have Questions ? Ask in the Unit Forums
Previous Unit
Mark this Unit Complete
Next Unit
General Page 10
View Objects are used when we want some data to be displayed on page.
View Objects are used just for displaying purpose.
View Objects access the result set of a SQL statement, it can be either based on the Entity Object or plain SQL
query.
All the view objects ends with the VO
Example: EmployeeVO
When we create the View Object (VO) one subclass will generate with setters and getters method.
2) Automatic VO
3) Validation VO
4) Property VO
Manual VO: If we are writing our own SQL query then it will be called as Manual VO.
Automatic VO: Automatic VO is when we select an Entity Object automatically it will select the Query.
If we want to perform DML operations then we can go for VO that should be based on Entity Object.
We go for Manual VO if we are using simple SELECT statement.
NOTE: Note that when we create VO (View Object) all the table columns will be converted into attributes,
hence here we call columns as attributes.
Validation VO:Validating the data in the Data Base, example using WHERE condition in the SELECT statement.
Property VO:Attributes / columns without Data Base columns comes under property VO. These attributes are
also called as Transient attributes.
Example: Suppose there is a table which holds student marks so therefore it contains 6 columns to hold six
subject marks for each student. There is no total column in the table to store the total marks of the student
separately. Now in the output for display purpose we are taking TOTAL attribute, hence which is not from
Data Base table and this TOTAL attribute is called Transient attribute.
General Page 11
View Links:
Relationship between two View Objects having one common column in both the VOs is called View Link. All
the View Link objects end with the VL
Example: DeptEmpVL
Note that if we want to display Master Detail data then we go for View Links, where as if we want to perform
DML operations on Master Detail data we go for Entity Association.
The below figure shows that how View Objects and View Links are interacting with Data Base, VO interacts
with Data Base Directly or VO interacts with Data Base through the EO.
Previous Unit
Mark this Unit Complete
Next Unit
General Page 12
- Application Module
Friday, December 05, 2014
4:35 PM
Application Module
The View Objects containing in the Main Application Module can be used anywhere in the child regions or
General Page 13
The View Objects containing in the Main Application Module can be used anywhere in the child regions or
Nested Application Module.
If the View Objects are attached to the Nested Application Module then those view objects are applicable
only to that particular nested region.
Have Questions ? Ask in the Unit Forums
Previous Unit
Mark this Unit Complete
Next Unit
General Page 14
- About View
Friday, December 05, 2014
4:36 PM
About View
View is the actual output OAF page what an end user can able to see.
In Oracle Apps Framework View is implemented using UIX technology, whereas UIX means User Interface
XML.
Whenever we run the page in JDeveloper then automatically UIX will generate web.xml file.
The power of UIX is that allows metadata to be translated to an HTML page for a web browser or mobile
device browsers.
The generated web.xml file will be converted into HTML format of OAF page.
Since web.xml file here will work as a cache memory.
Whenever we want to move the web.xml file into the server side then MDS repository is used to move the
web.xml file into the server.
MDS stands for Meta Data Service and in the application top we will be having MDS folder.
When we deploy all the OAF page destination paths, regions then the files will be stored into the MDS tables.
The MDS table are like:
JDR_Paths:Stores the path of the documents, OA Framework pages and their parent child relationship.
JDR_Components:Stores components on documents and OA Framework pages.
JDR_Attributes:Stores attributes of components on documents and OA Framework pages.
JDR_ATTRIBUTES_TRANS:Stores translated attribute values of document components or OA framework
pages.
JDR_DOCUMENT_ID_S: This is a sequence generator table.
Previous Unit
Mark this Unit Complete
General Page 15
- About Controller
Friday, December 05, 2014
4:36 PM
About Controller
OAPageContext:
To get and set values of the fields using the OAPageContext.getparatmeter and
OAPageContext.putparameter.
To call one page to another page OAPageContext.setforwardURL.
To redirect the current page itself use OAPageContext.forwardImmediatelyToCurrentPage (or)
OAPageContext.sendRedirect and many more.
OAWebBean:
Each and every field we have properties and the properties define the behavior of item.
OAWebBean represents the Hierarchy/Structure of the components in the page.
WebBean represents the properties of item.
As we discussed what Model, View, and Controller is, look at the below figure which shows that how they
generally interact with each other or how the data flow between them is.
General Page 16
Previous Unit
Mark this Unit Complete
Next Unit
General Page 17
General Page 18
Previous Unit
Mark this Unit Complete
Next Unit
General Page 19
Step 1: If we observe we will find an option called About this Page in OAF Page. Click on the link About this
Page. The same process is shown in the below figure:
Sometimes you may not find an option called About this Page, for that you need to set one Profile Option in
Oracle Apps. The name of the profile option is Personalize Self-Service Defn. Switch to the responsibility,
System Administrator.
The navigation to select the profile option is: System Administrator -> Profile -> System
The same navigation is shown in the below figure:
General Page 20
After that select the Display level as Site and down in the Profile give name like Persolalize%Self%, the
same scenario is shown in the below figure:
After entering, click on Find button then you can see full profile option name. At site level select YES option
to activate About this Page link in the Oracle apps Framework page. The same scenario is shown in the below
figure:
General Page 21
Step 2: After selecting About This page we can see another window, in that select a tab called Technology
Components and after selecting that tab we can see the option called OAFramework which shows the
version name of OAFramework. The same scenario is shown in the below figure which is showing the version
number as 12.1.3.
Step 3: Now you need to download the JDeveloper patch of the version which we identified in Technology
Components. All the patches we can download from Oracle Meta link, and the file size is 500+ MB. The below
General Page 22
Components. All the patches we can download from Oracle Meta link, and the file size is 500+ MB. The below
table lists some patches related to the versions:
Patch 7315332
12.1.1
Patch 8431482
12.1.2
Patch 9172975
12.1.3
Patch 9879989
Extract the ZIP file and open the patch folder you will find three folders, as shown in the below figure
contains jdevbin, jdevdoc, jdevhome:
Previous Unit
Mark this Unit Complete
Next Unit
General Page 23
In the next step open jdevbin folder in that you will find a jdev folder again open jdev folder the you can see
bin folder, after that if you observe we can find jdev and jdevW icons. The jdev is for UNIX environment and
jdevW is for Windows environment. The same scenario is shown in the below figure stepwise:
General Page 24
General Page 25
Previous Unit
Mark this Unit Complete
Next Unit
General Page 26
Step 1: First step is we need to set the Jdev environment variables for windows. Go to environment variable
in windows properties. Right Click on Computer/My Computer select properties. The same scenario is shown
in the below figure.
Select Advanced System Settings after choosing the Properties of Computer, the same scenario is shown in
the below figure:
General Page 27
Now in the top User Variables select New Button for adding a New User variable as show in the below figure:
General Page 28
Note that you must give Variable name as JDEV_USER_HOME and Variable Value is the path of the
jdevhome\jdev. Let us consider as a example I downloaded the patch and extracted it to Bharath \Softwares
in D: drive now my path for Variable value is:
D:\Bharath\Softwares\p9879989_R12_GENERIC\jdevhome\jdev
The same thing is shown in the below figure:
Step 2: After setting Variable name and Variable value we need to select DBC file into from Oracle Apps fnd
top, copy DBC file and paste it in JDeveloper patch.
To know where exactly the DBC file is located in Oracle Apps go to About this Page and select Java System
Properties tab then in the list we can find an System Property called DBC FILE, in the Value behind to DBC FILE
is the path where exactly the DBC file located in the Oracle Apps.
Step 3: After finding where exactly the DBC file located go to that particular path and copy the DBC file (note
that dont delete the dbc file and also dont cut it).
Here we are using WinScp which connects to the server from our desktop system, we can also use putty to
connect to the server or any other tool which works similar like WinScp or Putty connection manager.
Install WinScp and the following figure shows the icon how it look like:
General Page 29
Install WinScp and the following figure shows the icon how it look like:
While giving path name directly dont give /naora1.dbc, according to the above figure give the path as
/u01/apps1/inst/apps/naora1_naapps/appl/fnd/12.0.0/secure
After giving path you will find DBC file just copy it, the same scenario is shown in the below figure:
After copying in your desktop system go to the jdevhome folder , then jdev, next dbc_files, and then next
secure, here we will not find any files or documents the folder is empty now we need to paste the DBC file
which we copied from the Oracle Apps Instance Server.
General Page 30
Step 4: After pasting the DBC file now open the JDeveloper and create the Data Base Connection. After
opening the file it will ask for Configure File Type Associations, on check box check all the available types to
associate with JDeveloper. The below figure shows how the opening page looks like:
Step 5: Create a data base connection, go to Connections tab after that Right Click on Data Base folder and
then select New Database Connection, the same scenario is shown in the below figure:
General Page 31
After selecting New Database Connection Welcome to the create Data Base connection window opens
simply click on Next button. After that give the Connection Name here in the below figure if we observe the
connection name is NewtonApples, and the Connection Type must be Oracle (JDBC)
Click on next button after giving Connection Name, in the next window it asks for username and password
give Toad/Oracle SQL Developer tool connection name. The same scenario is shown in the below figure: -
General Page 32
After giving Username and Password click on the Next button, now you need to give connection details all the
connection details we even can find in DBC file, to check those detail open the DBC file with notepad there
you can find Host Name , JDBC Port, and Service Name. Give appropriate names and note that Driver type is
thin.
Now after giving proper names click on the Next button we can find Test Connection button click on the Test
Connection button to check the connection is success or not.
General Page 33
Step 6: This is the last step in JDeveloper configuration, set the JDeveloper default Project Properties. Go to
Tools Default Project Properties. The same scenario is shown in the below figure:
After selecting Default Project Properties from Tools menu, in the highlighted Project Properties extract
Oracle Applications and select Run time Connection.
The same scenario is shown in the below figure:
General Page 34
General Page 35
Previous Unit
Mark this Unit Complete
Next Unit
General Page 36
To Create a page in Oracle Apps Framework (OAF) we need to follow six steps listed as:
i) Create .JWS ( Java Work Space )
ii) Create .JPR ( Java Project )
iii) Create BC4J for AM ( Application Module )
Step 1: Open JDeveloper, after opening we will find Application Navigator if not then select it from View ->
Application Navigator ( ctrl + shift + A ). Right click on Applications and then select New OA Workspace, the
same scenario is shown in the below figure:
Now give the File Name for Java Work Space, for example Welcome as shown in the below figure:
After giving File Name click on the OK button. After clicking on OK button button we can see Welcome
window to Oracle Applications Project Wizard.
General Page 37
Click on Next button, then we can see a window which asks for Project Name, give the project name for
example Welcome PRJ, Give the Default Package, for example
newtonapples.oracle.apps.po.welcomeprj.webui.
Click on Next > button, again click on Next > button then we can see. In Step 3 of 3 of Oracle Applications
Project Wizard we can see Connection details and Responsibility details which we added early in JDeveloper
Configuration Steps.
Click Next > and then Finish.
Step 2: After creating WorkSpace and Project we can see the +Welcome Project structure below to
Applications. Extract project (Welcome) and WorkSpace then we will find three folders namely
1. Application Sources
2. Resources
3. Web Content
Now, Create New Application Muduleby giving Right click on Resources you can select an option called New
Application Mudule
The same scenario is shown in the picture format:
General Page 38
Click on Next so that we will see Create Application Module as shown below. In the below figure observe
that we not yet changed the package name and also not specified the name for Application Mudule. Extends
we can see in extensions chapters.
If we observe in the above figure we not yet changed the package name for Application Mudule (AM). To see
the package structure we can see in the chapter BC4J file structure. So now we need to change the package
General Page 39
the package structure we can see in the chapter BC4J file structure. So now we need to change the package
name from webui to server and give name for the Application Module.
For example:
Click on Next > Button we will see Create Application Module Step 2 of 4 window no need to do any
changes here keep as it is and click on Next > Button again.
After clicking on Next button we will see Create Application Module Step 3 of 4 window here to no need
to do any changes simply again click on Next > button to move to another step.
After clicking on Next button without any changes we can see the below window and make sure that
Application Module Class:<nameof AM+impl> Generate Java File(s) check box must be checked. By default it
is checked if not just click on the box to Check.
General Page 40
Click on Next > button again or even we can click on Finish button here.
Step 3: Now we need to create a page and attach it to the Application Module (AM). Let us see how to create
a page and how to attach it to the AM step wise:
Creating a Page
To create a page Right click on Resources and select New (ctrl+N) as shown in the below picture:
General Page 41
After selecting New option a New Gallery window gets open and left side in Categories extract Web Tier and
select OA Components after selecting OA Components from Web Tier select Page from Items list. The same
similar kind of scenario is shown in the below figure:
Click on OK button after selecting Page from the Items list, after that it will ask for the details of the page give
the name of a page and just check the Package generally no need to change. Click on OK button after giving
Name.
After that a page will be created with the given name. Check the Applications Navigator structure, Extract
Application Sources Folder, extract the Package and also extract Project, server, webui we can see the names
of AM, Page , and Project what we created, in the below figure PO is the Application short name of the ->
Purchasing, Vision Operations (USA).
General Page 42
Step 4: Now we need to attach page to the AM, for that follow the following steps:
Change the ID value in the Property Inspector (note that the 3rd step is not mandatory if we want we can
ignore it as of now)
Select BC4J in Property Inspector and then select AM Definition click on the icon
General Page 43
Now the last step is running the Program to see the output for that select the .xml page name Applications
Navigator and then Right Click on .xml page ( for example WelcomePG.xml ) and then later select Run (
)option.
General Page 44
The output of our page is as follows, have a look in to the below picture:
Previous Unit
Mark this Unit Complete
Next Unit
General Page 45
Step 1:
If we want to know the path where exactly the OA_MEDIA directory exists in Sever, Open a third party tool
which connects to the Sever in command prompt like Putty connection manager.
Type the following command in putty:
cd $OA_MEDIA
After that now type the following command which shows the path were exactly the OA_MEDIA directory
exists.
pwd
(Present Working Directory)
Step 2:
Now move the Image from the desktop system to the sever using putty or using other graphical user
interface tool like WinSCP.
Step 3:
Open the page which is already created ( example Welcome Page ), here we are taking the Welcome page
which is already created in the previous chapter.
Select the .xml page from Applications Navigator, and we know that we can see the page structure after
selecting .xml page if you didnt find the page structure then use the keyword Ctrl+Shift+s or go to View ->
Structure to select the Page structure palette.
In the page structure select CorporateBrandingImage.
General Page 46
In the Property Inspector of corporateBrandingImage we can see Image URL in Visual field as shown in the
below figure:
General Page 47
just remove the .gif file name and give the appropriate name i.e,. give the logo name which ever is move to
OA_MEDIA directory. For example look into the below figure:
Note that still now we not yet moved our sample or welcome page to the Oracle Apps Server instance so
there fore if we run the program then we cannot see the logo. To see the corporate branding image locally
move the image to the folder OA_MEDIA so that we can see the corporate branding image in OAF pages.
the OA_MEDIA folder will be available in the following path
<patchfile_folder>\jdevhome\jdev\myhtml\OA_MEDIA
Now run the page so that we can see our Corporate logo in the OAF Pages as shown below:
General Page 48
After that select the item which we created just by clicking or selecting item, Property Inspector will be
highlighted in the Property Inspector select Item Style as image as shown in the below figure:
General Page 49
highlighted in the Property Inspector select Item Style as image as shown in the below figure:
Now after selecting Item Style as image now select the visual field in properties and give the image path
which you want to display in Image URI field as shown in the below figure. Note that we need to move the
image as usually to the respective OA_MEDIA folder/Directory.
Run the page and see the output we can find the images as shown below:
General Page 50
Previous Unit
Mark this Unit Complete
Next Unit
General Page 51
By default JDeveloper takes it as a Header region. We got different types of regions available in the
JDeveloper, which are:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
advancedSearch
advancedTable
bulletedList
cellFormat
contentContainer
contentFooter
defaultDoubleColumn
defaultFormStack
defaultSingleColumn
defaultStack
flexibleLayout
flowLayout
gantt
graphTable
hGrid
header
hideShow
hideShowHeader
labeledFieldLayout
messageComponentLayout
navigationBar
pageButtonBar
popUp
query
rowLayout
shuttle
stackLayout
sub TabLayout
switcher
table
tableLayout
train
tree
General Page 52
Give some text in Visual -> Text:, for example Header Region text field as shown in the below figure:
Run the page after giving Text field value and see the output the output will look like:
In the output observe how the Header Region is appearing and how it looks like we will discuss some
important regions which we generally use in OAF pages in the coming chapters.
General Page 53
General Page 54
attachmentLink
attachmentTable
button
exportButton
flex
formParameter
formValue
formattedText
image
link
messageCheckbox
messageChoice
messageDownload
messageFileUpload
messageInlineAttachment
messageLovChoice
messageLovInput
messageRadioButton
messageRadioGroup
messageRichTextEditor
messageStyledText
messageTextInput
rawText
resetButton
richContainer
richTextEditor
separator
serveletInclude
spacer
staticStyleText
submitButton
tip
urlInclude
General Page 55
33. urlInclude
Similarly create one more item in the header region, and for item2 in the properties give prompt ( example
Header Region Item2 : ). So therefore the page structure looks like:
Now create one more item but create it on the pageID so that let us see how the items are going to be
displayed in the output, note that we dont know how the items appear in the page at design time and how
the output looks like.
Right Click on the pageID of page structure and then select New -> Item as shown in the below figure:
After that for the created item3 in Property Inspector give the promt (for example Item1 in the Main
General Page 56
After that for the created item3 in Property Inspector give the promt (for example Item1 in the Main
page : )
The same thing is shown in the below figure:
Now run the page and see how the page looks like.
The output of the page will look like the following, and observe how the items are displaying in header region
and how they are looking out of header region.
General Page 57
Previous Unit
Mark this Unit Complete
Next Unit
General Page 58
Steps to follow:
1. Create a page first, see the chapter Welcome Page Creation to see how to create a page.
2. Create the region and four items in the region, we can see the creation process of Regions and Items in
previous chapter.
3. Create the controller and write the Java Code.
Here I am taking the page which is already created and adding a region with region style as message
Component Layout .
After adding Region under region here we are creating four items and Item style of all the four items is
message Text Input .
After adding Region and Items the page structure will look like:
General Page 59
Now we need to create a Controller, let us see how to create a controller in JDeveloper (OAF).
Best practice is to create the controller Globally so that it should be applicable to all the child regions.
Right Click on the Main Region and then select Set New Controller
After choosing Set New Controller, one dialog box window opens and it shows some default package and also
some default name, in Package name at last generally we will find .webui.webui change it to single webui
i.e,. nothing but remove one webui from the default package name, for example assume the defualt pakcage
is as follows:
newtonapples.oracle.apps.po.welcomeprj.webui.webui
change it to
newtonapples.oracle.apps.po.welcomeprj.webui
If you want to know why webui is there at end means you can see the BC4J file Structure lesson which
displays the file structures.
give the class name and we know that every controller ends with CO. For example give the controller name as
WelcomeCO as shown below:
Click on OK button after giving Class Name and also after deleting one webui from the package. Now if you
observe Applications Navigator structure controller is created under webui. Select the controller
(WelcomeCO.java) and see the java program how it looks.
In the java program WelcomeCO class is created which is extending OAControllerImpl which contains main
method.
We can also see two methods namely
1) public void processRequest(OAPageContext pageContext, OAWebBean webBean)
the above method is used whenever we want any logic to be implemented before the page gets loaded. It
means while loading a page if we want to display (or) perform any business logic then we go for
processRequest.
General Page 60
Look at the below figure we declared four variables of type String and if you observe for number/id values we
are just converting those values into the string. In the OAPageContext we will be having some defined values
which we can access as shown in the below figure using notation dot (.) we will get all the available values
and then we need to choose the required one.
pageContext is nothing but the variable name of the OAPageContext (OracleApps page Context), if you
observe to declared four variables we assigned values respectively.
Now after declaring variables and assigning values to the variables, we need to search for a items in our page,
if you observe we created four items item1, item2, item3, and item4. So therefore to find the items in the
page we need to use the bean as follows:
Here in this lesson we are not providing access to copy and paste the code of java, because whenever we are
typing code JDeveloper prompts us to import the packages automatically. For example look at the below
figure whenever we start typing, JDeveloper prompts us to click on Alt-Enter so that we can import the
required package. It just saves our typing time of importing a package.
General Page 61
After clicking on Alt-Enter it displays the packages list then choose the required import package. Here we are
typing OAMessageTextInput it is a bean if you observe we used item style as MessagetextInput we are just
adding OA (OracleApps) at the beginning and Bean at last which gives our Bean name. Now look at the below
figure which shows the imported package name:
If you observe first we initialized a bean and at the time of initialization we also need to import the respective
package and hence now we know that how to import automatically the required package. After that declare
a variable and we used java typecasting process here .
Every item has its own id so we used id value of the item to find the required item in the page.
Similarly write the code to find all the items in the page which we created.
Now after finding the items in the page we need to assign values which we got using pageContext into the
respective items. It means we need to set a value for each item in the page and for that we use the line code
as follows:
General Page 62
Similarly set values to all the items and after that the code looks like:
Rebuild the program after finishing the code, just Right click on the code area and then select Rebuild option
or we can also use a short cut code Alt+Shift+f9. Same scenario is shown in the below figure:
General Page 63
After successfully rebuilding the java program Run the page and see the output. The output of the page
which we created is as follows:
Previous Unit
Mark this Unit Complete
Next UnitInserted from <http://newtonapples.com/start-course-page/>
General Page 64
First create one Project which we learned in previous chapters like Welcome Page creation.
After creating a page, go to page structure and select region after selecting region right click on the region
and then select New-> Region. Now a region will be created under a page region.
After creating region change the region style to MessageComponentLayout in the property Inspector as
shown in the below figure:
Observe the property inspector and in the visual we added 1 to the rows and 3 to the columns, to see how
this rows and columns effect. See the output and observe the items how they are placed by JDeveloper
automatically, for that first create items under MessageComponentLayout region, here we created 5 items
General Page 65
automatically, for that first create items under MessageComponentLayout region, here we created 5 items
under the message component layout region and then after creating see the structure of the page how it
looks like:
Give the prompt names to each items and remember here we are taking item style as messageTextInput
for all the items, run the page and see the output to see how the items are placed in message Component
Layout region:
Follow the next lesson which shows Header Region how it looks like.
Have Questions ? Ask in the Unit Forums
Previous Unit
Mark this Unit Complete
Next Unit
General Page 66
- Header Region
Friday, December 05, 2014
4:45 PM
Header Region
In previous lesson we learned how the Message Component Layout region looks like and how to create it,
now using the same page here in this lesson we are going to see how the Header Region looks like and what
are the properties available in the Header region in JDeveloper.
Select the region style as Header and if we observe in the visual area we can provide Text, give some text like
Header Region and while when comparing this header region with the message component layout region we
can observe that in message component layout region we don,t have a option to provide Heading text where
as in Header region we can provide headings but item control is not there like rows and columns in
MessageComponentLayout Region.
The below figure shows the property inspector of Header Region just have a look:
Now after creating Header region create three items with Item Style as MessageTextInput:
v
General Page 67
Similarly create two more items to see the items arrangement in Header Region, and note that for all the
items the item style is MessageTextInput.
After creating three items the structure of the page looks like the following:
General Page 68
Now run the page and see the output here we can identify the difference between Header region and
MessageComponentLayout region:
Previous Unit
General Page 69
Select region style as rowLayout in the Property Inspector, and if we observe the Property Inspector we
have Horizontal Alignment and Vertical Aligment .
Center, End, Left, Right, Start are the available alignments for Horizontal. By Default , Default is the alignment
type which is nothing but works as Start Alignment.
For Vertical Alignment Bottom, Middle, and Top are the available alignments.
The below picture shows the property inspector of Row Layout Region:
General Page 70
After creating RowLayout region create four items under the rowLayoutRegion and also give prompt names
for each created items under RowLayout region.
Now run the page and see the output, it displays all the items in single row.
The below figure shows how the output looks like and also observe that in the below figure how the items
are placed in MessgeComponentLayout region and Header Region along with the Row Layout region.
Previous Unit
General Page 71
Previous Unit
Mark this Unit Complete
Next Unit
General Page 72
First create one page in the project and then under the main page region create one new region.
Right click on the main region, select New -> Region.
The below figure shows the Property Inspector of Default Double Column:
General Page 73
Now after creating Default double Column region create three items under Default Double Column region
and note that all the items the Item Style is messageTextInput and give some prompt name for all the created
items.
After creating items under the default Double Column region the page structure look like the following which
shows Default Double Column region and along with also shows items structure of Message Component
Layout region , Header Region , and Row Layout region.
General Page 74
Previous Unit
General Page 75
Here we are taking the page which we created in the previous chapters. After creating the region select the
Region Style as DefaultSingleColumn, the below figure shows the Property Inspector of Default Double
Column.
Create three items under Default Single Column region and also give prompt names to each
MessageTextInput items created.
After creating three items and giving prompt names, run the page and see the output how the items in the
Default Single Column region are displayed.
In the below figure if you observe we can see the difference between other regions along with the Default
Single Column.
General Page 76
Previous Unit
Mark this Unit Complete
Next Unit
General Page 77
General Page 78
After creating region with Region Style as Page Button Bar, create two items under the region and select
Item Style as SubmitButton.
Now after creating items under the Page Button Bar region, run the page and see the output we can see in
the output items will be displayed on top and bottom of the page. Look at the below figure which shows the
look of output and also it shows how the items in the other region are placed:
General Page 79
Previous Unit
Mark this Unit Complete
Next Unit
General Page 80
- Query Region
Friday, December 05, 2014
4:49 PM
Query Region
In this lesson we are going to see how the Query Region is going to look in OAF page and what is the use of
the Query Region in OAF.
So therefore we are going to see how to create this Query region in the next coming chapter called Search
Pages in OAF.
Previous Unit
General Page 81
- Text Input
Friday, December 05, 2014
4:49 PM
Text Input
In this chapter we are going to learn how to create Items and we will see some items in the OAF page how
they look.
We already seen in previous chapter that how many items are available and how to create a item.
Here we are going to see different types of items in OAF how they appear in the page.
Create two Message Text Input items under Message Component Layout Region and give prompt names to
each item.
To make the item required one in the Property Inspector select showRequired and make to True so that the
items become required field.
General Page 82
Previous Unit
Mark this Unit Complete
Next Unit
General Page 83
If we want a read only text in OAF output page then we can go for an item with Item Style as Message Styled
Text.
First create One Region (Message Component Layout Region) and then now create two items.
Select Item Style as Message Styled Text in Property Inspector (or) if we are using Message Component
Layout region then select New -> MessageStyledText.
Create two items for example and give some prompt name. Run the page and see the output:
General Page 84
Previous Unit
Mark this Unit Complete
Next Unit
General Page 85
For the Message Check Box check the Property Inspector and we have some features like as follows:
Data:
Initial Value : Assigns a default value give this value to Y so that the check box will be checked by default.
Checked Value : This values will be assigned whenever the check box is checked.
Unchecked Value : Value when the item is not checked.
Initially Checked : If we want a value to be checked initially (automatically) then make this value to True.
The following figure shows the Default Data values for the second check box with prompt name as Check
box two.
General Page 86
Previous Unit
Mark this Unit Complete
Next Unit
General Page 87
Let us see one small example how to create a Radio Button Items in the page:
Step 1: Create a page and create one Message Component Layout region in a page. Under the region create
four items and select the Item Style as messageRadioButton . Example see the below figure:
Step 2: Now after creating Radio Button items give Id values to each items created and assign Prompt name
which ever you wish to display for the radio button.
Step 3: Set the checked value and unchecked value to each radio button in the Property Inspector.
Step 4: If we want radio buttons to behave as a group then we must programmatically assign them all the
same name by calling setName() for each radio button.
First create one controller and write the program in the processRequest().
General Page 88
General Page 89
The below figure shows output of the program which shows additionally other items too rather than radio
buttons:
General Page 90
Previous Unit
Mark this Unit Complete
Next Unit
General Page 91
- Message Choice
Friday, December 05, 2014
4:51 PM
Message Choice
In this lesson we are going to learn how to create Message Choice item in the OAF page.
The bean for message choice item is OAMessageChoiceBean.
Step 1: First create Item in the page and select Item Style as MessageChoice in Property Inspector.
Step 2: After creating the page create the VO (View Object) in respective BC4J and attach VO to AM
(Application Module).
Creating VO process:
Right Click on Resources folder of project and then select New View Object as shown in the below figure:
General Page 92
Click on Next button so that first step to create a VO will come and in that :
Package : Select the proper package name which we created for a project.
Name : give the name to the VO note that all the View objects ends with VO.
Step1 of VO in OAF
General Page 93
General Page 94
Click on Next button without any changes so that we can see the Query area to enter SQL query to retrieve
the data, write the SQL Query in the Query Statement
After writing the Query statement check whether the written Query is valid or not by clicking on Test so that
if the query is valid then it shows a message that Query is valid. After that click on Next button.
General Page 95
Attribute mappings in VO
Click on next button to step 8:
General Page 96
Attaching VO to AM:
Edit the AM which we created in the project, right click on AM and then select Edit <AM Name> as shown in
the below figure:
Attaching VO to AM in OAF
Select Data Model, extract the package in which VO is created select the VO after selecting the proper VO
click on the Greaterthan arrow symbol which is shown in below figure:
General Page 97
VO attachment to AM in OAF
After that we can see the VO is attached to the AM as shown in the below figure:
Attaching VO to AM
Click on Apply button and then on OK button so that the attachment process of VO to AM is over.
General Page 98
General Page 99
Previous Unit
Mark this Unit Complete
Next Unit
- Submit Button
Friday, December 05, 2014
4:52 PM
Submit Button
In this lesson we are going to see how to create submit button in OAF page.
Here in this lesson we are going to see how to create Submit button Item in Message Component Layout
region, note that we cannot create Submit button directly in Message Component Layout Region for that first
we need to create Message Layout as shown in the below figure:
Previous Unit
Mark this Unit Complete
Next Unit
Previous Unit
Mark this Unit Complete
Next Unit
- Image Item
Friday, December 05, 2014
4:53 PM
Image Item
We already seen that how to create a Image in OAF page in previous lesson.
In this lesson we are going to see how to create Item in Message Component Layout region.
Directly we cannot create Image item in Message Component Layout Region, so therefore first we need to
create Message Layout item.
The below figure shows the Image item property Inspector under the Message Layout region:
the Image item property Inspector under the Message Layout region
In the Image URI give the path of the image which you want to display. Run the page and see the output:
Previous Unit
Mark this Unit Complete
Next Unit
What is OAF ?
Structure of OAF
About Model
Application Module
About View
About Controller
Header Region
Query Region
Message Choice
Submit Button
Image Item
SPEL in OAF
Search Pages
Manual Search
Final Code in AM, Update Page, and Patient Entry Page Controller
Extensions in OAF
VO Extension in OAF
AM Extension in OAF
CO Extension in OAF
EO Extension in OAF
Personalization in OAF
BACK TO COURSE
top
Home
About Us
Services
Courses
Course
Contact Us
UBIABCL
Inserted from <http://newtonapples.com/start-course-page/>
Here we are creating one Message Text input item and three submit buttons each button will display
different messages.
Now run the page and just see the output how it looks, the below figure shows the sample output and if we
observe there is no gap between Submit Buttons and Message Text Input Item.
Now to create a space between buttons and items we have one item called spacer. Create two items under
Message Layout and select Item Style as spacer and in Property Inspector give width as 10.
Click on the spacer item hold it and drag it between the Submit Button items, in Message component Layout
region directly we cannot create spacer item so there fore create one message layout hold that item and
place between Message Text Input item and Message Layout Item which is created early.
Now under the second message Layout item create one item with Item Style as spacer and give height as
10 in Property Inspector.
Create the controller under the main region and write the code logic in process Form Request.
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
if(pageContext.getParameter("item3")!=null)
{
String name=pageContext.getParameter("item6");
throw new OAException(name,OAException.ERROR);
}
if(pageContext.getParameter("item4")!=null)
{
String name=pageContext.getParameter("item6");
throw new OAException(name,OAException.CONFIRMATION);
}
if(pageContext.getParameter("item5")!=null)
{
String name=pageContext.getParameter("item6");
throw new OAException(name,OAException.WARNING);
}
}
In the above code item3, item4, item5 are the id values of the Submit Button items with prompt Exception,
Confirm, Warning. Item6 is the id value of Message Text Input item.
Previous Unit
Mark this Unit Complete
Next Unit
What is OAF ?
Structure of OAF
About Model
Application Module
About View
About Controller
Header Region
Query Region
Message Choice
Submit Button
Image Item
SPEL in OAF
Search Pages
Manual Search
Final Code in AM, Update Page, and Patient Entry Page Controller
Extensions in OAF
VO Extension in OAF
AM Extension in OAF
CO Extension in OAF
EO Extension in OAF
Personalization in OAF
BACK TO COURSE
top
Home
Home
About Us
Services
Courses
Course
Contact Us
UBIABCL
Inserted from <http://newtonapples.com/start-course-page/>
Previous Unit
Mark this Unit Complete
Next Unit
Follow the steps to display the data in OAF page from the Data Base:
1. Create the page.
2. Create the VO in respective BC4J and attach it to AM.
3. Create the controller and write the logicode in Process Form Request.
To create a VO right Click on the Resources Folder of the project and then select New View Object
To see all the steps that how to create the VO we can see in previous chapter.
After selecting Region Using Wizard then a welcome window will get open as shown below:
After selecting proper AM we can see the VO attached to that AM in the Available View Usages, which is
shown below:
Click on Next button, in Step2 window select Region Style as table, the same scenario is shown in the below
figure:
In the next window we will find all the available attributes and in that select the attributes whichever
required to display.
Click on Next button then we will find a window in that we can change the prompt names if required and also
the style of the item we can change here we are taking all the items as Message Text input types.
After creating Region Using Wizard now create one more item and the Item Style is Submit Button. So that
the page structure looks like the following:
Now create one controller on the main region. Right click on the region1(Main region id) and then select Set
New Controller
Now after creating the controller write the following code in the process Form Request.
if(pageContext.getParameter("item1")!=null)
{
OAApplicationModule am=(OAApplicationModule)pageContext.getApplicationModule(webBean);
OAViewObject vo=(OAViewObject)am.findViewObject("ItemsVO1");
vo.executeQuery();
}
Rebuild the code, run the page and see the output:
Click on the Go button so that it will display the records as shown below:
Previous Unit
Mark this Unit Complete
Next Unit
Now after creating table we need to enter the data into the table for that we know for any kind of DML
operations we need to go for Entity Object in OAF, so now let us create EO on the created table. The
following process shows how to create a EO in OAF.
In this lesson we are going to see how to add data into the Data Base tables.
Now after creating table we need to enter the data into the table for that we know for any kind of DML
operations we need to go for Entity Object in OAF, so now let us create EO on the created table. The
following process shows how to create a EO in OAF.
Creating EO:
Right click on the folder Resources which is under the Project in Application Navigator and then select New
Entity Object as shown in the below figure:
The below figure shows the welcome screen which we will see whenever we click on New Entity Object:
Click on Next Button, whenever we click on next button it shows user name in hide mode and password,
no need to do any changes here because generally we will set project properties, click on ok.
Click on OK button and then in Entity Object give Name for EO and select the proper Package name, in the
Database Objects select the proper table name:
Click on Next button so that we can see the attributes available in the Table (attributes are nothing but the
column names of a table which we selected, here all the columns will be converted into attributes).
Click on Next button where in that window we can set all the attributes and in that select the primary key
value if we are not selecting any attribute as primary key the by default it considers ROWID as Primary Key.
No need to do any changes simply click on Next button to see the step5.
Click on Finish button, so that EO will be created, here our EO name is InsertRecordsEO.
Now after creating EO we need to attach this EO to VO.
Create a new VO, and in step2 select the EO under the package, actually in step2 it prompts us to select EO.
The same scenario is shown in the below figure:
Click on Next button to see the step3 and in step3 now we can see all the available attributes of EO.
In step3 we need to select all the attributes which we want to include, after that click on next button and
in step5 we can see the Query generated, if we want any changes to made in that query then click on
Expert Mode which is unchecked, whenever we click on Expert Mode then the Generated Statement will
be highlighted so that we can modify the query if required:
Click on Next button and finish the VO creation, and now the EO is attached to VO.
After creating VO and attaching EO to VO now we need to attache this VO to AM for that edit the AM as
shown in the below figure:
After editing AM extract the proper package name of our project in that we can see the VO select that VO
and then click on > (Greater than symbol) arrow so that VO will be attached to AM, click on Apply button
and then OK button.
Select the page attach AM to the page and give Window Title and Title in the Property Inspector.
Under the Main region create One Message Component layout region create five Message Text Input Items
and one Submit Button, and one more reset Button.
Give Prompt names to all the items which are created accordingly, like :
item1 (Message Text Input item)
item2 (Message Text Input item)
item3 (Message Text Input item)
After creating items now the page structure looks like the following:
Select each Item and then for each Message Text Input Items select View Instance and View Attribute. The
following pictures shows the selection process for one item.
Note that Data Type and Maximum length must be mapped properly to each item.
Selecting View Instance for an item click on view instance then click on the icon
so that the following window will get opens and then in that select the View Instance.
After selecting View Instance select View Attribute and then click on the icon
so that one window will get opens and in that select the proper attribute.
Now select the AM java program, the scenario is shown in the below picture:
Now create one new method in the AMImpl class, here the method name is InsertRecord, write the
following code in the AMImpl class :
public void InsertRecord()
{
InsertVOImpl vo= getInsertVO1();
OADBTransaction trans= getOADBTransaction();
vo.executeQuery();
Row v_row;
v_row = (Row)vo.createRow();
vo.insertRow(v_row);
}
In process request of Controller initialize the AM the following code shows the initialization process of AM
in controller.
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
InsertRecordsAMImpl am=(InsertRecordsAMImpl)pageContext.getApplicationModule(webBean);
am.InsertRecord(); /* Name of the method which we created in AM */
In the Process Form Request now we need to write the code for the item Save or Add prompt button so
that whenever we click on that button the data will be added into the table.
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
InsertRecordsAMImpl am=(InsertRecordsAMImpl)pageContext.getApplicationModule(webBean);
if(pageContext.getParameter("item6")!=null)
{
am.getOADBTransaction().commit();
throw new OAException("Employee Created sucsessfully",OAException.CONFIRMATION);
}
Now rebuild the code in AM and in Controller and run the page to see the output. Enter the data and click
on Add button to save the entered data into the table.
Previous Unit
Mark this Unit Complete
Next Unit
line8:-Ignore Messages: It will restrict the messages to not to carry from one page to another.
In this chapter we used displaying data of employees information which are entered in Data Entry page of
previous lesson, if we want to see the employees information then we need to click on the button Get
Employee Information and to create a new employee we need to click on Create Employee button.
The page structure of the Project what we are using now contains one main region and under it One Table
Using Wizard Region, two submit buttons. The following figure shows the page structure:
If we run the page after creating VO and executing that VO whenever we click on the Get Employee
Information then the output looks like the following:
If we observe in the output whenever we click on the Create Employee button it must take us to the Create
Employee page which we created and seen in previous lesson.
Whenever we click on the Create Employee button then only it must take us to the Create Employee page
so for that we need to write the code in the processFormRequest of controller and the code in
processFormRequest is:
if(pageContext.getParameter("item3")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/xxapples/oracle/apps/po/insertingrecords/webui/InsertDataPG",
null,
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
In the program item3 is the id value of the Create Employee button. When we rebuild the code
and run the page then the output looks like the following:
Now after clicking on the Create Employee button it leads us to Create Employee page:
Previous Unit
Mark this Unit Complete
Next Unit
What is OAF ?
Structure of OAF
About Model
Application Module
About View
About Controller
Header Region
Query Region
Message Choice
Submit Button
Image Item
SPEL in OAF
Search Pages
Manual Search
Final Code in AM, Update Page, and Patient Entry Page Controller
Extensions in OAF
VO Extension in OAF
AM Extension in OAF
CO Extension in OAF
EO Extension in OAF
Personalization in OAF
BACK TO COURSE
top
Home
About Us
Services
Courses
Course
Contact Us
UBIABCL
Inserted from <http://newtonapples.com/start-course-page/>
- SPEL in OAF
Friday, December 05, 2014
5:01 PM
SPEL in OAF
SPEL stands for Simplest Possible Expression Language.
SPEL is used to carry the values dynamically. SPEL will get the value dynamically at runtime. SPEL is the
Boolean Value (True / False).
Now let us see the previous chapter output which shows the Employee Information when we click on Get
Employee Information button now the same output we are adding one image icon so that it appears to each
and every row as shown in the below figure:
Now we will see the process how to add edit image for each row in a table. For that first we need a page
structure as follows:
In the above page structure we created a region Using Wizard and the region style is Table. Item1 is the
submit button whenever we click on the Submit Button(Get Employee Information) it displays the employee
information as shown in the below figure:
Now go to the table region, right click on the table region select New -> Item.
Now run the page and click on the button Get Employee Information so that the output looks like the
above picture what we have seen early.
Now whenever we click on the image item then it must show us the information in different form, for that we
need to write the following code in processFormsRequest of controller:
if("Edit".equals(pageContext.getParameter(EVENT_PARAM)))
{
pageContext.setForwardURL("OA.jsp?page=/xxapples/oracle/apps/po/insertingrecords/webui/InsertDataPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
In IF condition Edit is the Client Action Event Name which we have given. The remaining code logic is same
which we used in previous chapter takes us to create employee page but here we need to carry the data to
that page rather than creating employee.
To achieve these requirement we need to create a spell, keep continue reading so that we will come to know
how to create a SPELL in OAF.
SPEL creation in OAF, we know the syntax of SPEL now we need to create a SPEL for the image item in a table.
${oa.EmployeeSearchVO1.Empno}
EmployeeSearchVO1 is the name of the VO which is used to get the details of employees.
Empno is the primary key value (attribute name)/ column name of the table in view.
Now we need to pass the above spel to image, for that select the image and then in Property Inspector,
Client Action -> Parameters
Once we click on the icon a Parameters window will get open in that, click on Add Parameters button and
then give some name (example pempno) in the value pass the SPEL what we created
( ${oa.EmployeeSearchVO1.Empno} ). After giving name and passing SPEL value in the Value field click on OK
button.
Now we need to call this parameter in the Create Employee page CO because whenever we click on the
image item in the table list showing employee details it takes us to the Create Employee Page but it will not
carry any values here our task is to carry values.
So therefore we need to write the code in processRequest of the controller class of Insert Employee details
page. The code is as follows:
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
BharathAMImpl am=(BharathAMImpl)pageContext.getApplicationModule(webBean);
if(pageContext.getParameter("pempno")!=null)
{
String hid = pageContext.getParameter("pempno").toString();
String whereclause = "EMPNO='"+hid+"'";
am.getEmployeeCreateVO1().setWhereClause(null);
am.getEmployeeCreateVO1().setWhereClause(whereclause);
am.getEmployeeCreateVO1().executeQuery();
}
else
{
am.InsertEmployeeRecord();
}
}
Now rebuild the code, rebuild the pages run the Employee Information Page, click on the Get Employee
Information button and then click on the image item which is displayed on each available rows so that it
takes us to create employee page but here it carries the row values. The sample output is shown in the below
figure:
Previous Unit
Mark this Unit Complete
Next Unit
- Search Pages
Friday, December 05, 2014
5:01 PM
Search Pages
In this chapter we will see how to create search pages in OAF and how many different types of search pages
are there in OAF.
Automatic Search
Result Base Search
Manual Search
Automatic Search is again divided into two types:
1. Inline LOV
2. External LOV
Automatic Search and Result Base Search will take care by the Query Region where as for Manual Search we
have to write the condition manually.
We will see in the coming chapters how to create the search pages in Oracle Apps Framework.
Have Questions ? Ask in the Unit Forums
Previous Unit
Mark this Unit Complete
Next Unit
Step3: Under the main page create new item and select item style in property Inspector as
MessageLOVInput.
We can find List of Values region under Message LOV Input item.
Right click on the List of Values region select New -> Table Using Wizard
Here we can create Table Style region only we cannot change the region style to another one.
See the below image it shows that how the page structure will look now:
Select the FirstName item under the table region and then in the property Inspector of that item check that
in the Functional, Search Allowed is set to True.
Step4: Select LOV Mappings in the structure of Message LOV input after that do the following changes in the
property inspector of lovMap1.
Functional:
LOV Region Item : FirstName (the item to display in the LOV region)
Return Item : item1 (the item to return)
Criteria Item : item1 (criteria item works like in where condition value)
Run the page and see the output. The first page of the output looks like the following:
Check the Radio Button of which employee you want to choose and then click on Select button or use Quick
Select option to select the name which is required.
After choosing the name it will display in the Message Text Input item as follows:
Previous Unit
Mark this Unit Complete
Next Unit
Step1: Create Workspace, project , AM and create one page assign AM to the page give page title and
window title.
For example :
workspace name : externlallov
Project Name : ExternallovPRJ
package name : externallov.oracle.apps.po.externallovprj.webui
AM name : ExternallovAM
AM Package name: externallov.oracle.apps.po.externallovprj.server
Step2: Right Click on the project select new as shown in the below picture.
After selecting new option we will see a gallery window in that extract web tier in categories select OA
Components and then select Region in items list.
After selecting region click on ok button so that a window will get open in that
Name : Give any user defined name
Package: Select the proper package of the project.
Style : select style as List of values.
Step3: Create on VO under the lov package for example select the package name as follows:
externallov.oracle.apps.po.externallovprj.lov.server
VO Name is : externalLOVVO
Query in the lov is :SELECT FULL_NAME FROM PER_ALL_PEOPLE_F
The below image shows how the Application Navigator and page structure of the project looks like:
Step6: Under the Message LOV input region create on table region using wizard. In the table region select
the proper package name and then as we attached our VO to the AM it will display our LOVVO so select that
VO and therefore a table region will be created with one item under it.
Step7: Select the Message LOV input item and in the Property Inspector of Message LOV input select External
LOV as shown in the below figure:
Click on the Browse button and then select the proper package name for example see the below picture:
Click on the search button and then select the fully qualified name in the search results for example see the
below picture:
Click on OK button so that JDeveloper asks for confirmation in that click on OK button.
Step8: Run the page and see the output. The following three images shows the output and its work process
Select any value whichever you want to select. Use Quick select or radio button process:
Previous Unit
Mark this Unit Complete
Next Unit
Step1: Create Workspace, project , AM and create one page assign AM to the page give page title and
window title.
For example :-
Step2: Create new VO in respective BC4J, generally List of Values ends with VO and the example BC4J path is:
Package (BC4J) : xxresultbasesearch.oracle.apps.po.inlineprj.server
VO name : ResultBaseSearchVO
Query in the VO is:
SELECT PERSON_ID,
FULL_NAME,
DATE_OF_BIRTH,
KNOWN_AS,
NATIONALITY
FROM PER_ALL_PEOPLE_F
After creating Query Region in main region select the Query Region property Inspector and in Property
Inspector select Construction Mode as Result Base search as shown in the below figure:
Now in the page structure select the Query region, right click on the Query region select New -> Region Using
Wizard
Select Proper Application Module in the first step of creating region as show in the below figure:
In step2 select the region style as Table as show in the below image:
In step3 select the attributes of VO which you want to display in the output.
Step5:- Run the page and see the output, if we observe in the output the Query region creates automatically
Go and Clear buttons.
Click on GO button to see the resultant output as shown in the below picture:
Previous Unit
Mark this Unit Complete
Next Unit
What is OAF ?
Structure of OAF
About Model
Application Module
About View
About Controller
Header Region
Query Region
Message Choice
Submit Button
Image Item
SPEL in OAF
Search Pages
Manual Search
Final Code in AM, Update Page, and Patient Entry Page Controller
Extensions in OAF
VO Extension in OAF
AM Extension in OAF
CO Extension in OAF
EO Extension in OAF
Personalization in OAF
BACK TO COURSE
top
Home
About Us
Services
Courses
Course
Contact Us
UBIABCL
Inserted from <http://newtonapples.com/start-course-page/>
- Manual Search
Friday, December 05, 2014
5:04 PM
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
Step 3:- The below picture shows the requirement so there fore we need to create a page to achieve the
requirement.
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.
step 4: Create one region using wizard and select region style as Table, select proper package name in which
we created VO (ManualsearchVO).
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)
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.
Give some text in any Text input field and click on go button.
Previous Unit
Mark this Unit Complete
Next Unit
Project Requirement:
1. Every patient who is coming to clinic for checkup we need to create one OAF page through which we will
enter the details of the patient.
2. We need to create another page which shows the details of the patients it means this page is just a search
page.
3. One more page is for updating the patient entered details.
The following image shows the sample design format according to that we need to design our OAF page.
We guess every field what is there in the design page we know all are patient Details.
Only one field Review is what we need to know here, for every patient who come for initial checkup for him
the next two visits with in 10 days is free of cost and first time the patient is considered as new entry. So
there fore for the first time Review Entry is New.
If the patient is going to visit the clinic next time within 10 days then the patient details entered with
separate patient id but in place of Review rather than the new it will be entered as Review1 or Review2 (Rev1
or Rev2).
After entering the patient details the first and main page will be searching the patient details the below
picture shows the search page design format.
Previous Unit
Mark this Unit Complete
Next Unit
What is OAF ?
Structure of OAF
About Model
About Model
Application Module
About View
About Controller
Header Region
Query Region
Message Choice
Submit Button
Image Item
Image Item
SPEL in OAF
Search Pages
Manual Search
Final Code in AM, Update Page, and Patient Entry Page Controller
Extensions in OAF
VO Extension in OAF
AM Extension in OAF
CO Extension in OAF
EO Extension in OAF
Personalization in OAF
Personalization in OAF
BACK TO COURSE
top
Home
About Us
Services
Courses
Course
Contact Us
UBIABCL
Inserted from <http://newtonapples.com/start-course-page/>
AM Name : StrilingAM
Package Name: xxstirling.oracle.apps.po.stirlingprj.server
Now according to the document that is based on MD-050 document we need to create the page structure of
Patient Entry page. The below figure shows the page structure with description of each item and regions.
Run the page and see the output, the below picture shows the output of the page.
Now for every value what we are entering in the field must be saved in the data base and for that we know
that we need to insert data into the table.
Create one table which stores the details of patients in Data Base. The Table with who columns is :
CREATE TABLE XXSTIRLING_PATIENT_ENTRY_TABLE(PATIENT_ID NUMBER(10) PRIMARY KEY,
PATIENT_NAME VARCHAR2(40),
REVIEW VARCHAR2(10),
PHONE_NUMBER NUMBER(15),
SEX VARCHAR2(7),
AGE NUMBER(3),
AMOUNT NUMBER(6),
DATE_CHECKED DATE,
ADDRESS VARCHAR2(40),
--who columns
LAST_UPDATE_LOGIN NUMBER);
Now after creating table we need to create one Entity Object in the project.
Create one Controller on the main region and write the following Radio Button Validation code in the Process
Request of Controller:
OAMessageRadioButtonBean var1 = (OAMessageRadioButtonBean)webBean.findChildRecursive("male");
var1.setName("Gender");
var1.setValue("Male");
After writing the method in AM we need to initialize the AM in the Controller, write the following code in the
process Request of controller:
StirlingAMImpl am = (StirlingAMImpl)pageContext.getApplicationModule(webBean);
am.xxinsertpatient();
After initializing AM and the method of AM in controller, we have to write the validation code for Add button
so therefore we need to write the code in ProcessFormRequest for Add button as follows:
StirlingAMImpl am = (StirlingAMImpl)pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("item3")!=null)
am.getOADBTransaction().commit();
Now rebuild the code in the controller and also rebuild the code in the AM. After successfully rebuilding the
Now rebuild the code in the controller and also rebuild the code in the AM. After successfully rebuilding the
code run the page enter some date and click on Add button so that patient will be added.
Previous Unit
Mark this Unit Complete
Next Unit
For example:
Page Name: SearchPG
Attached AM Name: xxstirling.oracle.apps.po.stirlingprj.webui
The below figure shows the page structure of the Search Page, which contains 3 message Text Input items for
searching and down one table layout region.
Here the search result will be displayed in table format so here we are adding images for update and detail of
the resultant rows in OAF page.
The below figure shows the page structure output of the Search Page:
Still now we just created the page structure but the page is not yet validated properly.
After creating page structure we need to create the Method in AM for search operation, it means if we are
entering patient Id then in the where condition SQL Query must filter the Rows according to the entered
Patient Id related similarly for Patient Name and Patient Phone Number too.
So therefore we need to write a SQL data retrieval Query, create one VO and write the Query in the VO
Qeury area:
VO Name: SearchVO
Package Name: xxstirling.oracle.apps.po.stirlingprj.server
After Creating VO attach VO to the AM. After attaching create method in AM, the following code shows the
java code of creating Method in AM.
if (pc.getParameter("item1")!=null)
{
pid = pc.getParameter("item1").toString();
vo1.setWhereClauseParam(0,pid);
}
else
{
vo1.setWhereClauseParam(0,null);
vo1.setWhereClauseParam(0,null);
}
if(pc.getParameter("item2")!=null)
{
name = pc.getParameter("item2").toString();
vo1.setWhereClauseParam(1,name);
}
else
{
vo1.setWhereClauseParam(1,null);
}
if(pc.getParameter("item3")!=null)
{
phno = pc.getParameter("item3").toString();
vo1.setWhereClauseParam(2,phno);
}
else
{
vo1.setWhereClauseParam(2,null);
}
vo1.executeQuery();
}
Create One controller in Search page and initialize the AM in the SearchPage Controller, note that we already
initialized AM in Patient Entry page Controller. Now we are initializing AM in SearchPage Controller, initialize
the AM in ProcessRequest as follows:
Search Button, Clear Button, and Add New Patient buttons Validation code in Process Form Request is as
follows:
if(pageContext.getParameter("item4")!=null)
{
am.xxSearchPatient(pageContext,webBean);
}
else
if(pageContext.getParameter("item6")!=null)
{
OAMessageTextInputBean mstb = (OAMessageTextInputBean)webBean.findChildRecursive("item1");
mstb.setValue(pageContext,null);
OAMessageTextInputBean mstb1 = (OAMessageTextInputBean)webBean.findChildRecursive("item2");
mstb1.setValue(pageContext,null);
OAMessageTextInputBean mstb2 = (OAMessageTextInputBean)webBean.findChildRecursive("item3");
mstb2.setValue(pageContext,null);
}
else
if(pageContext.getParameter("item8")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
Rebuild the code and run the page the below image shows the search page with results after clicking on
Search Button:
If we observe in the output we created two image items one is for Update and Other is for Details of the
patients. We not yet validated the Edit and Update images.
The next lesson shows how to create Update page and the page structure of the Update page and output of
Update, but for Update the values must be carried so hence we know that to carry values we will create SPEL
in OAF.
Have Questions ? Ask in the Unit Forums
Previous Unit
The update must contain the same details what we are entering while creating or adding patient, so there
fore the same page structure is required for us.
Create one page attach AM to the Page.
After creating the page go to the page structure of the Patient Entry page copy Region2 which is nothing but
Message Component Layout Region and simply paste it in the main region of search page.
After Copying the page structure we can see that same page structure is copied into the new update page
structure so that we can save some time rather than creating each item and changing the view instance and
view attribute and prompt names etc.,
If we observe we not yet created Update Button and after updating Patient details we need to go back to the
other main page, so for that another button need to be created.
Create two submit buttons with some space between the buttons looks good rather than placing them in
conjunction. So create one spacer item between region and one more spacer item between two submit
buttons.
Finally the Update page structure looks like the following image:
Run the page to see the output and for the new created page also we need to attach corporate branding
image.
The update page contains the details which are already entered so we just need to edit only few values or we
need to change only one or two changes like name is spelled wrong, amount entered is not correct or might
be refunded to the patient, etc.,
So therefore whenever on search page if we click on Update Image then it must take us to this update page
along with the details and after making changes we need to update the same row.
First let us write the code to validate the Update button and other button in the page.
Create the Controller in Update Page region, initialize the AM in the process Request of the controller:
StirlingAMImpl am = (StirlingAMImpl)pageContext.getApplicationModule(webBean);
am.xxinsertpatient();
Write the following code in processFormRequest, if you observe the code is similar code for update too like
the way we wrote for patient entry.
if (pageContext.getParameter("update")!=null)
{
am.getOADBTransaction().commit();
throw new OAException("Patient Data Updated Successfully",OAException.CONFIRMATION);
}
if(pageContext.getParameter("item4")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
Previous Unit
Mark this Unit Complete
Next Unit
and another is for seeing the details and the image icon is
Now we need to validate the image items in the result and whenever we click on these image items it must
take us to another page along with carrying the values too, so therefore we need to create SPEL for each
image item and then we have to write the code in processFormRequest of search page controller.
SPEL value of Update icon: ${oa.SearchVO1.PatientId}
Write the following code in ProcessFormRequest of search page controller, continuing the previous code
.....................
.....................
}
else
if("update".equals(pageContext.getParameter(EVENT_PARAM)))
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StirlingUpdatePG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
}
else
if("detail".equals(pageContext.getParameter(EVENT_PARAM)))
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
Now the entire code in the controller class of Search page looks like the following:
if(pageContext.getParameter("item4")!=null)
{
am.xxSearchPatient(pageContext,webBean);
}
else
if(pageContext.getParameter("item6")!=null)
{
OAMessageTextInputBean mstb = (OAMessageTextInputBean)webBean.findChildRecursive("item1");
mstb.setValue(pageContext,null);
OAMessageTextInputBean mstb1 = (OAMessageTextInputBean)webBean.findChildRecursive("item2");
mstb1.setValue(pageContext,null);
OAMessageTextInputBean mstb2 = (OAMessageTextInputBean)webBean.findChildRecursive("item3");
mstb2.setValue(pageContext,null);
}
else
if(pageContext.getParameter("item8")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
else
if("update".equals(pageContext.getParameter(EVENT_PARAM)))
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StirlingUpdatePG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
else
if("detail".equals(pageContext.getParameter(EVENT_PARAM)))
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
Previous Unit
Mark this Unit Complete
Next Unit
StirlingAMImpl am = (StirlingAMImpl)pageContext.getApplicationModule(webBean);
//am.xxinsertpatient();
if(pageContext.getParameter("pid")!=null)
{
String pid = pageContext.getParameter("pid").toString();
String whereclause = "PATIENT_ID='"+pid+"'";
am.getPatientEntryVO1().setWhereClause(null);
am.getPatientEntryVO1().setWhereClause(whereclause);
am.getPatientEntryVO1().executeQuery();
}
else
{
am.xxinsertpatient();
}
OAMessageRadioButtonBean var1 = (OAMessageRadioButtonBean)webBean.findChildRecursive("male");
var1.setName("Gender");
var1.setValue("Male");
/**
* Procedure to handle form submissions for form elements in
* a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
if (pageContext.getParameter("update")!=null)
{
am.getOADBTransaction().commit();
throw new OAException("Patient Data Updated Successfully",OAException.CONFIRMATION);
}
if(pageContext.getParameter("item4")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
}
StirlingAMImpl am = (StirlingAMImpl)pageContext.getApplicationModule(webBean);
if(pageContext.getParameter("ppatientid")!=null)
{
String pid = pageContext.getParameter("ppatientid").toString();
String whereclause = "PATIENT_ID='"+pid+"'";
am.getPatientEntryVO1().setWhereClause(null);
am.getPatientEntryVO1().setWhereClause(whereclause);
am.getPatientEntryVO1().executeQuery();
}
else
{
am.xxinsertpatient();
}
/**
* Procedure to handle form submissions for form elements in
* a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
StirlingAMImpl am = (StirlingAMImpl)pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("item3")!=null)
{
System.out.println("Add button called");
am.getOADBTransaction().commit();
throw new OAException("Patient Data Entered Successfully",OAException.CONFIRMATION);
}
if(pageContext.getParameter("item9")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/SearchPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
else
if (pageContext.getParameter("item11")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
}
}
The code below is the code is the AM Java code, and note that we created only one AM for the entire project.
We created two methods overall in AM and the below code shows the two methods:
Previous Unit
Mark this Unit Complete
Next Unit
For example in our project if we look at the functionality whenever we click on the Detail page all the patient
details are showing but all are showing in Editable format and moreover the add button is also in active stage
whenever we click on Detail image in search page.
So therefore here our requirement and our task is whenever we click on Detail logo all the items and data
must be only in Read only stage and also the Add button must be in Disable mode.
Transient attribute in OAF is nothing but the attribute value which is not in the Oracle Data Base table. We
know that while creating VO all the Columns of table will be converted into Attributes or we call columns as
attributes in VO, so therefore transient attribute is one which we create temporarily to display some results
which will not effect data base tables.
For example Student marks are saved in different columns, but in data base assume that we are not
maintaining any column for total marks sum but if we want the total value to be displayed in OAF form so
therefore for that we will create on temporary or duplicate attribute value to hold total marks.
Let us see how to create transient attribute in OAF according to our requirement.
Edit the VO as shown in the below figure:
Right click on VO and select Edit PatientEntryVO or double click on the VO to open it.
After opening the VO select the Attributes value in left side as shown in the below figure:
After opening the VO select the Attributes value in left side as shown in the below figure:
Select New button which is located down to the attributes list, After selecting New button give new attribute
name, Type as Boolean, and in Updatable select a Radio Button option called Always, for example see the
below picture:
Click on OK button later click on Apply and OK button in View Object so that the transient attribute will be
created.
After creating transient attribute now create one SPEL value basing on patient entry vo, because we need to
do dynamic changes in this page only:
v_row.setAttribute("xxReadOnly",Boolean.FALSE);
}
In the Controller class add the following code, in code ppatientid is the parameter value of detail icon
which we already seen in the previous lessons so additionally we are adding three lines which are:
if(pageContext.getParameter("ppatientid")!=null)
{
String pid = pageContext.getParameter("ppatientid").toString();
String whereclause = "PATIENT_ID='"+pid+"'";
am.getPatientEntryVO1().setWhereClause(null);
am.getPatientEntryVO1().setWhereClause(whereclause);
am.getPatientEntryVO1().executeQuery();
Rebuild the code and run the page and see the output, the below figure shows the search page output and
the second image shows the dynamically changed page which is actually the patient entry page:
Previous Unit
Mark this Unit Complete
Next Unit
Here we are going to see how to move the files into the APPS server.To move files from Desk top system to
Oracle Apps server we need to use third Party tools like Putty, WinScp, etc..
Here we are using both Putty and Winscp, and let us see how to register OAF page into Apps Server.
Step 1: Move all Class files or Java files to respective JAVA_TOP.
If we are moving Java files then we need to compile Java files explicitly in the server using the command
JAVAC <Java_file_name.java>
If we are moving Class files then the compilation is not required, i.e., instead of compilation we can move
class files directly.
Note: The best approach is to move java files into server and compile, so that server side compatibility will be
there.
In linux environment to know where exactly the JAVA_TOP is located type the following command in putty:
cd $JAVA_TOP
After changing the directory type the following command so that we will come to know the path location
where exactly the JAVA_TOP is located:
pwd (Present working Directory)
Example:
/u01/apps1/apps/apps_st/comn/java/classes
Step 2: After finding where exactly the Java top is located move the files into java top, let us see how to move
class files, here we are moving class files to the JAVA_TOP using the WinScp
The below image shows the moving process in WinScp.Drag the folder from left side and drop it on the
linux/unix environment:
Select the folder drag and drop it to the server environment, after that one popup window will come and
click on Copy button:
In the next lesson we are going to see Import script, and why we need import script.
Have Questions ? Ask in the Unit Forums
Previous Unit
Mark this Unit Complete
Next Unit
Let us consider in our project we have one OAF page with the following page link generated:
OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/SearchPG
So for the above search page see the following import script which we need to perform in putty:
java oracle.jrad.tools.xml.importer.XMLImporter
$JAVA_TOP/xxstirling/oracle/apps/po/stirlingprj/webui/SearchPG.xml -username apps -password apps -dbconnection
"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=www.newtonapples.com/old)
(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=vis)))" -rootdir $JAVA_TOP
The above import script is for linux/unix environment but few students might practice in Windows server
environment for them the following is the import script for window server environment:
import D:\Bharath\Softwares\p9879989_R12_GENERIC\jdevhome\jdev\myprojects\xxstirling\
oracle\apps\po\stirlingprj\webui\SearchPG.xml -rootdir ...(your win server apps rootdir)
..\jdevhome\jdev\myprojects -username apps -password apps -dbconnection
"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=www.newtonapples.com/old)(PORT=1521)))
(CONNECT_DATA=(SERVICE_NAME=vis)))"
For each and every page we need to execute the import script in OAF, the below image shows import script
execution process i.e., after writing the import script the following is the confirmation it shows in putty:
Whenever the import script is executed successfully i.e., if the importing file is properly executed then it
shows a message called Import Completed.
In the next lesson we are going to see how to create function, creating menu, and attaching menu to
Responsibility.
Have Questions ? Ask in the Unit Forums
Previous Unit
After selection, then a Function window will get opens, give the Function Name and User Function Name
After that go to Properties tab and in that give Type as SSWA jsp function
After that go to Web Html tab and in that in HTML call give the address bar generated page path dont
give .xml extension.
Give Menu name and function Name, if we want to create Submenus then create one more menu add
function to that and design the menu structure according to the Oracle Applications guidance.
After that create one responsibility (optional) add menu to that responsibility, the below image shows the
responsibility navigation in System Administrator:
Give the values in Responsibility, for example see the below image:
After adding menu to the responsibility attach Responsibility to the User, Bounce the Server.
Clear the Cache using Functional Administrator which is Optional.
The below image shows the example navigation of the Responsibility which contains two sub menus under
one main menu.
Previous Unit
Mark this Unit Complete
Next Unit
- Extensions in OAF
Friday, December 05, 2014
5:10 PM
Extensions in OAF
In this lesson we will see the different types of extensions in OAF (Oracle Apps Framework). We use
extensions if we want to do any changes in the already shipped oracle E-Business suite. The main purpose we
use extensions is to make changes in the already well designed Oracle E-Business suite pages.
We have two types of extensions
1. BC4J Extensions
2. CO Extension
BC4J Extensions are again divided into three types and they are:
VO Extension
AM Extension
EO Extension
You can see in the further chapters how to create extensions in OAF and how the extensions will make
changes in OAF.
Have Questions ? Ask in the Unit Forums
Previous Unit
Mark this Unit Complete
Next Unit
- VO Extension in OAF
Friday, December 05, 2014
5:10 PM
VO Extension in OAF
In this lesson we are going to see how to extend the VO (View Object) in OAF (Oracle Applications
Framework).
Before going to extent the VO let us understand the requirement first. Navigate to the Purchasing, Vision
Operations (USA).
Purchasing, Vision Operations (USA) -> Supply Base -> Supplier User Management -> Supplier User
Creation -> Register Supplier User.
The below image shows the Register Supplier User OAF page which will appear once we select Register
Supplier User option as discussed.
When we click on the Supplier Name search option (LOV) in the above page we will see Supplier Name and
Supplier Number.
So therefore our task is to add Vendor Lookup Code additional column in the search list.
Using Customization we can add a column but we cannot carry data to that created column so therefore we
need to go for extension if we want to carry data along with Supplier Name and Supplier Number. Hence we
have to go for extension let us see how to extent and here the requirement is just to carry data and display it
so therefore we know that using VO we can achieve it and hence no need to perform any DML operation like
INSERT,UPDATE, DELETE.
Step 1: Identify the VO from the page. It means first we need to identify which VO to be extend. Go to about
this page and expand the Business Component Reference Details. For reference look at the below image:
After that select VendorsVO as we know that supplier called as Vendors and their information stores in
PO_VENDORS table. According to the naming convention VO ends with VO after name we can identify.
Click on the VendorsVO so that we can see the query statement used for that VendorsVO, the below image
shows the query of vendorsVO which is used in Register Supplier User OAF page.
Step 2: Identify the page and copy or download it from Application Top.
Note that all the Pages and Regions will be there in Application Top and all the Controller (CO), Application
Module (AM), View Object (VO) will be there in Java Top.
We can identify the page when we click on about this page, we can find one path which contains page name.
The below image shows the page in Server Application Top, from that we need to copy the file.
From the above Application Top we need to copy the RegSuppUserPG.xml page, note that the path may be
different in your environment so check the path properly or concern the DBA for your required file to copy.
After copying the file move it to any existing project of OAF in desktop system for example see the below
image it was moved into the following location in Desktop.
After copying open the JDeveloper so that we can see the copied page if JDeveloper is already open then
refresh the JDeveloper so that the page will appear automatically. Select the page and we can see VO Name
in the page structure.
For reference look at the below image:-
Here in the above page structure we can identify that VO name is RegistrationVO but for Supplier Name we
can see that Oracle OAF standard page used External VO hence we need to carry the External VO too from
the server. The below image shows the finding process of External VO in the original page structure.
Now we can observe that the external LOV name is SupplierLOVRN, copy the SupplierLOVRN.xml file and
paste it in the same location where we pasted the Register Supplier page. Refresh the JDevelper so that we
can see the External LOV. Now in the external LOV we can identify the Exact VO which we need to extend to
achieve our requirement.
The below image shows the finding process of exact VO from the External VO.
Step 3: Now finally after finding the exact VO download the VO from the Java Top and create the directory
structure whatever the VO had in myProjects of desktop JDeveloper folder.
Note that the following image shows the pos directory in Apps server is copying to apps folder in Desktop
JDeveloper, here if we are copying from oracle on wards then the JDevelper will take heavy time for further
process, and hence we need to download only the required things from the Server.
The below is image shows after copying and creating the same directory structure it looks like the following.
N
Step 4: After creating the directory structure now create one dummy workspace and Project in JDeveloper
for VOExtension. And in the project creation process in step1 the default package name must be same as the
path which we found in About this page. But here we need to remove the slash (/) symbol and in that place
we have to keep dots (.), for reference have a look into the below image.
After creating project check that in applications oracle.apps.pos structure is available if you didnt find that
package then open the project properties, select Project Content.
Click on Add button and select the proper directory structure. Select it and click on Ok now check that the
Oracle.apps.pos package will appear.
Step 5:Copy the SQL Query from the VendorsVO and modify the Query in Toad or SQL Developer Tool or if
any other and save the query and keep it aside. In query add the column name vendor_type_lookup_code.
The modified SQL Query is shown below:
SELECT * FROM (Select vendor_id, vendor_name, segment1, vendor_type_lookup_code
from PO_VENDORS where enabled_flag = 'Y'
and ( START_DATE_ACTIVE is null OR START_DATE_ACTIVE < SYSDATE )
and ( END_DATE_ACTIVE
is null OR END_DATE_ACTIVE > SYSDATE )
and (vendor_type_lookup_code is null or vendor_type_lookup_code <> 'EMPLOYEE')) QRSLT
ORDER BY upper(vendor_name)
Step 6: Now create the New VO in custom directory. Extract the Package select Registration right click on it
and then select New View Object For reference look into the below image.
Some times while creating VO JDeveloper may show some dialogue box errors that required so and so file
not found in the package, we can ignore these kind of messages click on OK but we must be very cautious
about the missing files may be which are must required for our extension process.
The below image shows the package name specification process.
After that in the extends part click on the Browse button and then select the Original VO name that we can
find in the directory structure which we copied and created same as it is in the server.
The below sample image shows After selecting the Extends VO.
After clicking next to the query remove the existing SQL Query and place the modified SQL Query in which we
added a coloumn vendor_type_lookup_code and finish the VO creation process.
Step 7: Now we need to substitute the new VO with the existing VO for that select Tools -> Project
Properties, for reference look into the below image.
Extract the Business Components, select Substitutions and then Select the proper VO from the available list
and in Substitute list, for example as shown in the below image:
After adding into the project properties now we need to move the project folder from MyClasses to the
server environment Classes Directory. Be cautious while moving the files from desktop to the server. Here no
need to replace the existing files at all for the first time.
The below figure shows the moving process from the desktop to the server.
After that run the jpxImport script, the below one is the sample JPXImport script.
java oracle.jrad.tools.xml.importer.JPXImporter $JAVA_TOP/xxvoextension/VOExtensionPrj.jpx -username apps password apps -dbconnection "(description = (address_list = (address = (community = tcp.world)(protocol = tcp)(host
=www.newtonapples.com/old)(port = 1521))) (connect_data = (service_name = naora1)))"
After successfully running import script, now go to Functional Administrator, click on Core Service Tab and
then select Caching Framwork -> Click on Clear All Cache button. We can even click on Clear All Statistics
button if we want.
After that check whether the Extended VO is available or not in the About this page once the extended VO
appears then now click on the LOV option of Supplier Name.
Save the newly created item and now again click on the Supplier name so there fore here we go and we can
find the Vendor Lookup Code which we created.
Previous Unit
Mark this Unit Complete
Next Unit
What is OAF ?
Structure of OAF
About Model
Application Module
About View
About Controller
Header Region
Query Region
Message Choice
Submit Button
Image Item
SPEL in OAF
Search Pages
Manual Search
Final Code in AM, Update Page, and Patient Entry Page Controller
Extensions in OAF
VO Extension in OAF
AM Extension in OAF
CO Extension in OAF
EO Extension in OAF
Personalization in OAF
BACK TO COURSE
top
Home
About Us
Services
Courses
Course
Contact Us
UBIABCL
Inserted from <http://newtonapples.com/start-course-page/>
- AM Extension in OAF
Friday, December 05, 2014
5:11 PM
AM Extension in OAF
This OAF tutorial lesson will explain how to extend AM (Application Module) in OAF using one sample
exercise, so that we will get knowledge in OAF AM Extension.
First of all let us understand the requirement. We have one Responsibility called OA Framework ToolBox
Tutorial Labs. If you dont have that Responsibility go to System Administrator Responsibility -> User and
add the Responsibility. The application for the OA Framework ToolBox Tutorial Labs is Common Modules AK.
In the responsibility navigate to Main Employee Search.
OA Framework ToolBox Tutorial Labs -> Tutorial Lab -> Employees -> Main Employee Search
nbsp;
The below image shows the same Navigation Process:
After navigating to the Main Employee Search page we have a button called Create Employee. Whenever we
click on Create Employee Button it will take us to another page for creating employee.
After creating employee here obviously we will click on Apply button to add employee details but whenever
we click on Apply button we are creating employee that is fine and hence there is no Table to track which
user created particular Employee.
So therefore here our requirement is to maintain the track Record of User Information, for Example if we
logged in with user name as Operations then after creating Employee we need to maintain such information
like User Operations created so and so employee.
Let us see the AM extension part step wise:Step 1: Create one Custom table. Note that the following custom table is not required to register in Oracle
Apps because we are not using any KFF(Key Flex Fields) or DFF(Descriptive Flex Fields) in table.
CREATE TABLE XX_USER(user_id VARCHAR2(40),
user_name VARCHAR2(40),
last_update_login NUMBER,
last_updated_by NUMBER,
last_updated_date DATE,
creation_date DATE,
created_by NUMBER)
Step 2: Identify the AM from the page. That means we need to identify the AM which we want to extend. For
that go to About This page and then extract Business Component Reference Details.
Step 3: Download the AM from the Java_Top and create the directory structure in OAF patch on our desktop
system and paste it in MyProjects.
The below image shows the directory structure after creating in the desktop system. Note that copying the
entire directory structure may take long time and also it may reduce the JDeveloper Performance so
therefore be cautious while creating directory structure and moving the files from Java_Top to the the
MyProjects folder in JDeveloper.
Step 4: After copying AM and Creating Directory Structure create new Workspace and Project in Directory
Structure for extending AM.
Note that in project give the package name same which we found in AboutThisPage.
From the above package now we can give the package for project as follows:
xxamextension.oracle.apps.fnd.framework.toolbox.labsolutions.webui
The below image shows the sample project name and Default package name.
Step 5: After creating WorkSpace and project create one dummy page so that dummy structure will be
created.
After creating Dummy Structure and Page now create one New Application Module (AM) in Custom
Directory. Right click on the labsolutions and select New Application Module The below image shows the
reference of how to create New AM in custom Directory.
While creating AM in Extends select the Original AM which we copied from Server. The copied AM must be in
the created directory structure in our desktop JDeveloper Patch.
Step 6: After creating AM now open the AM java file and modify the code, add the following code in the AM
Java file.
public class AMExtensionAMImpl extends EmployeeAMImpl
{
/**This is the default constructor (do not remove)
*/
public AMExtensionAMImpl()
{
}
/**Sample main for debugging Business Components code using the tester.
*/
public void apply()
{
java.sql.Date sdate= getOADBTransaction().getCurrentDBDate().dateValue();
Rebuild the code and check the code rebuild is successful without any errors.
Step 7: After successful compilation goto Project Properties and substitute the New AM with the old AM.
Go to Tools -> Project Properties
Select the EmployeeAM from the list and then click on Add button later click on Ok button.
After adding Old and New AM now rebuild the Code and Rebuild the entire project.
Step 8: Move the Project file from MyClasses folder in Desktop JDeveloper patch file To the server $Java_Top
directory. The below image shows the sample scenario of moving the project file folder from Desktop to
server java top.
After moving the project folder move the jpx generated file. Before moving the jpx file open the jpx file with
notepad and check whether the substitution section is there or not, make sure the substitution section must
exist.
exist.
The below image shows the moving process of jpx file from desktop to server. The jpx file is available in
MyProjects folder of JDeveloper patch.
Step 9: After moving the files run the import script. The below is the sample import script for AM extension,
it is actually the jpx import script for AM extension.
java oracle.jrad.tools.xml.importer.JPXImporter $JAVA_TOP/xxamextension/AMExtensionOne.jpx -username apps password apps -dbconnection "(description = (address_list = (address = (community = tcp.world)(protocol = tcp)(host
= www.newtonapples.com/old)(port = 1521))) (connect_data = (service_name = newton)))"
Step 10: Clear the Cache in Functional Administrator or bounce the server.
Once after bouncing the server we can see the AM which we created. The below image shows the AM name
which we can find in About This Page.
Step 11: Now create new employee in OAF Page using the Crate Employee Button. After adding employee
details click on Apply button.
After creating Employee now check in the Custom Created table we can find the information about the user
who created the Employee. For example who created Bharath user.
Here I logged in with default Opertaions user.
Now we can see the information of users who created the Employees.
Previous Unit
- CO Extension in OAF
Friday, December 05, 2014
5:11 PM
CO Extension in OAF
In this lesson we are going to see how to extend CO (Controller) in OAF. Before that let us see the
requirement. Go to the following navigation.
Purchasing, Vision Operations -> Supply Base ->Supplier User Management ->Supplier User Creation ->
Invite Supplier User.
After selecting the Invite Supplier User we will see OAF page. The same page part is shown in the below
image.
If you observe in the above image User Information is highlighted which contains Email Address and Note.
Here our requirement to add User Name field into the User Information. It means if we logged in with
Operations user then that User Name must display in User Information.
If you observe, according to the requirement, we need to display the User Name when the page is loaded. It
means we need to write the code in the processRequest of Controller class.
Let us see the CO extension process step wise:Step 1: First to display the user name we need to create one item, so therefore create one item for that
Select Personalize User Information in OAF page.
After that select create Item image as shown in the below image:
Prompt
: User Name
Step 2: Finding the Controller to extend. Before extending CO we need to find out which Controller we need
to extend. This step explains how to find the main CO in page.
Go to About This Page, Expand all. After expanding all we can see the controller name in Controller column
in the same row where the page name contains.
For example in our requirement the page name is Invite a Supplier User, so in that row InvitationCO is added.
It means Invitation CO is the main Controller.
The below image shows two controllers, but if you observe InvitationCO is the main Controller because which
is attached to the main page region.
So therefore finally we came to know that InvitationCO is the Controller which we need to extend.
Step 3: Download the Controller from the $Java_Top and create the directory structure in JDeveloper Patch
file in our desktop system.
Note that it is not necessary that we need to download entire files in the structure. Copying the whole files in
the structure may take long time for copying and also most of the times it impact on JDeveloper
performance.
The below sample image shows the copying and creating directory structure process, which shows actually
what exact files are copying from the server.
Step 4: Open the JDeveloper and Create the Dummy work space.
Note that while in Project Wizard you must give the same package name which you will find in about this
page. For example see the below image.
Step 5: In this step you need to create one new controller. Normally we will create controller on page, just by
right clicking on the page region we will select Set New Controller option, but here in Controller extension it
is not like that. Lets see how to set controller in CO Extension.
In Application Navigator, Right click on webui and select New Option.
In Categories extract General and then select Simple Files. Select JavaClass in Items. The below image shows
the Java Class Selection process.
In Extends click on the Browse button and select Original CO (InvitationCO). This Original CO will be available
because we copied the CO and created the same directory structure in JDeveloper patch.
So therefore finally after giving Name, Package, and Extends click on OK button.
Step 6: In this step go to the controller java file, create the processRequest method same as it is in seeded.
After creating method write the java code to display the User Name. The below is the java code that you
need to type. Note that copying the below code and pasting it in your JDeveloper is fine, but check the
import files properly.
package xxcoextension.oracle.apps.pos.registration.webui;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
import oracle.apps.pos.registration.webui.InvitationCO;
public class InvitationCOEx extends InvitationCO
{
public InvitationCOEx()
{
}
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
Step 7: Copy the project folder and paste it in $Java_Top, Classes directory (folder) of server. The below
image shows the sample process of moving the files from the desktop to the server.
Step 8: Login to the Application and click on About This Page, now we can see the Extended CO name
which is replaced with the Earlier Seeded Name.
Here Like VO and AM extension no need to run the Import script. But to activate the CO you must follow the
below step wise process.
First step, select Personalize Page option and then select Personalize button, for example see the below
image.
In step two, at site level give the package name. Here you must be careful while creating package name. See
the directory structure where actually the class file contains.
For example our class file is located in the following directory structure.
xxcoextension/oracle/apps/pos/registration/webui/InvitationCOEx.class
Now replace the slash (/) with the dots and remove .class, for example see the below one:
xxcoextension.oracle.apps.pos.registration.webui.InvitationCOEx
Finally the controller path is ready and that we need to give in site level (site level is an example we are
taking here, you can take any other level too if required to restrict).
The below image shows the example, where actually the controller class path is given.
Now finally you can see that after extending CO we are able to see the User Name, whenever the page got
loaded. For example see the below image:
Previous Unit
Mark this Unit Complete
Next Unit
- EO Extension in OAF
Friday, December 05, 2014
5:12 PM
EO Extension in OAF
This OAF online tutorial lesson explains how to Extend Entity Object in Oracle Apps Framework (OAF) with
one sample requirement, taking it as an example to explain EO Extension Process in OAF.
First of all let us understand the requirement. We have one Responsibility called OA Framework ToolBox
Tutorial Labs. If you dont have that Responsibility go to System Administrator Responsibility -> User and
add the Responsibility. The application for the OA Framework ToolBox Tutorial Labs is Common ModulesAK.
In the responsibility navigate to Main Employee Search.
OA Framework ToolBox Tutorial Labs -> Tutorial Lab -> Employees -> Main Employee Search
After navigating to the Main Employee Search page we have a button called Create Employee. Whenever we
click on Create Employee Button it will take us to another page for creating employee.
The below image shows the Create Employee OAF page window, in the below image you can see that Email
Address is highlighted. Lets see the explanation after the image why its highlighted.
In the above image you might have observed that Email Address field is empty. So therefore here our
requirement is we want the default email address as training@newtonapples.com/old.
Hence Email Address field is an attribute in OAF, we need to add default value to the attribute. This can be
done by extending EO where it contains all the attribute values. We can perform DML operations (INSERT,
UPDATE, DELETE) only using EO. Here we need to set the default value of Email Address to
training@newtonapples.com/old. Let us see how to extend EO step wise.
Step 1: Go to About this Page of Create Employee page. Extract the Business Component Reference Details.
You can see the EmployeeEO.
Copy the EmployeeEO and create the same directory structure in JDeveloper patch, which is available in your
desktop system.
The below image shows the sample way of creating the directory structure and copying the files from the
Server to the JDeveloper patch.
Step 2: Open the JDeveloper and create new WorkSpace and Project.
For example:Workspace Name : XXEOExtension
Project Name : XXEOExtensionPRJ
Default Package: xxeoextension.oracle.apps.fnd.framework.toolbox.labsolutions.webui
Note that we need to create the Default package name according to the path which we will see in about this
page, we have a page path like as follows:/oracle/apps/fnd/framework/toolbox/labsolutions/webui/EmployeePG 120.9
We need to replace the Default package name according to the patch as follows:xxeoextension.oracle.apps.fnd.framework.toolbox.labsolutions.webui
If you observe, we removed slash symbols, and also we removed the page name and at the beginning we
have to give our own name like xxeoextension.
Step 3: After creating the dummy workspace and Dummy project, we will get a structure. Now create the
Entity Object.
For example give the Entity name as follows:
Name : EmployeeEOEx
Package : xxeoextension.oracle.apps.fnd.framework.toolbox.schema.server
In Extends Entity, select the Original EmployeeEO which you will find in browse because we created the same
directory structure as it is in server and also we copied from the server.
The below image shows the EO creation process Window
After that whenever you click on Next button, you will not find any Entity Attributes:
To see the Attributes, click on the button called New From Table.., Using right arrow buttons move all the
available Attributes into the selected list.
After that in fourth step of EO creation process, check the Validation Method check box. The same scenario is
shown in the below image:
Step 4: After creating EO open the Java File and add the two lines in create method. In the below code you
need to add only two lines, line numbers 40 and 41. No need to do any changes for the remaining entire
code.
package xxeoextension.oracle.apps.fnd.framework.toolbox.schema.server;
import oracle.apps.fnd.framework.server.OAEntityDefImpl;
import oracle.apps.fnd.framework.toolbox.schema.server.EmployeeEOImpl;
import oracle.jbo.AttributeList;
import oracle.jbo.domain.Date;
import oracle.jbo.domain.Number;
import oracle.jbo.domain.RowID;
import oracle.jbo.server.AttributeDefImpl;
import oracle.jbo.server.EntityDefImpl;
// --------------------------------------------------------------------// --- File generated by Oracle ADF Business Components Design Time.
// --- Custom code may be added to this class.
// --- Warning: Do not modify method signatures of generated methods.
// --------------------------------------------------------------------public class EmployeeEOExImpl extends EmployeeEOImpl
{
public static final int MAXATTRCONST =
EntityDefImpl.getMaxAttrConst("oracle.apps.fnd.framework.toolbox.schema.server.EmployeeEO");
public static final int ROWID = MAXATTRCONST;
private static OAEntityDefImpl mDefinitionObject;
/**This is the default constructor (do not remove)
*/
public EmployeeEOExImpl()
public EmployeeEOExImpl()
{
}
/**Retrieves the definition object for this instance class.
*/
public static synchronized EntityDefImpl getDefinitionObject()
{
if (mDefinitionObject == null)
{
mDefinitionObject =
(OAEntityDefImpl)
EntityDefImpl.findDefObject("xxeoextension.oracle.apps.fnd.framework.toolbox.schema.server.EmployeeEOEx");
}
return mDefinitionObject;
}
/**Add attribute defaulting logic in this method.
*/
public void create(AttributeList attributeList)
{
super.create(attributeList);
setEmailAddress("training@newtonapples.com/old");
}
/**Add Entity validation code in this method.
*/
protected void validateEntity()
{
super.validateEntity();
}
/**Gets the attribute value for EmployeeId, using the alias name EmployeeId
*/
public Number getEmployeeId()
{
return super.getEmployeeId();
}
/**Sets <code>value</code> as the attribute value for EmployeeId
*/
public void setEmployeeId(Number value)
{
super.setEmployeeId(value);
}
/**Gets the attribute value for Title, using the alias name Title
*/
public String getTitle()
{
return super.getTitle();
}
/**Sets <code>value</code> as the attribute value for Title
*/
public void setTitle(String value)
{
super.setTitle(value);
}
/**Gets the attribute value for FirstName, using the alias name FirstName
*/
public String getFirstName()
{
return super.getFirstName();
}
/**Sets <code>value</code> as the attribute value for FirstName
*/
public void setFirstName(String value)
{
super.setFirstName(value);
}
/**Gets the attribute value for MiddleNames, using the alias name MiddleNames
*/
public String getMiddleNames()
{
return super.getMiddleNames();
}
/**Sets <code>value</code> as the attribute value for MiddleNames
*/
public void setMiddleNames(String value)
{
super.setMiddleNames(value);
}
/**Gets the attribute value for LastName, using the alias name LastName
*/
public String getLastName()
{
return super.getLastName();
}
/**Sets <code>value</code> as the attribute value for LastName
*/
public void setLastName(String value)
{
super.setLastName(value);
}
/**Gets the attribute value for FullName, using the alias name FullName
*/
public String getFullName()
{
return super.getFullName();
}
/**Sets <code>value</code> as the attribute value for FullName
return super.getLastUpdatedBy();
}
/**Sets <code>value</code> as the attribute value for LastUpdatedBy
*/
public void setLastUpdatedBy(Number value)
{
super.setLastUpdatedBy(value);
}
/**Gets the attribute value for CreationDate, using the alias name CreationDate
*/
public Date getCreationDate()
{
return super.getCreationDate();
}
/**Sets <code>value</code> as the attribute value for CreationDate
*/
public void setCreationDate(Date value)
{
super.setCreationDate(value);
}
/**Gets the attribute value for CreatedBy, using the alias name CreatedBy
*/
public Number getCreatedBy()
{
return super.getCreatedBy();
}
/**Sets <code>value</code> as the attribute value for CreatedBy
*/
public void setCreatedBy(Number value)
{
super.setCreatedBy(value);
}
/**Gets the attribute value for LastUpdateLogin, using the alias name LastUpdateLogin
*/
public Number getLastUpdateLogin()
{
return super.getLastUpdateLogin();
}
/**Sets <code>value</code> as the attribute value for LastUpdateLogin
*/
public void setLastUpdateLogin(Number value)
{
super.setLastUpdateLogin(value);
}
/**Gets the attribute value for AttributeCategory, using the alias name AttributeCategory
*/
public String getAttributeCategory()
{
return super.getAttributeCategory();
}
/**Sets <code>value</code> as the attribute value for AttributeCategory
*/
public void setAttributeCategory(String value)
{
super.setAttributeCategory(value);
}
/**Gets the attribute value for Attribute1, using the alias name Attribute1
*/
public String getAttribute1()
{
return super.getAttribute1();
}
/**Sets <code>value</code> as the attribute value for Attribute1
*/
public void setAttribute1(String value)
{
super.setAttribute1(value);
}
/**Gets the attribute value for Attribute2, using the alias name Attribute2
*/
public String getAttribute2()
{
return super.getAttribute2();
}
/**Sets <code>value</code> as the attribute value for Attribute2
*/
public void setAttribute2(String value)
{
super.setAttribute2(value);
}
/**Gets the attribute value for Attribute3, using the alias name Attribute3
*/
public String getAttribute3()
{
return super.getAttribute3();
}
/**Sets <code>value</code> as the attribute value for Attribute3
*/
public void setAttribute3(String value)
{
super.setAttribute3(value);
}
/**Gets the attribute value for Attribute4, using the alias name Attribute4
*/
public String getAttribute4()
/**Gets the attribute value for Attribute12, using the alias name Attribute12
*/
public String getAttribute12()
{
return super.getAttribute12();
}
/**Sets <code>value</code> as the attribute value for Attribute12
*/
public void setAttribute12(String value)
{
super.setAttribute12(value);
}
/**Gets the attribute value for Attribute13, using the alias name Attribute13
*/
public String getAttribute13()
{
return super.getAttribute13();
}
/**Sets <code>value</code> as the attribute value for Attribute13
*/
public void setAttribute13(String value)
{
super.setAttribute13(value);
}
/**Gets the attribute value for Attribute14, using the alias name Attribute14
*/
public String getAttribute14()
{
return super.getAttribute14();
}
/**Sets <code>value</code> as the attribute value for Attribute14
*/
public void setAttribute14(String value)
{
super.setAttribute14(value);
}
/**Gets the attribute value for Attribute15, using the alias name Attribute15
*/
public String getAttribute15()
{
return super.getAttribute15();
}
/**Sets <code>value</code> as the attribute value for Attribute15
*/
public void setAttribute15(String value)
{
super.setAttribute15(value);
}
/**Gets the attribute value for RowID, using the alias name RowID
*/
public RowID getRowID()
{
return (RowID)getAttributeInternal(ROWID);
}
/**getAttrInvokeAccessor: generated method. Do not modify.
*/
protected Object getAttrInvokeAccessor(int index,
AttributeDefImpl attrDef) throws Exception
{
if (index == ATTRIBUTE1)
{
return getAttribute1();
}
if (index == ATTRIBUTE10)
{
return getAttribute10();
}
if (index == ATTRIBUTE11)
{
return getAttribute11();
}
if (index == ATTRIBUTE12)
{
return getAttribute12();
}
if (index == ATTRIBUTE13)
{
return getAttribute13();
}
if (index == ATTRIBUTE14)
{
return getAttribute14();
}
if (index == ATTRIBUTE15)
{
return getAttribute15();
}
if (index == ATTRIBUTE2)
{
return getAttribute2();
}
if (index == ATTRIBUTE3)
{
return getAttribute3();
}
}
if (index == ATTRIBUTE4)
{
return getAttribute4();
}
if (index == ATTRIBUTE5)
{
return getAttribute5();
}
if (index == ATTRIBUTE6)
{
return getAttribute6();
}
if (index == ATTRIBUTE7)
{
return getAttribute7();
}
if (index == ATTRIBUTE8)
{
return getAttribute8();
}
if (index == ATTRIBUTE9)
{
return getAttribute9();
}
if (index == ATTRIBUTECATEGORY)
{
return getAttributeCategory();
}
if (index == CREATEDBY)
{
return getCreatedBy();
}
if (index == CREATIONDATE)
{
return getCreationDate();
}
if (index == EMAILADDRESS)
{
return getEmailAddress();
}
if (index == EMPLOYEEID)
{
return getEmployeeId();
}
if (index == ENDDATE)
{
return getEndDate();
}
if (index == FIRSTNAME)
{
return getFirstName();
}
if (index == FULLNAME)
{
return getFullName();
}
if (index == LASTNAME)
{
return getLastName();
}
if (index == LASTUPDATEDBY)
{
return getLastUpdatedBy();
}
if (index == LASTUPDATEDATE)
{
return getLastUpdateDate();
}
if (index == LASTUPDATELOGIN)
{
return getLastUpdateLogin();
}
if (index == MANAGERID)
{
return getManagerId();
}
if (index == MIDDLENAMES)
{
return getMiddleNames();
}
if (index == POSITIONCODE)
{
return getPositionCode();
}
if (index == ROWID)
{
return getRowID();
}
if (index == SALARY)
{
return getSalary();
}
if (index == STARTDATE)
{
{
return getStartDate();
}
if (index == TITLE)
{
return getTitle();
}
return super.getAttrInvokeAccessor(index, attrDef);
}
/**setAttrInvokeAccessor: generated method. Do not modify.
*/
protected void setAttrInvokeAccessor(int index, Object value,
AttributeDefImpl attrDef) throws Exception
{
if (index == ATTRIBUTE1)
{
setAttribute1((String)value);
return;
}
if (index == ATTRIBUTE10)
{
setAttribute10((String)value);
return;
}
if (index == ATTRIBUTE11)
{
setAttribute11((String)value);
return;
}
if (index == ATTRIBUTE12)
{
setAttribute12((String)value);
return;
}
if (index == ATTRIBUTE13)
{
setAttribute13((String)value);
return;
}
if (index == ATTRIBUTE14)
{
setAttribute14((String)value);
return;
}
if (index == ATTRIBUTE15)
{
setAttribute15((String)value);
return;
}
if (index == ATTRIBUTE2)
{
setAttribute2((String)value);
return;
}
if (index == ATTRIBUTE3)
{
setAttribute3((String)value);
return;
}
if (index == ATTRIBUTE4)
{
setAttribute4((String)value);
return;
}
if (index == ATTRIBUTE5)
{
setAttribute5((String)value);
return;
}
if (index == ATTRIBUTE6)
{
setAttribute6((String)value);
return;
}
if (index == ATTRIBUTE7)
{
setAttribute7((String)value);
return;
}
if (index == ATTRIBUTE8)
{
setAttribute8((String)value);
return;
}
if (index == ATTRIBUTE9)
{
setAttribute9((String)value);
return;
}
if (index == ATTRIBUTECATEGORY)
{
setAttributeCategory((String)value);
return;
}
if (index == CREATEDBY)
if (index == CREATEDBY)
{
setCreatedBy((Number)value);
return;
}
if (index == CREATIONDATE)
{
setCreationDate((Date)value);
return;
}
if (index == EMAILADDRESS)
{
setEmailAddress((String)value);
return;
}
if (index == EMPLOYEEID)
{
setEmployeeId((Number)value);
return;
}
if (index == ENDDATE)
{
setEndDate((Date)value);
return;
}
if (index == FIRSTNAME)
{
setFirstName((String)value);
return;
}
if (index == FULLNAME)
{
setFullName((String)value);
return;
}
if (index == LASTNAME)
{
setLastName((String)value);
return;
}
if (index == LASTUPDATEDBY)
{
setLastUpdatedBy((Number)value);
return;
}
if (index == LASTUPDATEDATE)
{
setLastUpdateDate((Date)value);
return;
}
if (index == LASTUPDATELOGIN)
{
setLastUpdateLogin((Number)value);
return;
}
if (index == MANAGERID)
{
setManagerId((Number)value);
return;
}
if (index == MIDDLENAMES)
{
setMiddleNames((String)value);
return;
}
if (index == POSITIONCODE)
{
setPositionCode((String)value);
return;
}
if (index == SALARY)
{
setSalary((Number)value);
return;
}
if (index == STARTDATE)
{
setStartDate((Date)value);
return;
}
if (index == TITLE)
{
setTitle((String)value);
return;
}
super.setAttrInvokeAccessor(index, value, attrDef);
return;
}
}
Step 5: Rebuild the code, after successfully rebuilding the code goto, Tools -> Project Properties. Extract
Business Components and then select Substitutions. Substitute Old and New Entity Objects, for example see
the below image:
Step 7: Bounce the server or clear the Cache in Function Administrator responsibility. Sometimes even if you
clear cache it will not workout. So therefore, if that the case then you must bounce the server.
Finally select the Create Employee button, so that you can see for the Email Address the default value as
training@newtonapples.com/old.
You can see the changed Entity Object name in About This Page.
Previous Unit
Mark this Unit Complete
Next Unit
-Personalization in OAF
Friday, December 05, 2014
5:13 PM
Personalization in OAF
In this lesson you are going to see few Personalizations in OAF. Before that what is personalization in OAF,
making changes without touching the code, or without extending any form,is called Personalization in OAF.
Let us navigate to the Responsibility called OA Framework ToolBox Tutorial Labs. In the responsibility
navigate to Main Employee Search.
OA Framework ToolBox Tutorial Labs -> Tutorial Lab -> Employees -> Main Employee Search
All the changes here made at site level, so that changes will effect to the entire users whoever using.
You might have observed in the above image that Employee Name in Search Region is highlighted. Now the
requirement is to change the Employee Name to Search Employee Name.
Lets see how you can change the name using Personalization.
First click on Personalize Search link in the page. After clicking on Personalize Search page, in the
Personalization Structure click on Personalize image. For example see the below image:
After selecting Personalize image, in Prompt at site level give the required name Search Employee Name. For
example, see the below image:.
Click on Apply button after making changes, and see the output navigating to main page.
Requirement 2: In the second requirement you are going to see how to change the corporate branding
image. Note that all the images are available in the OA_MEDIA. Navigate to OA_MEDIA, for example open the
Putty and type the following command:
--change the directory using the following command
cd $OA_MEDIA
-- after changing the directory type the present working directory and copy the path, move the image files to that
particular location.
pwd
--- the below one is the example directory location where the image files contains
/u01/apps1/apps/apps_st/comn/java/classes/oracle/apps/media
So therefore hence before you changing the Corporate Branding Image, image must exist in OA_MEDIA
directory.
Click on Personalize Page at Header Level, after that in Personalization Structure select Personalize icon of
Image: (CorporateBranding). For example see the below image:
After clicking on Personalize image, now go to Image URI at site level change it to your branding image name.
For example, /OA_MEDIA/NA_LOGO.png. The below image shows the same scenario:
Click on Apply button, navigate to main page and see the changed Corporate Branding Image.
Requirement 3: After searching Employee Name, whenever you click on GO button results will be displayed
in the table list. So now the requirement is, to hide the column name called Manager. Let us see how to hide
the table column.
Select Personalize Employee Table, after that in the available name list check the Manager name, click on
Personalize image item in that particular row.
At site level in Personalization Properties, select false in the drop down list.
Click on Apply button and navigate to main page to see the output. So therefore with this requirement you
learned how to hide or remove the column name in OAF page.
Requirement 4: This requirement shows how to change the Submit Button name in OAF using
personalization.
In the main page you might have observed that we have a button called Create Employee. So here the
requirement is to change the Create Employee name to Create New Employee.
Select Personalize Employee Table, after that in the available name list check the Submit Button: Create
Employee. Click on Personalize Image icon.
After that at site level change the prompt name to Create New Employee.
Apply the changes and navigate to main page to see the output.
Requirement 5: In this requirement you are going to see how to change the display order in oaf page. The
requirement is to change the order series, i.e,. to reorder the columns in the OAF page.
Select Personalize Employee Table, after that select Reorder Image item, for example see the below image:
Select the Personalize check box at site level, for example see the below image:
Select the Column names which you want to move, move the columns using arrow buttons: -
Requirement 6: This requirement shows you to change the column names in a table. For this Select
Personalize Employee Table, after that select Number column name in the personalization structure. Click
on Personalize image. For example see the below image:
After that at site level change the Prompt value to Employee Number. For example see the below image:-
After that click on apply button and navigate to main page to see the changes. The below image shows the
sample output after changing the column name in oaf using personalization.
Previous Unit
Mark this Unit Complete