0
点赞
收藏
分享

微信扫一扫

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View

infgrad 2022-03-11 阅读 69


2013-05-01 Created By BaoXinjian

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_数据一、摘要

在本教程中,您将使用甲骨文的JDeveloper 11 g版本11.1.2.0.0来构建一个web应用程序。

建立数据模型,您可以使用EJB图,EJB 3.0和Java Persistence API(JPA)。

web客户端使用JavaServer Faces(JSF)。

创建一个主从复合结构主页查询和编辑功能的用户界面。

一个任务流,搜索功能,也作为一个地区添加到页面中。

Building a Web Application Using EJB, JPA, and JavaServer Faces

Part 1: Building the Data Model with EJB 3.0 Using the EJB Diagrammer

Step 1: Create a New Application and Projects

Step 2: Create the Persistence Model

Step 3: Create an EJB Diagram and a Session Bean

Step 4: Create a Facade Bean to Expose for the Client Application

Step 5: Create ADF Data Controls from EJB Session Beansclose

Part 2: Building the View Projectclose

Step 1: Create a Master-Detail JavaServer Faces Page

Step 2: Bind Data Control Components to the Page

Step 3: Run and Test the Page

Step 4: Add Create and Delete Functionalities to the Page

Part 3: Adding and Exposing a New Method to the UIclose

Step 1: Add a New Method to the Entity and Expose it

Step 2: Build a Bounded Task Flow with Two JSF Pages

Step 3: Use the Task Flow as aRegion in the mainHR pageStep 4: Run the mainHR Page

Part 4: Testing the Facade Inside and Outside the Java EE Container

Step 1: Add a New Method to the Entity and Expose it

Step 2: Run the Java Service outside Java EE container


ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_数据_02二、案例1 - Create a Master-Detail JavaServer Faces Page

1. 创建ADF Facelets页面

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_ADF_03

2. 添加组件后,最终显示效果如下

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_ADF_04

3. 测试运行,结果如下

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_java_05


ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_java_06三、案例2 - Bind Data Control Components to the Page

1. 绑定Department数据到页面

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_java_07

2.  绑定Employee Master数据到页面

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_持久化_08

3.  绑定Employee Detail数据到页面 

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_数据_09

4.  绑定Employee信息到表

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_数据_10


ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_数据_11四、案例3 - Run and Test the Page

1. 运行测试,Master-Detail结构

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_持久化_12

2. 运行测试图标

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_ADF_13 

3. 修改Salary后,查看图标的显示

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_ADF_14

4. 图标更新如下

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_java_15


ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_持久化_16五、案例4 - Add Create and Delete Functionalities to the Page

1.  新增Create和Delete按钮

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_ADF_17

2.  建立持久化层

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_java_18

3. 添加持久化按钮

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_java_19

4. 运行测试,Create的department

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_持久化_20

5.  创建数据后,进行持久化

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_ADF_21

6. 查看数据库的资料

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_ADF_22


Thanks and Regards

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_持久化_23


2013-05-01 Created By BaoXinjian

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_持久化_24一、摘要

在本教程中,您将使用甲骨文的JDeveloper 11 g版本11.1.2.0.0来构建一个web应用程序。

建立数据模型,您可以使用EJB图,EJB 3.0和Java Persistence API(JPA)。

web客户端使用JavaServer Faces(JSF)。

创建一个主从复合结构主页查询和编辑功能的用户界面。

一个任务流,搜索功能,也作为一个地区添加到页面中。

Building a Web Application Using EJB, JPA, and JavaServer Faces

Part 1: Building the Data Model with EJB 3.0 Using the EJB Diagrammer

Step 1: Create a New Application and Projects

Step 2: Create the Persistence Model

Step 3: Create an EJB Diagram and a Session Bean

Step 4: Create a Facade Bean to Expose for the Client Application

Step 5: Create ADF Data Controls from EJB Session Beansclose

Part 2: Building the View Projectclose

Step 1: Create a Master-Detail JavaServer Faces Page

Step 2: Bind Data Control Components to the Page

Step 3: Run and Test the Page

Step 4: Add Create and Delete Functionalities to the Page

Part 3: Adding and Exposing a New Method to the UIclose

Step 1: Add a New Method to the Entity and Expose it

Step 2: Build a Bounded Task Flow with Two JSF Pages

Step 3: Use the Task Flow as aRegion in the mainHR pageStep 4: Run the mainHR Page

Part 4: Testing the Facade Inside and Outside the Java EE Container

Step 1: Add a New Method to the Entity and Expose it

Step 2: Run the Java Service outside Java EE container


ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_数据_25二、案例1 - Create a Master-Detail JavaServer Faces Page

1. 创建ADF Facelets页面

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_java_26

2. 添加组件后,最终显示效果如下

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_持久化_27

3. 测试运行,结果如下

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_持久化_28


ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_持久化_29三、案例2 - Bind Data Control Components to the Page

1. 绑定Department数据到页面

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_数据_30

2.  绑定Employee Master数据到页面

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_持久化_31

3.  绑定Employee Detail数据到页面 

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_数据_32

4.  绑定Employee信息到表

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_数据_33


ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_数据_34四、案例3 - Run and Test the Page

1. 运行测试,Master-Detail结构

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_持久化_35

2. 运行测试图标

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_java_36 

3. 修改Salary后,查看图标的显示

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_ADF_37

4. 图标更新如下

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_数据_38


ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_java_39五、案例4 - Add Create and Delete Functionalities to the Page

1.  新增Create和Delete按钮

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_java_40

2.  建立持久化层

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_持久化_41

3. 添加持久化按钮

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_ADF_42

4. 运行测试,Create的department

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_java_43

5.  创建数据后,进行持久化

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_ADF_44

6. 查看数据库的资料

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_数据_45


Thanks and Regards

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View_持久化_46

举报

相关推荐

0 条评论