Professional Documents
Culture Documents
OAF Basics PDF
OAF Basics PDF
Oracle Application Framework (OA Framework) is the Oracle Applications development and deployment platform for
HTML-based business applications.
HTTP Request
Application
Components
WEB
CLIENT Servlet / JSP Data Base
HTTP Response
Application Tier Contains a Web Server which maintains the components such as Servlet, JSP
Component handles complete task, such as Business Logic, Database Transactions Logic and Presentation Logic.
Disadvantages :
2) Application developer has to concentrate on Business Logic, Database Transactions Logic as well as Presentation
Logic.
5) Lot of confusion with Business Logic, Database Transactions Logic and Presentation Logic since they are being
developed as single component.
1 Raaj Nagulapalli
M.C.A
MVC1 Architecture :
HTTP Response
Model : Model Represents data object. Model is what is being manipulated and presented to the user
View : Serves as Screen representation of Model. It is the object that presents the current state of the data objects.
Controller : Defines the way user interface reacts to the users input. The Controller component is the object that
manipulates the model or data object.
In MVC1 Architecture
Disadvantages :
1) Only One Application developer has to develop the component with Business Logic, as well as Presentation Logic.
4) Resources such as Java developers and Web developers can not be used effectively
6) Lot of confusion with Business Logic, Presentation Logic since they are being developed as single component.
2 Raaj Nagulapalli
M.C.A
MVC2 Architecture :
HTTP Request
Controller
WEB
CLIENT Model Data Base
Controller:
It is java Servlet called as Action Servlet. It receives request from the web client and stores data into the Java Bean
called as Form Bean (Model) and receives response (success / fail) from the Form Bean. Based on the response from Form
Bean, Action Servlet decides, which page (view) to be presented to the client.
Model :
It is Java Bean called as Form Bean. It will receive the client data through the Controller and performs the data
validations or data base transactions such DML and DQL operations. After performing database transactions it provides the
data for the view.
View :
It is a JSP. It populates the data from the Form Bean ( Model ) and Present to the user.
3 Raaj Nagulapalli
M.C.A
Oracle Application Frame Work Architecture :
Architecture of Oracle Application Frame Work is similar to the Struts Frame Work but some difference are there.
Model
HTTP Request
Controller1,
2,3, 4 n VO
WEB A Data Base
CLIENT
M
EO
HTTP Response
View
Controller :
It is a Java Class.
OAControllerImpl is a parent of all Controller Classes.
Controller performs data base transactions through the Application Module interface.
It will get the data through the Application Module and Push into the View.
View :
It is JSP with GUI Components.
It populates data of its GUI components through the Controller.
View never Interact with the Model Component.
Model :
It is a combination of Application Module, View Object and Entity Object.
Application Module :
It is an interface given to the Controller Classes.
It can be shared by multiple controllers.
It performs DQL operations through the View Object
It performs DML operations through the Entity Object.
OAApplicationModuleImpl is a parent of Application Module Class.
It is mandatory for all applications
View Object :
SQL Query ( SELECT statement to project the data in the form )
It should be stored in .server package
View Object can be developed manually or BC4j wizard
OAViewObjectImpl : is the parent of all view objects
All APIs starts with OA
4 Raaj Nagulapalli
M.C.A
Entity Object :
It is database object such as table, view and etc
DML operations will be performed on the Entity Object
It should be stored in schema.server package
OAEntityImpl : is the parent of all Entity Objects
5 Raaj Nagulapalli
M.C.A
JDeveloper Installation and Setting Environment
6 Raaj Nagulapalli
M.C.A
3) Driver : thin
Host Name : localhost ( if database is on the current system else I.P Addres of DB server )
JDBC Port : 1521
SID : vis
Eg:
Hello Page
7 Raaj Nagulapalli
M.C.A
1) Create the work space
2) Create the project
3) Create the package
4) Create the application module
5) Create the page
6) Set the properties of the page
AM Definition
Window Title
2) Creation of a project
8 Raaj Nagulapalli
M.C.A
Password : welcome
Application short Name : PO
Responsibility key : PURCHASING_OPERATIONS
Next Finish
3) Create of a package
5) Create of a Page
9 Raaj Nagulapalli
M.C.A
Region1
Properties :
Id : RootRN
AM Definition : click on the box and select the AM
Window Title : First Window
Title : Hello This is my First Page
( at least one of the above two 1) Window Title 2) Title is required )
Text Field :
Properties :
Id : UserId
Read only : True ( to Show it as read only filed, we can not edit the filed )
False we can edit the filed.
( use for Id generating automatically , used with database sequence )
Disable : true ( to avoid the cursor focus into the text filed )
Maximum Length : the maximum no of Chars that can be entered into the text filed.
10 Raaj Nagulapalli
M.C.A
Additional Text : text to be displayed when mouse over the item.
Tip Type : to display some hint message just below the text filed
To create next item click any item new item (or) right click on Region
Submit Button :
Id : Go
Item Style : submitButton ( it will have default action)
Prompt : Go
resetButton :
Id : Clear
Item Style : resetButton ( to clear the form)
Text : Clear ( prompt )
Access Key ( Short Key )
Normal Button
Id : go
Item Style : Button
Prompt : as desired
Action Type : fireAction ( like a trigger to get the action )
It will be handled inside of controller class.
Images :
Copy the required Image into
C:\JDEV\jdevhome\jdev\myhtml\OA_MEDIA
Item Style : Image
Image URI : ( imagefile.gif)
Additional Text : (Mouse over message)
Link :
Id : lnk
Item Style : link
Text : Oracle Apps Home
Destination URI : http://apps.ora.com:8000
11 Raaj Nagulapalli
M.C.A
To Connect to Gmail site use http://www.gmail.com
Check Box :
Id : job
Item style : messageCheckBox
Checked Value : MANAGER
Unchecked Value :
Initially Checked : true
Initial Value : MANAGER
The difference between Checkbox and Radio Button is that, Checkbox allows Multiple selection where as Radio Button
allows Single Selection.
Radio Buttons :
First create RadiGroup
Next create Radio Buttons
Radio Group
Id : gender
Item style : messageRadioGroup
Data Type : VARCHAR2
Prompt : Gender
Radio Button
Id : male
Item Style : messageRadioButton
Group Name : gender
Initial Vale : Male
Value Checked : Male
Prompt : MALE
12 Raaj Nagulapalli
M.C.A
Id : address
Item Style : richTextEditor
Vertical alignment : Top
Maximum Length : 1000 ( as desired )
Date :
Id : hireDate
Item Style : messageTextInput
Data Type : DATE
Prompt : Date Of Joining
tipType : dateFormat
TipMessage ( Hint Message ): First store message into the database table called: FND_NEW_MESSAGES
with the help of Apps front end .
Navigation :
Application Developer Application Messages
13 Raaj Nagulapalli
M.C.A
Set the properties of Item
Eg :
Id : name
Item Style : messageTextInput
Prompt : User Name
Tip Type : shortTip [/ longMessage / none / dateFormat ]
Tip Message Appl Short Name : PO
Tip Message Name : NAME_TIPMSG
14 Raaj Nagulapalli
M.C.A
Apps DBA
Oracle DBA
Pre Next
Pre Next
CREATION OF LOV
LOV can be created in two ways 1) Internal Region 2) External Region
Internal Region is only for specific LOV item
External Region is for rusability. It can be shared by multiple LOV items.
15 Raaj Nagulapalli
M.C.A
Criteria item
The LOV can be on the existing Page or New Page as per the requirement
Eg:
Creation of a page ( like previous process )
Right Click on Project file ( .jpr ) New Web Tier OA components Page OK
Name : DemoLovItemPG ( as per naming conventions Page must end with PG)
Package : test.oracle.apps.po.orgid.webui
When the item style set as messageLovInput, then following will be generated automatically under the item
1) Region3
2) lovMappings
16 Raaj Nagulapalli
M.C.A
Name of the package : ( paste the copied one test.oracle.apps.po.orgid.server and modify to
test.oracle.apps.po.orgid.lov.server
Next OK next Finish
Query Statement :
SELECT ORGANIZATION_ID, ORGANIZATION_NAME
FROM ORG_ORGANIZATION_DEFINITIONS ;
Test to test the query or it can be tested by using TOAD tool (ok Query valid)
Next Next Next Finish
C) Shuttle VO to AM
double click on AM Data Model test.oracle.apps.po.orgid.server
organizationLovVO >> instance name : OrganizationLovVO
Apply OK
17 Raaj Nagulapalli
M.C.A
Criteria Item : organiztionId ( search Item )
Controller is a Java Class. It is used to capture the user actions, events also to perform business logic in the application .
It controls the application flow
It should be placed inside of the webui package
Naming Convention is ends with CO
Eg:
Page Name : DemoPG
Controller Name : DemoPGCO
Package Name : test.oracle.apps.po.login.webui.webui
Controller is only .Java file no other files
The parent class for any controller is OAControllerImpl
This is used implement the business logic such validation, DML operations and etc.
pageContext : is variable to read value, messages from the client and also used to call another page
webBean : is a variable to send the response to the client and to control the bean properties dynamically
18 Raaj Nagulapalli
M.C.A
Steps to create the controller :
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
/**
* Controller for ...
*/
public class FirstCO extends OAControllerImpl
{
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
/**
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
19 Raaj Nagulapalli
M.C.A
*/
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
}
/**
* 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);
}
=========================================================================
to test the order of execution write the following code in processRequest ()
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
System.out.println( " I am in Process Request Method ");
}
20 Raaj Nagulapalli
M.C.A
=========================================================================
/*===========================================================================+
| Copyright (c) 2001, 2003 Oracle Corporation, Redwood Shores, CA, USA |
| All rights reserved. |
+===========================================================================+
| HISTORY |
+===========================================================================*/
package demo.oracle.apps.po.choice.webui.webui;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
/**
* Controller for ...
*/
public class LoginCO extends OAControllerImpl
{
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
/** * Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
}
/** 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)
21 Raaj Nagulapalli
M.C.A
{
super.processFormRequest(pageContext, webBean);
if( pageContext.getParameter("submit")!=null)
{
String lstrUid = pageContext.getParameter("uid");
String lstrPwd = pageContext.getParameter("pwd");
if( lstrUid.equalsIgnoreCase("OPERATIONS")&& lstrPwd.equalsIgnoreCase("WELCOME"))
{
throw new OAException( "Valid User", OAException.CONFIRMATION);
}
else
{
throw new OAException( "InValid User", OAException.ERROR);
}
}// end of if checking for submit
if( pageContext.getParameter("clear")!=null)
{
22 Raaj Nagulapalli
M.C.A
External Region is for reusability. It can be shared by multiple LOV items.
Eg:
Creation of a page ( like previous process )
Right Click on Project file ( .jpr ) New Web Tier OA components Page OK
Name : DemoLovItemPG ( as per naming conventions Page must end with PG)
Package : test.oracle.apps.po.orgid.webui
Region2 :
Id : Header
Region Style : header
Text : Enter Details
Create item1 with Item Style as messageLovInput
Region2 ( Header ) Rt.Click item
Item properties :
Id : organizationID
Item Style : messageLovInput
23 Raaj Nagulapalli
M.C.A
Prompt : organizationID
When the item style set as messageLovInput, then following will be generated automatically under the item
3) Region3
4) lovMappings
3) lovMap1
2) Create VO inside the lov.server package
Query Statement :
SELECT ORGANIZATION_ID, ORGANIZATION_NAME
FROM ORG_ORGANIZATION_DEFINITIONS ;
Test to test the query or it can be tested by using TOAD tool (ok Query valid)
Next Next Next Finish
C) shuttle VO to AM
double click on AM Data Model test.oracle.apps.po.orgid.server
organizationLovVO >> instance name : OrganizationLovVO
Apply OK
24 Raaj Nagulapalli
M.C.A
Next
Region ID : OrganizationTableRN
Region Style : table
Next Shuffle (OrganizationId and OrganizationName ) Next Next Finish
5) Add VO to external Region by using Wizard and set one of the item property search allowed : true
6) Add external region corresponding LOV input bean item by using external property
7) Set the following LOV mapping
Region item
Return item
Criteria item
25 Raaj Nagulapalli
M.C.A
Note : The steps 3, 4 and 5 are extra steps with external region.
When the item style set as messageLovInput, then following will be generated automatically under the item
1) Region3
2) lovMappings
3) Lov Map
26 Raaj Nagulapalli
M.C.A
Name of the package : ( paste the copied one test.oracle.apps.po.supp.server and modify to
test.oracle.apps.po.supp.lov.server
Next OK next Finish
Query Statement :
select vendor_id, vendor_name, creation_date from po_vendors
Test to test the query or it can be tested by using TOAD tool (ok Query valid)
Next Next Next Finish
Shuttle VO to AM
double click on SuppDetailsAM Data Model test.oracle.apps.po.supp.lov.server
SuppDetailsVO >> instance name : SuppDetailsVO
Apply OK
5) Add VO to external region by using wizard and set one of the item property search allow true
27 Raaj Nagulapalli
M.C.A
Select SuppDetailsLOVRN.xml and go to structure Rt.click
New Table Using Wizard Next
Application Module : test.oracle.apps.po.supp.server.SuppDetailsAM
( the AM Which is available in .server package )
Available View Usage : SuppDetailsLovVO
Next
Region Id : SuppDetailsTableVO
Region style : table
Next shuttle all attributes or required attributes as desired
Next Finish
6) Add external region to corresponding LOV input item by using external property
28 Raaj Nagulapalli
M.C.A
1) Using Query Region Wizard
Steps to develop the search page
1) Create the Region with region style as Query
2) Develop the VO and Shuttle to AM
3) Add VO to Query Region by using wizard
4) Set the following properties
Construction Mode : requestBasedSearch
Include Single Panel : true
Include views panel : true
Advanced Panel : true
To search based on particular field go to EmpQueryDetailsTableRN and set the required Attribute as search allow true
Here EmployeeId and Title are set as search allow true. Hence the following form showing with
29 Raaj Nagulapalli
M.C.A
EmployeeId :
Title :
Type the values and select Go
30 Raaj Nagulapalli
M.C.A
Working with switcher region :
1) Modify the Query in the VO
Go to EmpVO and Double click on it select Query and modify to
SELECT employee_id, title, full_name, email_address, position_code, salary, start_date, end_date,
decode(end_date, NULL, 'Delete_Disabled', 'Delete_Enabled') deleteswitcher
FROM FWK_TBX_EMPLOYEES Alias_name
2) Go to EmpQueryDetailsTableRN New Switcher Region -->
Id : SwitcherRN
Rt.Click on SwitcherRN Rt.Click case
Go to first case Rt.Click item
Id: Delete_Disabled
Itemstyle : image
Image URI : deleteicon_disabled.gif
Go to second case Rt.Click item
Id : Delete_Enabled
Itemstyle : image
Image URI : deleteicon_enabled.gif
It is a pre-compiled statement at the database server. This statement is used to improve the performance of the
application.
31 Raaj Nagulapalli
M.C.A
Steps to write the Prepared Statement
con.commit();
Example :
32 Raaj Nagulapalli
M.C.A
Here submit to insert record into database
Clear to clear the form
xxxCO.Java coding
/*===========================================================================+
| Copyright (c) 2001, 2003 Oracle Corporation, Redwood Shores, CA, USA |
| All rights reserved. |
+===========================================================================+
| HISTORY |
+===========================================================================*/
package aa.oracle.apps.po.aa.webui;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import aa.oracle.apps.po.aa.server.AaaAMImpl;
import oracle.apps.fnd.framework.OAException;
/**
* Controller for ...
*/
public class StudentInsertCO extends OAControllerImpl
{
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
/**
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
33 Raaj Nagulapalli
M.C.A
* @param webBean the web bean corresponding to the region
*/
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
}
/**
* 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("Submit")!=null)
{
int sno = Integer.parseInt(pageContext.getParameter("Rno"));
String sname = pageContext.getParameter("Sname");
int sage = Integer.parseInt(pageContext.getParameter("Age"));
AaaAMImpl am = ( AaaAMImpl ) pageContext.getApplicationModule(webBean);
int ret = am.insertRecord(sno, sname, sage);
if(ret==0)
{
throw new OAException(" Record Succussfully Inserted", OAException.CONFIRMATION);
}
else if(ret==1)
{
throw new OAException("Sql Exception", OAException.ERROR);
}
else
{
throw new OAException("Unkwon Error", OAException.ERROR);
}
}
}
xxxAMImpl.java coding
package aa.oracle.apps.po.aa.server;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.jbo.server.ApplicationModuleImpl;
import aa.oracle.apps.po.aa.lov.server.SuppDetailsVOImpl;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Connection;
34 Raaj Nagulapalli
M.C.A
// ---------------------------------------------------------------
// --- File generated by Oracle Business Components for Java.
// ---------------------------------------------------------------
/**
*
* Sample main for debugging Business Components code using the tester.
*/
public static void main(String[] args)
{
launchTester("aa.oracle.apps.po.aa.server", "AaaAMLocal");
}
/**
*
* Container's getter for SuppDetailsVO
*/
public SuppDetailsVOImpl getSuppDetailsVO()
{
return (SuppDetailsVOImpl)findViewObject("SuppDetailsVO");
PreparedStatement pst=null;
Connection con=null;
try
{
con=this.getOADBTransaction().getJdbcConnection();
pst= con.prepareStatement("INSERT INTO STUDENT VALUES ( ? ,? , ?)");
System.out.println(lSno+"\n"+lSname+"\n"+lAge);
pst.setInt(1,lSno);
pst.setString(2,lSname);
pst.setInt(3,lAge);
//pst.executeUpdate();
35 Raaj Nagulapalli
M.C.A
pst.execute();
// System.out.println("Success");
con.commit();
return 0;
}
catch(SQLException e)
{
return 1;
}
catch( Exception e )
{
return 2;
}
finally
{
try
{
pst.close();
}
catch(SQLException e)
{
return 1;
}
}
} // end of insertRecord Method
} // end of class
In the above statement result set will be stored into the prepared statement
ResultSet rs = pst.getResultSet();
Callable Statement :
36 Raaj Nagulapalli
M.C.A
Stored Procedure :
It is a set statements at the database server. It contains statements such as SELECT, INSERT, DELETE, UPDATE and also
statements to perform validations
1) in parameters :
these are default parameter. Hence it is an optional to register
directly value can be passed
Eg.
cst.setInt(1, 1001)
cst.setString(2, hello);
2) out parameters :
cst.registerOutParameter(3, Types.VARCHAR)
Once the parameter registered as out parameter, then value can not be passed.
setX() should not be used after registering as out parameter. It throws SQLException.
3) in-out parameter :
cst.registerInOutParameter(4, Types.INT);
cst.setInt(4,2007);
cst.execute();
37 Raaj Nagulapalli
M.C.A
String str = cst.getString(3)
Types :
Types.BINARY
Example :
38 Raaj Nagulapalli
M.C.A
Sample procedure to insert records into database and get status back
CREATE OR REPLACE PROCEDURE STUDENT_PROC ( ROLLNO NUMBER, NAME VARCHAR2, AGE NUMBER,
retCode OUT NUMBER )
IS
BEGIN
EXCEPTION
END;
/
xxAMImpl.java coding
39 Raaj Nagulapalli
M.C.A
package aa.oracle.apps.po.aa.server;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.jbo.server.ApplicationModuleImpl;
import aa.oracle.apps.po.aa.lov.server.SuppDetailsVOImpl;
import java.sql.CallableStatement;
import java.sql.SQLException;
import java.sql.Connection;
import java.sql.Types;
// ---------------------------------------------------------------
// --- File generated by Oracle Business Components for Java.
// ---------------------------------------------------------------
/**
*
* Sample main for debugging Business Components code using the tester.
*/
public static void main(String[] args)
{
launchTester("aa.oracle.apps.po.aa.server", "AaaAMLocal");
}
/**
*
* Container's getter for SuppDetailsVO
*/
public SuppDetailsVOImpl getSuppDetailsVO()
{
return (SuppDetailsVOImpl)findViewObject("SuppDetailsVO");
}
Connection con=null;
CallableStatement cst=null;
40 Raaj Nagulapalli
M.C.A
try
{
con=this.getOADBTransaction().getJdbcConnection();
cst= con.prepareCall("{CALL STUDENT_PROC( ? , ? , ? , ?) }");
cst.setInt(1,lSno);
cst.setString(2,lSname);
cst.setInt(3,lAge);
cst.registerOutParameter(4,Types.NUMERIC);
cst.execute();
int retCode = cst.getInt(4);
return retCode;
}
catch(SQLException e)
{
return 1;
}
catch( Exception e )
{
return 2;
}
finally
{
try
{
cst.close();
}
catch(SQLException e)
{
return 1;
}
}
}
}
41 Raaj Nagulapalli
M.C.A
xxCO.Java coding
/*===========================================================================+
| Copyright (c) 2001, 2003 Oracle Corporation, Redwood Shores, CA, USA |
| All rights reserved. |
+===========================================================================+
| HISTORY |
+===========================================================================*/
package aa.oracle.apps.po.aa.webui;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import aa.oracle.apps.po.aa.server.AaaAMImpl;
import oracle.apps.fnd.framework.OAException;
/**
* Controller for ...
*/
public class StudentInsertCO extends OAControllerImpl
{
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
/**
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
/**
* 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
*/
super.processFormRequest(pageContext, webBean);
42 Raaj Nagulapalli
M.C.A
if ( pageContext.getParameter("Submit")!=null)
{
if(ret==0)
{
throw new OAException(" Record Succussfully Inserted", OAException.CONFIRMATION);
}
else if(ret==1)
{
throw new OAException("Sql Exception", OAException.ERROR);
}
else
{
throw new OAException("Unkwon Error", OAException.ERROR);
}
} // end of class.
43 Raaj Nagulapalli
M.C.A
In the above search should be done in the following ways
1) if all fields null, then displaying all records
2) if Supplier Name is entered, then based on Supplier Name
3) if Supplier Type is entered, then based on Supplier Type
4) if Supplier Number entered, then based on Supplier Number
5) if all are entered, then based on all.
1) Create SupplierSearchPG
Properties
Id : RootRN
Window Title : SearchWindow
Title : Supplier Search
Create header Region for layout designing
Properties :
Id : Header
Text : Search By
Create a Region ( SupplierDetailsRN ) to hold SupplierName, SupplierType and SupplierNumber
Region Style as messageComponentLayout
44 Raaj Nagulapalli
M.C.A
Rows : 2
Columns : 2
Under SupplierDetailsRN,
Create 1) messageTextInput field for SupplierName
2) messageLovInput field for SupplierType
3) messageLovInput field for SupplierNumber
Create Region ( ButtonRN ) for the Buttons ( Submit and Clear ) with properties
region style : rowlayout
Horizontal Alignment : centre
Add Go and Clear with itemStyle as submitButton
45 Raaj Nagulapalli
M.C.A
AM definition : test.oracle.apps.po.supp.lov.server.SupplierSearchAM
Go to SupplierNumberLovRN new table Using Wizard
Application Module : test.oracle.apps.po.supp.lov.server.SupplierSearchAM
Available View Usage : SupplierNumberVO
Regiod Id : SupplierNumberTableRN
Region Style : table
Search Allow : True for SupplierNum
Add to SupplierType
Add to SupplierNumber
5) Create Region ( SiteDetailsRN ) for site details with Region Style as Advanced Table
6) Create VO for SiteDetailsRN inside the .server package.
Query :
select pv.VENDOR_NAME Supplier Name",
pv.SEGMENT1 "Supplier Number",
pvsa.VENDOR_SITE_CODE "Supplier Site",
pv.VENDOR_TYPE_LOOKUP_CODE "Supplier Type",
pvsa.COUNTRY "Country Code"
46 Raaj Nagulapalli
M.C.A
from
po_vendors pv,
po_vendor_sites_all pvsa
where
pv.VENDOR_ID = pvsa.VENDOR_ID
7) Go to SupplierSerachPG
Go to SiteTableRN
Properties :
View Instance : SiteDetailsTableVO
1) Supplier Name
SiteTableRN New Column
Properties :
Column Id : Column1
Create Item under the Column (SuppName )
Id : SuppName
Item Style : messageStyleText
View Attribute : SupplierName
ColumnHeader New sortableHeader
Properties :
Prompt : Supplier Name
2) Supplier Number
SiteTableRN New Column
Properties :
Column Id : Column2
Create Item under the Column (SuppNum )
Id : SuppNum
Item Style : messageStyleText
View Attribute : SupplierName
47 Raaj Nagulapalli
M.C.A
ColumnHeader New sortableHeader
Properties :
Prompt : Supplier Number
3) Supplier Site
SiteTableRN New Column
Properties :
Column Id : SuppSite
Create Item under the Column (SuppSite )
Id : SuppSite1
Item Style : messageStyleText
View Attribute : SupplierSite
ColumnHeader New sortableHeader
Properties :
Prompt : Supplier Site
4) Supplier Type
SiteTableRN New Column
Properties :
Column Id : Column4
Create Item under the Column (SuppType)
Id : SuppType1
Item Style : messageStyleText
View Attribute : SupplierType
ColumnHeader New sortableHeader
Properties :
Prompt : Supplier Type
5) Country Code
SiteTableRN New Column
Properties :
Column Id : Column5
Create Item under the Column (Country)
Id : Country
Item Style : messageStyleText
View Attribute : CountryCode
ColumnHeader New sortableHeader
Properties :
Prompt : Country Code
48 Raaj Nagulapalli
M.C.A
Page design is as shown below
AdvancedTable Region
Column
/*===========================================================================+
| Copyright (c) 2001, 2003 Oracle Corporation, Redwood Shores, CA, USA |
| All rights reserved. |
+===========================================================================+
| HISTORY |
+===========================================================================*/
package ge.oracle.apps.po.supp.server.webui;
import oracle.apps.fnd.common.VersionInfo;
49 Raaj Nagulapalli
M.C.A
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
// newly added package
import ge.oracle.apps.po.supp.server.SupplierAMImpl;
/**
* Controller for ...
*/
public class SupplierSearchCO extends OAControllerImpl
{
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
/**
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
}
/**
* 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);
//the following is a Newly Added Code
SupplierAMImpl am = ( SupplierAMImpl )pageContext.getApplicationModule(webBean);
if( pageContext.getParameter("Go")!=null)
{
am.setSearchParams(pageContext, webBean);
}
if( pageContext.getParameter("Clear")!=null)
{
am.clearForm(pageContext, webBean); // it is user defined method.
}
50 Raaj Nagulapalli
M.C.A
//the above is a Newly Added Code
}
}
==================================================
SupplierAMImpl.java ( the code , which is added is being highlighted with bold and big font )
package ge.oracle.apps.po.supp.server;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.jbo.server.ApplicationModuleImpl;
import ge.oracle.apps.po.supp.lov.server.SupplierTypeLovVoImpl;
import ge.oracle.apps.po.supp.lov.server.SupplierNumberLovVOImpl;
// newly added packages
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageLovInputBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
// ---------------------------------------------------------------
// --- File generated by Oracle Business Components for Java.
// ---------------------------------------------------------------
/**
*
* Sample main for debugging Business Components code using the tester.
*/
public static void main(String[] args)
{
launchTester("ge.oracle.apps.po.supp.server", "SupplierAMLocal");
}
51 Raaj Nagulapalli
M.C.A
/**
*
* Container's getter for SupplierTypeLovVo
*/
public SupplierTypeLovVoImpl getSupplierTypeLovVo()
{
return (SupplierTypeLovVoImpl)findViewObject("SupplierTypeLovVo");
}
/**
*
* Container's getter for SupplierNumberLovVO
*/
public SupplierNumberLovVOImpl getSupplierNumberLovVO()
{
return (SupplierNumberLovVOImpl)findViewObject("SupplierNumberLovVO");
}
52 Raaj Nagulapalli
M.C.A
OAMessageTextInputBean suppNameBean = ( OAMessageTextInputBean )
webBean.findChildRecursive("SupplierName");
suppNameBean.setValue(pageContext, null );
suppTypeBean.setValue(pageContext,null );
suppNumber.setValue(pageContext,null );
53 Raaj Nagulapalli
M.C.A
In the above search should be done in the following ways
1) if all fields null, then displaying all records
2) if Supplier Name is entered, then based on Supplier Name
3) if Supplier Type is entered, then based on Supplier Type
4) if Supplier Number entered, then based on Supplier Number
5) if all are entered, then based on all.
1) Create SupplierSearchPG
Properties
Id : RootRN
Window Title : Supplier Search Page
Title : Supplier Search
Create header Region for layout designing
Properties :
Id : HeaderRN1
Text : Search By
1) Create a Region ( SupplierDetailsRN ) for to hold SupplierId, StartDate, OnHoldFlag and EndDate
Region Style as messageComponentLayout
Rows : 2
Columns : 2
Under SupplierDetailsRN,
Create 1) messageTextInput field for SupplierId
2) messageTextInput field for StartDate ( Date type)
3) messageChoiceBox field for OnHoldFlag
4) messageTextInput field for EndDate ( Date type)
Create Region ( ButtonRN ) for the Buttons ( Submit and Clear ) with properties
region style : rowlayout
Horizontal Alignment : centre
Add Go and Clear with itemStyle as submitButton
54 Raaj Nagulapalli
M.C.A
WHERE fs.supplier_id = fst.supplier_id
AND fs.SUPPLIER_ID like nvl(:1,fs.SUPPLIER_ID)
AND fs.ON_HOLD_FLAG like nvl(:2,fs.ON_HOLD_FLAG)
AND nvl(fs.START_DATE,sysdate )<= nvl(:3,nvl(fs.START_DATE,sysdate ))
7) Go to SupplierSerachPG
a) Go to RootRN Create HeaderRN2 Rt.Click Region Using Wizard Next
Available View Usage : SupplierSearchDetailsVO
Region Id : SupplierSerachDetailsTableRN
Region Style : table
Next shuttle all fields Next change the item style of all items to messageStyleText
Next Finish
b) Add Update and Delete Columns to the table
1) Update
Id : Update
Item Style : image
Prompt : Update
Image URI : updateicon_enabled.gif
Action Type : fireAction
Event : UpdateButtonClick
Parameters : ( called as SPEL parameters )
Name Value
Supid ${oa. SupplierSerachDetailsVO.SupplierId}
Siteid ${oa. SupplierSerachDetailsVO.SupplierSiteId}
2) Delete
Id : Delete
Item Style : image
Prompt : Delete
Image URI : deleteicon_enabled.gif
Action Type : fireAction
Event : DeleteButtonClick
Parameters : ( called as SPEL parameters )
Name Value
delsupid ${oa. SupplierSerachDetailsVO.SupplierId}
Siteid ${oa. SupplierSerachDetailsVO.SupplierSiteId}
55 Raaj Nagulapalli
M.C.A
View Instance : SiteDetailsTableVO
1) Supplier Name
SiteTableRN New Column
Properties :
Column Id : SuppName
Create Item under the Column (SuppName )
Id : SuppName1
Item Style : messageStyleText
View Attribute : SupplierName
ColumnHeader New sortableHeader
Properties :
Prompt : Supplier Name
2) Supplier Number
SiteTableRN New Column
Properties :
Column Id : SuppNum
Create Item under the Column (SuppNum )
Id : SuppNum1
Item Style : messageStyleText
View Attribute : SupplierName
ColumnHeader New sortableHeader
Properties :
Prompt : Supplier Number
3) Supplier Site
SiteTableRN New Column
Properties :
Column Id : SuppSite
Create Item under the Column (SuppSite )
Id : SuppSite1
Item Style : messageStyleText
View Attribute : SupplierSite
ColumnHeader New sortableHeader
56 Raaj Nagulapalli
M.C.A
Properties :
Prompt : Supplier Site
4) Supplier Type
SiteTableRN New Column
Properties :
Column Id : SuppType
Create Item under the Column (SuppType)
Id : SuppType1
Item Style : messageStyleText
View Attribute : SupplierType
ColumnHeader New sortableHeader
Properties :
Prompt : SupplierType
5) Country Code
SiteTableRN New Column
Properties :
Column Id : Country
Create Item under the Column (Country)
Id : Country1
Item Style : messageStyleText
View Attribute : CountryCode
ColumnHeader New sortableHeader
Properties :
Prompt : Country Code
57 Raaj Nagulapalli
M.C.A
Page design is as shown below
AdvancedTable Region
Column
/*===========================================================================+
| Copyright (c) 2001, 2003 Oracle Corporation, Redwood Shores, CA, USA |
| All rights reserved. |
+===========================================================================+
| HISTORY |
+===========================================================================*/
package ge.oracle.apps.po.supp.server.webui;
58 Raaj Nagulapalli
M.C.A
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
// newly added package
import ge.oracle.apps.po.supp.server.SupplierAMImpl;
/**
* Controller for ...
*/
public class SupplierSearchCO extends OAControllerImpl
{
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
/**
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
}
/**
* 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);
//the following is a Newly Added Code
SupplierAMImpl am = ( SupplierAMImpl )pageContext.getApplicationModule(webBean);
if( pageContext.getParameter("Go")!=null)
{
am.setSearchParams(pageContext, webBean);
}
if( pageContext.getParameter("Clear")!=null)
{
am.clearForm(pageContext, webBean);
}
//the above is a Newly Added Code
59 Raaj Nagulapalli
M.C.A
}
}
==================================================
SupplierAMImpl.java ( the code , which is added is being highlighted with bold and big font )
package ge.oracle.apps.po.supp.server;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.jbo.server.ApplicationModuleImpl;
import ge.oracle.apps.po.supp.lov.server.SupplierTypeLovVoImpl;
import ge.oracle.apps.po.supp.lov.server.SupplierNumberLovVOImpl;
// newly added packages
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageLovInputBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
// ---------------------------------------------------------------
// --- File generated by Oracle Business Components for Java.
// ---------------------------------------------------------------
/**
*
* Sample main for debugging Business Components code using the tester.
*/
public static void main(String[] args)
{
launchTester("ge.oracle.apps.po.supp.server", "SupplierAMLocal");
}
60 Raaj Nagulapalli
M.C.A
/**
*
* Container's getter for SupplierTypeLovVo
*/
public SupplierTypeLovVoImpl getSupplierTypeLovVo()
{
return (SupplierTypeLovVoImpl)findViewObject("SupplierTypeLovVo");
}
/**
*
* Container's getter for SupplierNumberLovVO
*/
public SupplierNumberLovVOImpl getSupplierNumberLovVO()
{
return (SupplierNumberLovVOImpl)findViewObject("SupplierNumberLovVO");
}
61 Raaj Nagulapalli
M.C.A
suppNameBean.setValue(pageContext, null );
suppTypeBean.setValue(pageContext,null );
suppNumber.setValue(pageContext,null );
62 Raaj Nagulapalli
M.C.A
2) upload ( Paste ) the Folder into the following location of Apps Server
D:\oracle\viscomn\java
63 Raaj Nagulapalli
M.C.A
Specify the function Name in the following and copy the User Function Name: HELLOPGFUNCTION into notepad )
64 Raaj Nagulapalli
M.C.A
Go to Web HTML ( tab) and call specify the Page URL
65 Raaj Nagulapalli
M.C.A
66 Raaj Nagulapalli
M.C.A
Query for the Responsibilty Purchasing Vision Operations ( USA )
67 Raaj Nagulapalli
M.C.A
Go To Application Developer Menu
Query for the Menu as Shown Below
Attach the User Function Name ( HELLOPGFUNCTION, which was taken into notepad ) to Menu as shown below
68 Raaj Nagulapalli
M.C.A
Save the above
Up on saving it will run a request to register the form
Click on OK in the following
69 Raaj Nagulapalli
M.C.A
Go to View requests and find for the Request
Go to Purchasig Vision Operations ( USA ) and select the function : HelloPage ( prompt )
70 Raaj Nagulapalli
M.C.A
CRUD Application : Adding New Records:
When Click on AddAnotherRow Button , it should display following to add the new record.
71 Raaj Nagulapalli
M.C.A
In the above SupplierId Value should be populated from the Database Sequence automatically.
Package : supp.oracle.apps.po.create.webui
1) SupplierId ( messageStyledText , since its value will be populated from the sequence )
2) SupplierName ( messageTextInput )
3) StartDate ( Date Type )
4) EndDate ( Date Type )
72 Raaj Nagulapalli
M.C.A
1) Id : submit
ItemStyle : submittButton
2) Id : back
ItemStyle : submittButton
3) Create EO under schema.server for Supplier Details ( since inserting into database )
4) Create VO for Supplier Details, based on above EO (SupplierTableEO ) under the .server package
Name : SupplierTableVO
Package : supp.oracle.apps.po.create.server
Available :
supp.oracle.apps.po.create.schema.server
SupplierTableEO ( select ) and shuttle to right
Next
>> ( shuttle all the fields or required fields )
Next Next
Note : the above create VO is called as EO based VO, which can be used to perform DML operations through EO
5) Shuttel VO to AM ( SupplierAM )
Go to item SupplierId
Properties :
73 Raaj Nagulapalli
M.C.A
View Instance : SupplierTableVO
View Attribute : SupplierId
Go to item SupplierName
Properties :
View Instance : SupplierTableVO
View Attribute : Name
Go to item StartDate
Properties :
View Instance : SupplierTableVO
View Attribute : StartDate
Go to item EndDate
Properties :
View Instance : SupplierTableVO
View Attribute : EndDate
Name : SiteTableEO
Package : supp.oracle.apps.po.create.schema.server
Schema Object : FWK_TBX_SUPPLIER_SITES
Database Schema : APPS
7) Create VO for Site Details, based on above EO (SiteTableEO) under the .server package
Available :
supp.oracle.apps.po.create.schema.server
SiteTableEO ( select ) and shuttle to right
Next
>> ( shuttle all the fields or required fields )
Next Next
Check Expert Mode Next Next Next Finish
9) Go To SupplierCreationPG Structure
1) Coulmn1
Rt.Click Item
Id: SiteName ( messageTextInput )
74 Raaj Nagulapalli
M.C.A
View Attribute : SiteName
ColumnHeader Rt.Click
SortableHeader
Prompt : SiteName
2) Coulmn2
Rt.Click Item
Id: Address ( messageLovInput )
View Attribute : AddressId
ColumnHeader Rt.Click
SortableHeader
Prompt : Address
3) Coulmn3
Rt.Click Item
Id: PaymentTerms ( messageLovInput )
View Attribute : PaymentTermsCode
ColumnHeader Rt.Click
SortableHeader
Prompt : PaymentTerms
4) Coulmn4
Rt.Click Item
Id: CarrierCode ( messageLovInput )
View Attribute : CarrierCode
ColumnHeader Rt.Click
SortableHeader
Prompt : CarrierCode
5) Coulmn5
Rt.Click Item
Id: PurchaseSiteFlag ( messageChoice )
View Attribute : PurchasingSiteFlag
ColumnHeader Rt.Click
SortableHeader
Prompt : PurchaseSiteFlag
6) Column6
Rt.Click Item
Id: Edate ( messageTextInput : Date type )
View Attribute :EndDate
ColumnHeader Rt.Click
SortableHeader
Prompt : EndDate
11 ) create VOs for Address ( Column2 ), PaymentTerms ( Column3 ), CarrierCode ( Column4) and
Lov VOs must be created inside of lov.server package.
Create supp.oracle.apps.po.create.lov.server
1) Address ( Column2 )
Name : AdressDetailsLovVO
Package : supp.oracle.apps.po.create.lov.server
75 Raaj Nagulapalli
M.C.A
2) PaymentTerms ( Column3 )
Name : PaymentTermsLovVO
Package : supp.oracle.apps.po.create.lov.server
Query :
select lookup_code, meaning from FWK_TBX_LOOKUP_CODES_VL where lookup_type =
'FWK_TBX_PAYMENT_TERMS'
3) CarrierCode ( Column4)
Name : CarrierCodeLovVO
Query :
select lookup_code, meaning from FWK_TBX_LOOKUP_CODES_VL
where lookup_type = 'FWK_TBX_CARRIER'
1) AdressDetailsLovVO,
2) PaymentTermsLovVO
Scope : public
AM Defintion : SupplierLovAM
Scope : public
AM Defintion : SupplierLovAM
14) Attach the above external regions to lov items 1) Address 2) PaymentTerms 3) CarrierCode
1) Column2 ( Address )
Address item
Properties :
External Lov : /supp/oracle/apps/po/create/webui/AdressDetailsLovRN
Lov Map
Lov Region Item : AddressId
Return Item : Address
Criteria Item : Address
2) Column3 (PaymentTerms )
PaymentTerms item
Properties :
External Lov : /supp/oracle/apps/po/create/webui/PaymentTermsLovRN
Lov Map
Lov Region Item : LookupCode
Return Item : PaymentTerms
Criteria Item : PaymentTerms
3) Column4 (CarrierCode )
CarrierCode item
Properties :
External Lov : /supp/oracle/apps/po/create/webui/CarrierCodeLovRN
Lov Map
Lov Region Item : LookupCode
Return Item : CarrierCode
Criteria Item : CarrierCode
77 Raaj Nagulapalli
M.C.A
15) Create VO for PurchaseSiteFlag (Column5 : messageChoice)
Shuttle the above VO to AM ( SupplierAM under the .server package but not SuppLovAM)
16) Go to Page and add the PurchaseSiteFlagVO to Choice item PurchaseSiteFlag ( Column5)
Properties :
Picklist View instance : PurchaseSiteFlagVO
Picklist Display Attribute : Meaning
Picklist Value Attribute : LookupCode
View Attribute : PurchasingSiteFlag
advancedTableComponents
footer
tableFooter1 Rt.Click addTableRow
Properties :
AddRowsLable : AddAnotherRow
19) Develop the controller for Adding new Row and Submitting .
Name : SupplierCreateCO
/*===========================================================================+
| Copyright (c) 2001, 2003 Oracle Corporation, Redwood Shores, CA, USA |
| All rights reserved. |
+===========================================================================+
| HISTORY |
+===========================================================================*/
package chand.oracle.apps.po.supp.server.webui;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
/**
78 Raaj Nagulapalli
M.C.A
* Controller for ...
*/
/**
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
/**
* 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
*/
super.processFormRequest(pageContext, webBean);
if(ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
{
am.siteTableBlankRowLogic();
}
if(pageContext.getParameter("Submit")!=null)
{
am.saveLogic();
}
if(pageContext.getParameter("Back")!=null)
{
pageContext.setForwardURL("OA.jsp?page=/chand/oracle/apps/po/supp/webui/SupplierCreationPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
79 Raaj Nagulapalli
M.C.A
null,
false, //RetainAM
null,
OAWebBeanConstants.IGNORE_MESSAGES);
}
am.supplierTableBlankRowLogic();
//the above is newly added code
package chand.oracle.apps.po.supp.server;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.jbo.server.ApplicationModuleImpl;
import chand.oracle.apps.po.supp.poplist.server.PurchaseSiteFlagVOImpl;
// ---------------------------------------------------------------
// --- File generated by Oracle Business Components for Java.
// ---------------------------------------------------------------
/**
*
* This is the default constructor (do not remove)
*/
public SuppAMImpl()
{
}
/**
*
* Sample main for debugging Business Components code using the tester.
*/
/**
*
80 Raaj Nagulapalli
M.C.A
* Container's getter for SupplierTableVO
*/
if(!vo.isPreparedForExecution())
{
vo.executeQuery();
}
vo.insertRow(r);
r.setNewRowState(Row.STATUS_INITIALIZED);
Number a =this.getOADBTransaction().getSequenceValue("fwk_tbx_suppliers_seq"); //
// fwk_tbx_suppliers_seq is a sequence in the database.
vo.getCurrentRow().setAttribute("SupplierId",a);
// the following two methods (siteTableBlankRowLogic and saveLogic ) are newly added methods
Row r = vo.createRow();
if(!vo.isPreparedForExecution())
{
vo.setMaxFetchSize(0);
}
vo.insertRow(r);
r.setNewRowState(Row.STATUS_INITIALIZED);
Number a = this.getOADBTransaction().getSequenceValue("fwk_tbx_supplier_sites_seq");
// fwk_tbx_supplier_sites_seq is sequence in a database.
vo.getCurrentRow().setAttribute("SupplierSiteId",a);
String b = vo1.getCurrentRow().getAttribute("SupplierId").toString();
vo.getCurrentRow().setAttribute("SupplierId",b);
}
81 Raaj Nagulapalli
M.C.A
public void saveLogic()
{
this.getOADBTransaction().commit();
throw new OAException("Records Saved Successfully",OAException.CONFIRMATION);
}
// the above two methods are newly added methods
/**
*
* Container's getter for PurchaseSiteFlagVO
*/
82 Raaj Nagulapalli
M.C.A
Scripts for OAFramework Customization.
<JDEV_DIR>\jdevbin\jdev\bin\import
<JDEV_DIR>\jdevbin\jdev\myclasses\xxt\oracle\apps\pon\registration\webui\XXTSupplierRegistrationPG.xml -username
apps -password apps -dbconnection
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<DB_HOST_NAME>)(PORT=<DB_PORT>))(CONNECT_
DATA=(SID=<DB_SID>)))" -rootDir <JDEV_DIR>\jdevbin\jdev\myclasses\ -rootPackage /
Begin
Jdr_utils.printDocument(/oracle/apps/pon/award/completion/webui/ponCompleteAward2PG);
End;
begin
jdr_utils.listCustomizations('/oracle/apps/fnd/framework/navigate/webui/AppsNavigateMobilePG');
end;
5. To download the personalized file, first run the above script in SQL, that will display the full path for the
personalized file, then run the below command
Eg.
Begin
Jdr_utils.printDocument(/oracle/apps/fnd/framework/navigate/webui/customizations/site/0/AppsNavigateMobilePG);
End;
Save the file as AppsNavigateMobilePG.xml in the mentioned path and import into database using the above script.
6. To create translations for the personalized page or for a custom page, download the corresponding xlf file for the
personalized page or the custom page. Then change the prompts in the destination language and import the page
again.
83 Raaj Nagulapalli
M.C.A
Extract XLF file for a particular directory (For arabic language, for a different language, change accordingly).
Extract XLF file for a particular file(For arabic language, for a different language, change accordingly).
<JDEV_DIR>\jdevbin\jdev\bin\xliffextract
/oracle/apps/pon/outcome/creation/webui/customizations/site/0/ponCreatePOPG -root D:\temp -xliff_dir D:\temp -
mmd_dir <JDEV_HOME>\jdevbin\jdev\lib\ext\jrad\config\mmd\ -source db -username apps -password
<APPS_PASSWORD> -dbconnection " (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL=
TCP)(HOST = <DB_HOSTNAME>)(PORT = <DB_PORT>)) ) (CONNECT_DATA = (SERVICE_NAME = <DB_SID>)
) )" -languages ar-AE
7. When you have the Substitutions upload the JPX using the following script from the UNIX prompt,
8. To find the personalizations for a particular object or for the whole system or for a particular package.
Login with the user who has Functional Administrator responsibility, you search the Object you have substituted
(Functional Administrator=>Personalization=>Import/Export).
Search with a particular path, Eg. /oracle/apps/icx will give all the personalization under the path.
If the the profile option FND: Personalization Document Root Path set properly, the personalization can be exported to
the system directly.
*************************************
By
Raaj Nagulapalli
M.C.A
rnagulapalli@gmail.com
+919492949048
84 Raaj Nagulapalli
M.C.A