Developer Tools
JDeveloper
You can work in JDeveloper's IDE to create JSF declarative component definitions in a project, deploy the project that contains the definitions, and then use the declarative components on JSF pages in another project.
Create New Applications: Use the Create Application wizard to create one ADF web application and one generic application.
Create a Declarative Component Definition in a Project: Use the Create JSF Declarative Component dialog to create declarative component metadata, and then use ADF Faces components to create the declarative component layout.
Deploy the Project that Contains Declarative Component Definitions: Create a deployment profile for an ADF Library JAR and deploy the project.
Load the ADF Library JAR in a Project: Use the Resource Palette to add the ADF Library JAR to a project that will make use of the declarative components.
Create a Page and Add the Declarative Component: Use the Create JSF Page dialog to add a new page, and then insert the declarative component on the page just like you would with any other ADF Faces component.
Use the Declarative Component: Use the Property Inspector to add a label. Use the Create Managed Bean dialog to add and attach a managed bean method.
Use the Source Editor to Add Java Code: In the source editor, add event code to the bean method.
The JDeveloper application is the highest level in the organizational structure. It stores information about the objects you are working with, while you are creating your application. It keeps track of your projects and the environment settings while you are developing. [ tell me more...]
MyWebApp.
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...]
DeclarativeComponents. Select
Generic Application in the
Applica
tion Template
list, and click
Next
.
DeclarativeComponents, and click
Finish
.
Libraries are provided for the various APIs and technologies installed with JDeveloper. These libraries are categorized as extension libraries, which are shared by all users of an install. [ tell me more...]
When you complete the steps for creating applications, the Projects panel in the DeclarativeComponents application 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...]
myMenubar as the declarative component name. Click
Add Ta
g Library
to open the Create Declarative Component Tag Library dialog. To follow along with the example, use
MyDeclComponents for the tag library name,
/mycomponents for the tag library URI, and
mc for the tag library prefix. Then click
OK.
The declarative component name you specify in the Create JSF Declarative Component dialog will be used as the display name of the declarative component in the Component Palette, as well as the name of the Java class generated for the component tag. Only alphanumeric characters are allowed in the name for the declarative component, for example,
SampleName or
SampleName1. [
tell me more...]
moreMenus in the
Name field.
Declarative components can have facets, attributes, and methods that enable page authors to configure how the declarative component is used on different pages or different portions of a page. For instance, you might add attributes to allow page authors to change the labels of the individual buttons in the declarative component. [ tell me more...]
menuLabel in the
Name field. Accept
java.lang.String as the default type.
method1 as the default method name. Enter
void method(javax.faces.event.ActionEvent) in the
Method Signature field. Click
OK.
When you complete the steps for creating the metadata for your declarative component, the visual editor displays the declarative component definition file as a blank page in the visual editor. In the Structure window, you should see something like this, if the af:componentDef node is expanded [ tell me more...]
Immediately after defining the metadata for a declarative component, JDeveloper presents the declarative component definition file (which is a
.jspx file) as a blank page in the visual editor: [
tell me more...]
File.
Delete.
delete.png) for the menu item component. When prompted, click
Yes
to add the icon image under the document root and then click
Save.
You can add any image by navigating to it and selecting it. To choose an image from the JDeveloper images library, in the Edit Property dialog locate the
<jdev_home>/jdeveloper/ide/lib/ folder and double-click
oicons.jar to open it. Then navigate to
oracle/javatools/icons and select an icon, such as
delete.png and click
OK. [
tell me more...]
user.png) for the menu item component you just added. When prompted, click
Yes
to add the icon image under the document root and then click
Save.
#{attrs.menuLabel}. Click
OK. You should see the expression you created in the
Text field in the Property Inspector.
Expression Language (EL) allows you to use simple expressions in JSF pages to access data stored in objects or reference and invoke methods. [ tell me more...]
#{component.handleMethod1}in the
ActionListener field in the Property Inspector.
When you complete the steps for defining the layout of your declarative component, the visual editor should look similar to this: [ tell me more...]
The web pages that will consume declarative components cannot be in the same project where the declarative components are defined. To share or reuse declarative components, first you will have to deploy the project that contains those component definitions to an ADF Library JAR file. If you have more than one definition project, each project must be deployed to one ADF Library JAR. [ tell me more...]
adflibDeclarativeComponents1 as the deployment profile name. Click
OK.
JDeveloper uses the following format to create a default deployment profile name for you: [ tell me more...]
When you deploy a declarative component definition project to an ADF Library JAR, JDeveloper compiles the project, creates the necessary artifacts and control files, and packages the relevant project files (such as any image files) into a JAR. The JAR also includes the tag library descriptor file (
.tld file), and component and tag classes created for the declarative component. [
tell me more...]
When you finish deploying the declarative component definition project to an ADF Library JAR file, the Deployment Log window should look something like this: [ tell me more...]
To share ADF Library JAR files that contain reusable components such as declarative components, the JAR files must be stored in a repository where other developers can access them and import them into their own projects. You will use a file system connection to provide the repository for your declarative component ADF Library JAR. [ tell me more...]
The Resource Palette provides an easy and efficient way to distribute and use ADF Library JAR files. Once an ADF Library JAR is added to the Resource Palette, other developers will be able to search for it and add it to their projects. [ tell me more...]
DeclarativeComponents as the connection name.
When you add the ADF Library JAR to a consuming project, JDeveloper adds the tag library that contains the declarative component to the project's list of JSP tag libraries. [ tell me more...]
When you finish creating a File System connection for the ADF Library JAR, the Resource Palette should look something like this: [ tell me more...]
The web pages that will consume the declarative component cannot be in the same project where the declarative component is defined. You will create your web page in the ViewController project in the MyWebApp application. [ tell me more...]
The
adfc-config.xml file is the default page flow diagram JDeveloper provided when you created an application based on the
Fusion Web Application template.
adfc-config.xml is the default file name for an unbounded task flow. On this diagram, you can define the activities and control flow rules that interact to allow a user to complete a task. In the example, you will define one view activity on the diagram to represent the page you will create. [
tell me more...]
myPage.
Adding declarative components on a page is the same as adding any other ADF Faces components. You select a declarative component from the Component Palette and drop it on the desired location on the page. [ tell me more...]
When you complete the steps for creating a page and adding the declarative component, the visual editor should look something like this: [ tell me more...]
Using declarative components on a page is the same as using any other ADF Faces components. To modify a declarative component, you can use any combination of design tools, namely, the Structure window and Property Inspector. [ tell me more...]
Hello as the
MenuLabel property.
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...]
myBean in the
Bea
n Name
field, and
MyBean in the
Class Name
field. Accept
java.lang.Object in the
Extends
field, and
request as the
Scope
value. Make sure the
Generate Class If It Does Not Exist
box is selected. Click
OK.
myMethod in the
Method Name
field. Click
OK.
#{myBean.myMethod} in the
Method1 field in the Property Inspector.
Typically, you can put separators between menus by grouping menu components within
af:group. For example: [
tell me more...]
Edit as the
Text property and press Enter.
Cut as the
Text property.
Copy as the
Text property value for the menu item and press Enter.
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 modifying the declarative component on the page, the visual editor should look something like this: [ tell me more...]
Copyright © 1997, 2009, Oracle. All rights reserved.