2013-05-01 Created By BaoXinjian


在本教程中,您将使用甲骨文的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


1. 创建ADF Facelets页面

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

3. 测试运行,结果如下


1. 绑定Department数据到页面

2.  绑定Employee Master数据到页面

3.  绑定Employee Detail数据到页面

4.  绑定Employee信息到表

案例3 - Run and Test the Page


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

2. 运行测试图标

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

4. 图标更新如下

案例4 - Add Create and Delete Functionalities to the Page


1.  新增Create和Delete按钮

2.  建立持久化层

3. 添加持久化按钮

4. 运行测试,Create的department

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

6. 查看数据库的资料

Thanks and Regards

ADF_Starting系列7_使用EJB/JPA/JSF通过ADF构建Web应用程序之创建UI View的更多相关文章

  1. ADF_Starting系列8_使用EJB/JPA/JSF通过ADF构建Web应用程序之扩展UI Method

    2013-05-01 Created By BaoXinjian

  2. ADF_Starting系列9_使用EJB/JPA/JSF通过ADF构建Web应用程序之测试J2EE Container

    2013-05-01 Created By BaoXinjian

  3. IDEA 2017.3 新版本中创建 JSF Web 应用程序缺少 web.xml 的解决办法

    IDEA 2017.3 新版本中默认创建一个 Web 应用程序很可能不会自动创建 web.xml 文件.虽然说从 JavaEE 6.0 开始 Servlet 3.0 规范中就新增了一些注解可以免去传统 ...

  4. JSF+EJB+JPA总体思路

    前言: JSF+EJB+JPA 其实我并没有想象中的难,只是想做好,建立在正确的地方应用,真正的困难. 良好的技术,在错误的地方做应用,这是唯一能够被垃圾. 用. 重量级企业应用能够使用这个主要的3层 ...

  5. Problems found loading plugins: Plugin "GlassFish Integration" was not loaded: required plugin "Java EE: EJB, JPA, Servlets" is disabled.

    idea启动报错:并且无法部署web项目 Problems found loading plugins: Plugin "GlassFish Integration" was no ...

  6. SpringBoot系列之Spring Data Jpa集成教程

    SpringBoot系列之Spring Data Jpa集成教程 Spring Data Jpa是属于Spring Data的一个子项目,Spring data项目是一款集成了很多数据操作的项目,其下 ...

  7. IDEA报错Plugin "XXX" was not loaded: required plugin "Java EE: EJB, JPA, Servlets" is disabled.

    Java项目转Web项目 把java项目转成web项目时,发现Facets点击+号没有出现web选项. 经查询发现是插件没有正常加载导致的. 解决方案 1.没找到其他原因,重启即可. 2.我的是插件没 ...

  8. Spring全家桶系列–SpringBoot之入门JPA

    //本文作者:cuifuan 什么是JPA? 一种规范,并非ORM框架,也就是ORM上统一的规范 用了之后可以做什么,为什么要用? 代码解释: 实体类 package com.example.spri ...

  9. [转载][翻译] 利用JSF、SpringFramework和Hibernate构建Web应用的实例讲述

    [原作者] Derek Yang Shen[原文链接] http://www.javaworld.com/javaworld/jw-07-2004/jw-0719-jsf.html[源码链接] htt ...

随机推荐

  1. CentOS7下安装FTP服务

    1.安装vsftp 1.1.安装vsftp,测试安装的vsftpd的版本是:vsftpd.x86_64 0:3.0.2-11.el7_2 yum -y install vsftpd 1.2.修改配置文 ...

  2. jQuery:常用方法一览

    Attribute:$(”p”).addClass(css中定义的样式类型); 给某个元素添加样式$(”img”).attr({src:”test.jpg”,alt:”test Image”}); 给 ...

  3. at

    1.这个命令对于自己建立的虚拟机很有帮助,比如你想过半个小时关机: [root@oc3408554812 ~]# at now + 30 minutesat> cd /tmp -h nowat& ...

  4. Git切换分支出现提示'SSL端口:44301'及解决方案

    切换分支出现如下提示,并且自动签出了项目文件csproj. 修改项目文件csproj 修改前: <UseIISExpress>true</UseIISExpress> < ...

  5. 生成XML文件

    import java.io.FileOutputStream;import java.io.IOException; import org.jdom.Document;import org.jdom ...

  6. js里function的apply vs. bind vs. call

    js里除了直接调用obj.func()之外,还提供了另外3种调用方式:apply.bind.call,都在function的原型里.这3种方法的异同在stackoverflow的这个答案里说的最清楚, ...

  7. JavaScript 用法

    JavaScript 用法 HTML 中的脚本必须位于 <script> 与 </script> 标签之间. 脚本可被放置在 HTML 页面的 <body> 和 & ...

  8. tornado autoreload 模式

    在用tornado进行 网络程序编写的时候,肯定要对代码进行修修改改,如果每次都要重启server的话,会是很麻烦的事情.tornado提供了autoreload模式. 一,要开始autoreload ...

  9. 使用本地JConsole监控远程JVM (转)

    问题背景   Tomcat经常崩溃crash,想看看JVM内存使用情况,就想到了用Jconsole监控,以前只是监控本地的JVM,这次要监控远程的,遇到了不少问题.   经过几个小时的努力,参考了众多 ...

  10. Manacher

    HDU 3068 Manacher裸题 #include <cstdio> #include <cstring> ; ],STR[Maxn<<]; ],Id,Mx; ...