Developer Tools
JDeveloper
You can quickly create a project in which to organize your application files. Then work in JDeveloper's IDE to create a read-only databound table and test run your application.
Create a New Application and Project: Use the Create Application wizard to create a generic application.
Create a Simple JavaBean Class: Use the Create Java Class dialog to create a starter Java class to use in this application, and then paste the sample code in the
.java source file.
Create a Service Class: Use the Create Java Class dialog again to create a service class, and then paste the sample code in the
.java source file.
Create a Data Control for the Service Cass: Choose Create Data Control from the context menu to define a data control for your business service, the JavaBean you defined earlier.
Create a JSF Page: Use the Create JSF Page dialog to create a starter blank page.
Bind an ADF Faces Table Component to the Service Bean: Use the Data Controls panel to drag and drop a read-only table on your page. Then run the JSF page to see how the table displays in a browser.
Set the Labels: After creating the table, use the Property Inspector, UI Hints section, to add customized labels for each column.
Bind to a Parameterized Method and a Parameter: Use a series of drag-and-drop steps from the Data Controls panel to create a read-only table, input text field, and command button that are bound to a method that takes a parameter.
The JDeveloper application is the highest level in the organizational structure. While you are developing your application, it stores information about the objects you are working with. At the same time, it keeps track of your projects and all environment settings. [ tell me more...]
DataBoundApp.
Application templates provide you with a quick way to create the project structure for standard applications with the appropriate combination of technologies already specified. The new application created from the template appears in the Application Navigator already partitioned into tiered projects, with the associated technology scopes set in each project. [ tell me more...]
Model as the project name. Then click
Finish
.
When you complete the steps for creating a new application and project, the Projects panel in the Application Navigator should look like this: [ tell me more...]
To follow along with the example, in this step and throughout the cards, enter values as shown in the instructions. Then you will be able to follow the steps in the cue cards exactly as written. [ tell me more...]
Contact as the class name, and
acme.bean as the package name. Accept the remaining default values and click
OK.
The new Java class includes only the class and package that you specified. [ tell me more...]
When you complete the steps for creating a Java class, the Application Navigator should look like this: [ tell me more...]
You will create and add a second Java class to your project. The new class will be a service class that represents the address book. It will return a collection of contacts. The steps are similar to the previous step, however, the second time you create a Java class in a project, the package name you specified earlier (
acme.bean) will display by default. [
tell me more...]
AddressBook as the class name.
acme.bean, and the remaining default values, then click
OK.
When you complete the steps for creating a service class, the Application Navigator should look like this: [ tell me more...]
Any JavaBean that publishes business objects and provides methods that manipulate business objects is defined as a business service. Examples of business services include web services, EJB session beans, or any Java class being used as an interface to some functionality. [ tell me more...]
Data controls define the data model returned by the business service. Several files are added to the Application Navigator when you create a data control: [ tell me more...]
When you complete the steps for creating a data control, the Application Navigator should look like this when the Data Controls panel is expanded: [ tell me more...]
The JSF pages you create for your application using ADF Faces can be JSP pages (which have the file extension
.jsp) or JSP documents written in XML syntax (which have the file extension
.jspx). You will create a JSF page as an XML document in the example. [
tell me more...]
View as the project name.
ContactList.jspx and confirm that
Create as XML Document (*.jspx)
is selected.
When you create a JSF page using the dialog, you can specify whether or not components on the page are exposed in a managed bean, to allow programmatic manipulation of the UI components. By default components are not exposed to managed beans. If you wish to bind components to managed beans, expand the Page Implementation section in the Create JSF Page dialog, then select one of the automatic binding options. [ tell me more...]
When you complete the steps for creating a JSF page, the visual editor should look similar to this: [ tell me more...]
You use the Data Controls panel to insert databound components into your page in the visual editor. When you insert a component from the Data Controls panel, a new Oracle ADF binding will be defined in the page's UI model and the inserted component will contain references to Oracle ADF bindings, using EL (expression language) syntax. [ tell me more...]
Since this is the first databound page in the project, the file
DataBindings.cpx is added to the
View project; and because this is the first databound component on the page,
ContactListPageDef.xml is created. Both files are located in the
Application Sources folder in the
View project. [
tell me more...]
By default, JDeveloper automatically configures an integrated server named Integrated WebLogic Server that references a user-specific instance of Oracle WebLogic Server bundled with the IDE. Integrated WebLogic Server is a Java EE runtime service for packaged archive deployment. Based on zero-copy deployment, Integrated WebLogic Server lets you run and test an application and its projects as a Java EE application in a Java EE container. No special connection setup is required to use Integrated WebLogic Server. You can run the entire application, a project, or individual JSF pages. [ tell me more...]
When you complete the steps for adding a databound table to the JSF page, the visual editor should look similar to this: [ tell me more...]
Oracle ADF control hints provides a centralized mechanism for any JavaBeans-based business service data item to be rendered in a consistent manner across all client types. This mechanism, known as control hints, permits application developers to centralize certain UI settings across clients and thereby control many aspects of the way the UI interacts with the data item. Because the control hints are set at the level of the business service, it can also reduce the amount of UI coding. [ tell me more...]
Contact Name in the
Label field and press Enter.
The file that defines the value for the control hints you set depends on the specific business service used for the project. In the case of beans-based business services, (including JavaBeans, Enterprise JavaBeans, and Oracle TopLink), by default JDeveloper generates a standard
.properties file for the project and saves the control hint definitions as translatable strings. [
tell me more...]
Email Address in the
Label field.
You can also use the Edit Attribute dialog to add ADF control hints. To open the Edit Attribute dialog, first you double-click the
.xml definition file (for example,
Contact.xml) in the Application Navigator to open the file in the default overview editor. [
tell me more...]
When you run the JSF page again, it should look similar to this table in the browser, with the new labels you added displayed in the column headers: [ tell me more...]
In addition to inserting complete tables, you can use the Data Controls panel to insert individual databound components such as input text fields and command buttons into your JSF page. [ tell me more...]
ContactLookup.jspx and confirm that
Create as XML Document (*.jspx)
is selected.
When you drag and drop a parameterized method from the Data Controls panel, the Edit Action Binding dialog displays for you to set parameter values, if you so desire. The rest of the fields in the dialog are set for you declaratively. [ tell me more...]
Enter part of name: followed by two spaces.
Find.
padding:5.0px in the
InlineStyle field.
When you complete the steps for binding to a parameterized method and parameter, the
ContactLookup.jspx page in the visual editor should look similar to this: [
tell me more...]
Copyright © 1997, 2009, Oracle. All rights reserved.