We Are Trying To Create A Simple Web Application To Add Records To A Database. [ID 470714.

1] Modified 13-FEB-2008 Type HOWTO Status PUBLISHED In this Document
Goal Solution Steps

Applies to:
Oracle JDeveloper - Version: 10.1.3 Information in this document applies to any platform.

Goal
How to create a simple ADF application that will create records and insert into database.

Solution
Here are steps on how to create an ADF input form and submit data to database. It involves:
• • •

Creating a ADF table to show all data. Adding a Create button to the same page. Creating an ADF form to insert a new record.

These steps are using the default schema scott/tiger that comes with Oracle database. The whole application (JDeveloper 10.1.3.3) can be downloaded here.

Steps
1. Create Application and create business components

Create a new application workspace o Application Name field: CreateRecord o Select the template Web Application [JSF, ADF BC] In the Model project create a business components project based upon the scott/tiger schema. o Select the DEPT table.

In the Create JSF JSP Wizard accept all default and press [Finish]. In the Create pop-up list select Table | ADF Read-Only Table.xml Design editor.jspx.xml • • • • • • • • • In the ViewController project open faces-config. In the Create JSF JSP Wizard accept all defaults and press [Finish]. DeptView) to the Selected area. DeptView1) and drag it onto JSP page.e. Change the default label from success to create. Change the default label to /ShowDeptRecords. Create 'Show all Records' page • • • • Go to the Design editor for ShowDeptRecords.jspx.jspx to /CreateDept.e. Configure faces-config.jspx to create JSPX page. Edit Table Columns dialog: press [OK]. From Component Palette drag JSF Page onto diagram.xml in Design editor. Back in the faces-config. Create JSPX pages • • • • Double-click ShowDeptRecords. 3. In Component Palette select JSF Navigation Case and create a link from /CreateDept.jspx. Press [Finish] 2.jspx.o o Updateable View Objects screen (step 2): move the object (i.jspx to create JSPX page.jspx to /ShowDeptRecords. Accept default label success. From Component Palette drag JSF Page onto diagram. . In the Data Control Palette select the view object (i. In Component Palette select JSF Navigation Case and create a link from /ShowDeptRecords. Change the default label to /CreateDept. double-click CreateDept.jspx. 4.

a list of records in a table is displayed (as shown below). In the Data Control Palette expand the Operation node (beneath the Application Module). 6. Select Commit and drag it next to the Submit button. .jspx. In the Create pop-up list select Forms | ADF Creation Form. Select the new button just created. DeptView1) and drag it onto JSP page.• • • In Component Palette. o Action field: select "success". o Disabled field: change to "false". In the Data Control Palette select the view object (i. Run application • • Right-click ShowDeptRecords. In the Create dialog select 'ADF Command Button'. under ADF Faces Core select CommandButton and drag beneath the table. Create Record Page • • • • • • • • • Go to the Design editor for CreateDept. • To create a new record press button [Create Record].jspx and select Run.e. In the Design editor delete the button Submit. With the Commit button selected go to the Property Inspector and change the following properties:o Text field: change to "Submit Record". Edit Table Columns dialog: select option 'Include Submit Button' and press [OK]. When application is invoked. In the Property Inspector change the properties for the new button:o Text field: change to "Create Record" o Action field: select "create" 5.

93 KB) bc4j-appnav. Attachments CreateRecord.jpg (12.jpg (11. VIEW OBJECT Back to top FAQ for Integration of Oracle E-Business Suite and Oracle Application Development Framework (ADF) Applications [ID 1296491.092.jpg (36.51 KB) Related Products • Middleware > Developer Tools > Java Development > Oracle JDeveloper Keywords ADF.88 KB) run-showrecords2.93 KB) run-createrecord. JDEVELOPER.zip (4. SUBMIT DATA. enter data like the following and press [Submit Record].1] Modified 30-APR-2011 Type FAQ Status PUBLISHED This document covers Frequently Asked Questions for the combination of Oracle Application Development Framework (ADF) with Oracle E-Business Suite (EBS). JSP PAGE.jpg (13.79 KB) run-showrecords1. • The new record will be displayed (as shown below).jpg (6.jpg (11.21 KB) facesdiagram.jpg (35.• In the form. DESIGN EDITOR. .39 KB) createrecord.76 KB) showallrecords.

and fndext. "Back-end-only integration" to Oracle E-Business Suite data and services. See "How do I launch an ADF application from the EBS Home Page?" below. How do I embed an ADF page or page fragment inside an OA Framework page in EBS? 9. This type of integration typically uses the AppsDataSource feature but no other parts of the Oracle E-Business Suite Software Development Kit for Java.jar? 5. AOL/J-Lite. Does the AppsDataSource support only read-only access or am I allowed to update data too? 7. Do I have to use AppsDataSource with my ADF application? Can I just connect directly to the APPS schema instead? 6. Can I use ADF 10g with the EBS SDK for Java? 13. Where do I find more documentation on developing ADF applications that integrate with EBS? 10. for example). How do I launch an ADF application from the EBS Home Page? 8. 1. For example. There is no user interface integration at all (that is. What is the difference between the Oracle E-Business Suite Software Development Kit for Java (EBS SDK for Java). the Oracle ADF user interface is launched from the Oracle E-Business Suite home page. a user cannot go back and forth between the ADF UI and the Oracle E-Business Suite OA Framework UI).In This Document 1. 2. but in this case. What types of integration between EBS and ADF applications can I do? 2. There is no further user interface interaction with Oracle E-Business Suite (users cannot return to the OA Framework home page. Can I use the JAAS feature of the EBS SDK for Java with my ADF application? 12. There is a change log at the end of this document. Can I get help debugging my ADF application integration with EBS? 11. this may include using the Oracle SOA Suite on the back end. Where is the Oracle E-Business Suite Software Development Kit for Java (EBS SDK for Java) documented? 4. What types of integration between EBS and ADF applications can I do? There are multiple ways that ADF external applications can be integrated with Oracle EBusiness Suite: 1. What is the Oracle E-Business Suite Software Development Kit for Java (EBS SDK for Java)? 3. with Oracle Application Development Framework 11g (ADF 11g) on the front end. What configurations were tested with the EBS SDK for Java? The most current version of this document can be obtained in My Oracle Support Knowledge Document 1296491. "Launch from Oracle E-Business Suite integration" may include back-end integration as above.1. .

Java Authentication and Authorization Service. 2. 3. nodes other than those where the Oracle E-Business Suite is installed. Do I have to use AppsDataSource with my ADF application? Can I just connect directly to the APPS schema instead? We strongly recommend using AppsDataSource with your ADF application instead of just connecting directly to the APPS schema from your ADF application. These features are meant for use with Java EE programs deployed in application servers on external nodes. Using these data sources also helps prevent wide exposure of the APPS password. What is the Oracle E-Business Suite Software Development Kit for Java (EBS SDK for Java)? The Oracle E-Business Suite Software Development Kit for Java (EBS SDK for Java) includes AppsDataSource. and fndext. What is the difference between the Oracle E-Business Suite Software Development Kit for Java (EBS SDK for Java). using these data sources insulates such programs from having to change their authentication information. This requires some context being shared between OAF and ADF. Oracle E-Business Suite Software Development Kit for Java is the official name of the feature.jar? These are all different names for the same feature. or ADF components could be embedded into an OAF page. . 4.1. as well as session management between the two systems.jar is the name of the library file that contains the feature. and Utilities for Oracle E-Business Suite. The AppsDataSource and similar AppsXADataSource standard data sources enable access to the Oracle E-Business Suite APPS database schema from external Java EE environments without requiring sharing of the password for the APPS schema (database user). "Full user interface and back-end integration" allows users to move back and forth between the ADF user interface and the Oracle E-Business Suite user interface. AOL/J-Lite is an obsolete internal nickname for the feature. AOL/J-Lite. This third type of integration is not yet supported. Since the APPS database password is typically changed frequently. while fndext. Where is the Oracle E-Business Suite Software Development Kit for Java (EBS SDK for Java) documented? The Oracle E-Business Suite Software Development Kit for Java (EBS SDK for Java) is documented in My Oracle Support Document 974949. For example. 5.3. that is. a user could go to an ADF page from an OA Framework page and back again.

read. Call your function from the rich container. 7. You may also call your function from within OA Framework pages the same way you call other registered functions. 2.3.Maintenance for further information on setting profile options. 4. it does not provide session management or other features that would allow a user to navigate back to the Oracle EBusiness Suite UI from the ADF UI. The profile option may be set at whatever level is appropriate (site. Select the new link from the Oracle E-Business Suite home page to go to the ADF application. How do I launch an ADF application from the EBS Home Page? Release 12. delete) operations. Set the HTML Call as: GWY.1. See Oracle E-Business Suite System Administrator's Guide . The ADF application must be located on a separate application tier server machine from the Oracle E-Business Suite application server. and grants. update. 8. this should only be an ADF page that does . Currently. responsibility. Create a new Oracle E-Business Suite function using the ADFX function type. 7. set the value of the FND_EXTERNAL_ADF_URL profile option to the context root of the URL for the application. How do I embed an ADF page or page fragment inside an OA Framework page in EBS? Create an ADFX function as above in " How do I launch an ADF application from the EBS Home Page?". 1.6. Your ADF application can also access PL/SQL APIs available in the APPS schema and do other operations possible through a regular datasource connection.1. The ADF application is deployed using Oracle WebLogic Server 11g or another appropriate application server. and so on). 3. 6. create a rich container object.3 and Up Only: Regardless of how or if an Oracle ADF 11g application integrates with Oracle E-Business Suite data on the back end. such as http://www. including Oracle Application Framework and Oracle Application Object Library. In your OA Framework page. See Oracle E-Business Suite System Administrator's Guide . responsibilities.jsp?targetPage=faces/ For example: GWY.jsp? targetPage=faces/MyADFShoppingAppDashboard 5.com:7001/my-context-root.Security for further information on setting up function security. launching an Oracle ADF 11g application from the OA Framework home page in Oracle E-Business Suite is simple with the addition of new features in Oracle E-Business Suite Applications Technology Release 12. Note that this mechanism is only for launching ADF. In the Oracle E-Business Suite.myhost. Does the AppsDataSource support only read-only access or am I allowed to update data too? AppsDataSource supports all of the CRUD (create. Incorporate the new function into Oracle E-Business Suite function security by adding it onto a menu and creating appropriate roles.

1. 13.1. 10.3.not require session management of the EBS session. "Global Customer Services Policy Regarding Customizations" (Note 122452.0. 11. Can I use the JAAS feature of the EBS SDK for Java with my ADF application? No.1. this document is currently the only document specifically on this topic. Unpredictable results may occur if using the SDK with ADF 10g. Unpredictable results may occur if using the SDK with other configurations.1. What configurations were tested with the EBS SDK for Java? The Oracle E-Business Suite SDK for Java was tested with EBS 12. Change Log Date Description . Oracle will issue patches only for issues that can be reproduced with those minimum releases or higher. Oracle will provide patches for reproducible issues with published EBS APIs or the EBS SDK. because ADF applications use an ADF-specific JAAS-compliant security setup. and the online documentation for ADF development is excellent. Can I get help debugging my ADF application integration with EBS? Extensions built using the Oracle E-Business Suite SDK for Java with Oracle E-Business Suite and ADF applications are considered customizations. For example.1.1.3 and ADF 11g 11.1 mentions ADF integration only in the context of whether particular Oracle E-Business Suite SDK for Java features can be used with ADF.0 or higher. For information specific to integrating ADF applications with EBS. Oracle will issue patches only for issues that can be reproduced with ADF 11g 11. you cannot use the JAAS feature of the EBS SDK for Java with your ADF application.3. 12. This feature is not intended for use with Oracle ADF applications. Where do I find more documentation on developing ADF applications that integrate with EBS? Oracle University offers courses in developing applications with ADF. 9.3. The My Oracle Support Document 974949. Can I use ADF 10g with the EBS SDK for Java? The Oracle E-Business Suite SDK for Java has been tested with ADF 11g 11.1.1) for further information on support for customizations. a display-only graph is an ideal object for this type of embedding.1. Please see My Oracle Support Document 122452.0.

or drag and drop view object on the jsf page. References NOTE:122452. Java Authentication and Authorization Service) Readme . WEBLOGIC Back to top ----------------------------------------Different files created in JDeveloper:-------- Jdeveloper version usedin this post is:=10. EBS.Oracle E-Business Suite Software Development Kit for Java (includes AppsDataSource. All rights reserved.Patch 9863609 Related Products • • • Oracle E-Business Suite > Applications Technology > Oracle E-Business Suite > Middleware > Developer Tools > Java Development > Oracle JDeveloper Keywords ADF.1. Specially beginners/ADF newbies gets confused with so many xml files which getting created. E-BUSINESS. 2011 Added questions 11-13 My Oracle Support Knowledge Document 1296491. In . And developers gets crazy as. why so many files are created and what are they for. there are many xml files and other files which are created by Jdeveloper.1 . OA FRAMEWORK.Global Customer Services Policy Regarding Customizations NOTE:974949. and that gives them one reason to run way from learning ADF.1 by Oracle E-Business Suite Development Copyright © 2011. 2011 Published document 30 Apr. whether its Entity object or a view object in the model layer.18 Feb. Oracle.1 .3 When you create a component in ADF .

jpx.xml):. Once you start creating the Entity or View object under the Model. Under the Model and ViewController projects two files gets created as “Model. Entity object is the Java object representation of the database table row from which it is created. And other configuration details such as database connection used in model layer.This file contains the name of the database table from which the entity object is created. if you get “JBO 30003” or database error.this post I will try to explain these xml and other files which you should know as a developer when you do development using ADF. with type as number and other attributes such as primary key etc:- . Once your create an Entity object(say EmpEO).xml (for EmpEO. name and data type of each attribute in eneity object. And a file 1) .jpr file is used to store the project related information like java files created in the project etc. 2) . two files which gets created.jpr” and “ViewController. ADF BC” as template.jpr”. two project gets created “Model” and “ViewController”.jpx file contains all the application modules defined in your Model project. it is EmpEO. if it is pointing to the correct database connection name. For example in the following figure. When you create an application in Jdeveloper with “JSF . then check the “_NamedConnection” parameter in the same file. Some times during development. one more file gets created under the Model/src/Model. attribute “EmployeeId” is driven from the column name “Employee_ID”. and the corresponding column to which that attribute represents. 4)EntityName.jws which is used for storing the projects added in the workspace(check your workspace on disk). 3) Model.

