You can quickly create a project in which to organize your application files. Then work in JDeveloper's IDE to develop and test run your JSF application.
Create a New Application and Project: Use the Create Application wizard to create a generic application.
Create a JSF Page: Use the Create JSF Page dialog to create a starter page structure with a JSP page directive, and two taglib directives for the JSF Core and HTML tag libraries.
Create a Java Class: Use the Create Java Class dialog to create a starter java class, and then use the source editor to add sample code to the
.java source file.
Register the Class as a Managed Bean: Use the overview editor for
faces-config.xml to register the new class as a managed bean.
Design the UI: Use the JSP/HTML visual editor and other design tools to easily assemble the elements of a user interface (UI) for your JSF application.
Bind the UI to the Managed Bean: Use the Expression Builder to bind an attribute value to data using JSF expression language.
Finish the Code and Run the JSF Page: Use the source editor to add additional sample code to the
.java source file. Then run the JSF page to see how it displays in a browser.
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...]
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...]
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, enter values or select options as shown in the instructions throughout the cue cards. Then you will be able to follow the steps in the cue cards exactly as written. [ tell me more...]
Register.jspas the file name.
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, by default the Application Navigator should look something like this: [ tell me more...]
A new class can be created and added to your project after you build the initial set of JSF application files, to create a simple bean object. [ tell me more...]
PersonInfo. Accept the remaining defaults and click OK.
In the editor window, the tabs at the top of the editor window are the document tabs. Selecting a document tab gives that file focus, bringing it to the foreground of the window in the current editor. The tabs at the bottom of the editor window for a given file are the editor tabs. [ tell me more...]
When you complete the steps for creating a Java class, the Application Navigator should look like this: [ tell me more...]
Your application needs certain resources, such as files containing the messages and text to be displayed by the application pages, and beans defining the data for the application to work with. [ tell me more...]
While JSF allows you to bind a component in the user interface directly to any JavaBean, the best choice is to use JSF managed beans. [ tell me more...]
personDataas the bean name.
When you complete the steps for registering the Java class as a managed bean, you should see the managed bean definition in the overview editor: [ tell me more...]
In the example, you will design the user interface by adding HTML and JSF UI components to your JSF page. You will use a combination of integrated tools (namely, the Component Palette, JSP/HTML visual editor, and Property Inspector) to design the page. When you make a change to a page in one of these tools, the change is reflected in the others as well. [ tell me more...]
Registration Format the top of the page.
By default, JDeveloper does not automatically create text resources in the page's resource bundle when you edit UI components in the visual editor. If you wish to use a resource bundle, select the
Automatically Synchronize Bundle
option in the Project Properties dialog,
Resource Bundle page. The default bundle type is
Properties Bundle, which is a
PropertyResourceBundle properties file or a plain-text file containing translatable text. A properties file can contain values only for String objects. If you need to store other types of objects, use a
ListResourceBundle instead. [
tell me more...]
3and the number of columns to
2. Accept the other default values and click OK.
Tables can be used to design page layout, as in this example, as well as to lay out data, and position text and graphics on a web page. The Insert Table dialog helps you to add the HTML
<table> element and set up the initial properties in the skeleton table. [
tell me more...]
The two JSF libraries that provide the JSF components were included in your page when you created it. They are: [ tell me more...]
While working with standard JSF components in JDeveloper, you can view and set component tag attributes in the Property Inspector. Most of the standard JSF component tag attributes accept value expressions, that is,
using JSF Expression Language (EL). For example,
tell me more...]
Sign Me Up.
Username:. In the first column, second row, click in the cell and type
When you complete the steps for designing the user interface, the Application Navigator should look like this: [ tell me more...]
In JSF, you send and display dynamic data by binding UI components or component tag attribute values to data in the model layer. This data can be held in any JavaBean within the application. However by registering the bean as a managed bean, at runtime the JSF application automatically instantiates the bean on demand, when the bean is accessed through an expression language (EL) expression from a page for the first time. Property values on the bean can then be displayed, and can also be updated when data from the page is submitted. [ tell me more...]
usernamevariable. Then click OK.
Introduced in Java EE 5.0 and JSP 2.1, the unified expression language (EL) is a union of the expression language offered by JSP 2.0 and the expression language created for JSF technology 1.0. The unified EL continues to let page authors use EL expressions to bind UI component values and objects to backing bean properties or reference backing bean methods from UI component tags. [ tell me more...]
When you bind the UI to the managed bean using the Expression Builder, JDeveloper adds EL expressions to the Input Text and Command Button components for you. [ tell me more...]
To finish this simple JSF application, you will add code in the Java source file,
PersonInfo.java. The sample code calls the business method
saveInfo that you added to the bean in an earlier cue card. The method takes two parameters and then, instead of saving the data, simply writes the data to the console. [
tell me more...]
saveInfothat you previously added to the bean. The method takes two parameters and writes the data to the console.
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 run the JSF page, the registration form in your browser should look similar to this: [ tell me more...]
Copyright © 1997, 2009, Oracle. All rights reserved.false ,,,,,,,,,,,,,,,