View object fetch the result set from the database based on the query on which it is based. and you want to provide some custom behavior when a new row is created.xml(for EmpAM. 7)ViewObjectNameImpl. you can overwrite create() method in same class. This file can be used to add custom code. hire date or other conditions. the application module class path. query of the view object which will fetch the desired resultset and the attributes which are there in view object. commission can be first calculated based on the employee salary.xml):It has name of the application module.View object is created at run time based on this . it is EmpVO.java):. such as in the setter method of commission of the employee.xml):-which specifies the entity object on which this view object is dependent. When you create an application module.5) EntityNameImpl. Similarly remove() and other methods.though it is not required to generate this file. Once you create view object whether entity based or read only. and all view objects which are added in .xml file. as default option it is created. it is EmpEoImpl. two files are create:8) ApplicationModuleName . An Application module which acts a container for view objects and take care of transaction handling.java):.When ever you create a new row in the view object. its EmpAM.two files are created:6) ViewObjectName.java(for EmpEO. It has getter and setter methods for the entity object attributes.java(For EmpVO. it is EmpVOImpl.xml(for EmpVO.

Once you create your jspx page with drag and drop any view object from data control palette.In this java class you will write methods like:→ iterating two or more view objects result set added in same application module to perform some business logic. as such . its EmpAMImpl. 9)ApplicationModuleName Impl. → calling a pl/sql code. Check the following figure. when I drag and dropped the EmpVO from the data control palette to ViewEmpDetails. I know you are now thinking of what is data control and data bindings.jspx. 11) DataBindings.xcfg:.jspx file is linked to its page definition file ViewEmpDetailsPageDef. so that it can be called from view layer.cpx:.the application module.cpx file is created under the view controller project → Application Sources → view .jspx page as ADF read only table. the data controls used by your application. Ya ya.xml):. Thats actually what I am thinking of my next blog post topic :).it has different configuration properties of the application module. This page contains information about page definition file corresponding to your jspx page.cpx file gets created. → writing a method and later on exposing it by adding it in client interface. type of DB connection etc.cpx file. the name of the database connection.java):. 12) PageDef. page definition file and DataBindings. 10) Bc4j.xml(for ViewEmpDetails. This information is used to create the view objects at runtime. its ViewEmpDetailsPageDef. it shows the contents of the DataBindings.xml:- Created DataBindings. It shows how ViewEmpDetails.java(For EmpAM.Page definition file created .This file is created for the first time and only once when you drag and drop any view object or method from data control palette to the jspx page.

2) bindings:. Or defines the methods exposed from application module in client tier(specified as methodIterator tag) to be executed. 12. Check the following figure.which defines various result sets(specified as iterator tag) to be executed when the page is loaded.1 ) executables:. ADF BC” as template are:13)faces-config. This file mainly contains following elements(tags):12.which acts as a controller by storing the navigations rules. And under bindings it specifies all attributes which will be available in the result set to be shown in UI.xml:. If you check the source of the ViewEmpDetails. This is the file which actually wries your UI components to the corresponding attributes in the view object.jspx page. .for each jspx page.it specifies the attributes which will be contained in the result set pointed by the iterator tag.when you drop a particular component from data control palette to your jspx page. And at last two files which are created by Jdeveloper itself under web-inf folder in ViewController project once you have create an application with “JSF . in which iterator EmpVO1Iterator specifies the employee details to be fetched when page is loaded. it will be clear to you that how it is wired to the elements present in the page definition. Or the details of method to be executed pointed by the methodIterator tag. And in addition to that it stores the configuration details about managed beans.

xml :.14)Web. .which is the standard j2ee deployment description file and provide application level configuration details.

Sign up to vote on this title
UsefulNot useful