Sunday Mar 23, 2014

Getting Started with Oracle ADF Essentials in OEPE

Frederic Desbiens takes you through an introduction on how you can use ADF Essentials to develop and deploy ADF applications with OEPE and GlassFish.

Thursday Feb 21, 2013

ADF Application Development Using OEPE v12.1.1.2

Overview

OEPE has been iteratively providing more ADF tooling with each release. The latest v12.1.1.2 release provides features that allows us to develop a fully functioning ADF application. The following tutorial describes HR sample application development using ADF features supported by OEPE release v12.1.1.2. It covers some of the key ADF toolings like Data Control generation on EJB, generation of Data First & UI First scenario, Page Definition editor, ADF Table generation, generation of DVT graph and some of the cool AppXray features.

Development Environment Set up

OEPE v12.1.1.2
From OTN, download and install OEPE w/ WLS Runtime
Oracle DB 10g / 11g
Use the sample HR schema bundled in Oracle DB

Create ADF Application

  • Start Eclipse with an empty workspace
  • Switch to Java EE perspective
  • Launch File | New | Oracle ADF Application wizard
  • Type in application name, "HR" 
  • Create a new run time selecting WebLogic Server 10.3.6 instance 
  • Launch "New JPA Project" wizard, click on Modify... button and select utility module facet
  • On the JPA project wizard, click Next and navigate to "JPA Facet" Page
  • For platform, select "EclipseLink 2.1.x" and verify the selection of "WebLogic System Library (Oracle TopLink 11gR1)" implementation
  • Click on "Add connection..." and create a new 10g/11g "Oracle Database Connection"
  • On the JPA project wizard, click on "Override default schema from connection" and click Finish
  • NOTE: Click "No" on switch perspective dialog
  • On the ADF Application wizard, click Finish

Figure 1: Oracle ADF Application wizard

Generate Data Model

  • In Project Explorer, right click on "HRModel" | New | "JPA Entities from Tables"
    • On "Select Tables", pick "Employees" & "Department" table and click Next
    • Retain default "Table Associations" and click Next
    • On "Customize Default Entity Generation", type in a package name and click Finish
  • Open Employee.java and update with @NamedQuery(name="findAllEmps", query="select e from Employee e ")
  • Open Department.java and update with @NamedQuery(name="findAllDepts", query="select d from Department d")
  • Save the files
  • Generate Data Control artifacts
    • In Project Explorer, right click on "HRModel" | New | Other | Oracle | Application Development Framework | select "ADF Data Model Components" and click Next
    • Type in package name, ex: ejb.beans
    • Type in class name, ex: "HRModelSessionEJB" and click Next
    •  Double click on "Employee" entity and move it over to selected panel
    • Click Next, retain default object type "ADF Data Control" and click Finish

Figure 2: ADF Data Model Component wizard





Iterative Data Control artifact generation

  • In Project Explorer, expand HRModel | src | ejb.beans and right click on "HRModelSessionEJB" | Model Components | Edit Session Bean Facade ...
  • On Edit Session Bean Facade, double click on Department and move it over to selected panel, click Finish
  • In Project Explorer, right click on HRModel | src | model | "HRModelSessionEJB" | select Model Components | Create ADF Data Control

Figure 3: Edit Session Bean Facade and ADF Data Control



Data First, Department Id artifact generation

  • Create ADF page
    • In Project Explorer, right click on "HRWeb" project | New | JSP File, type in file name "emplist.jspx" and click Next
    • On template selection page, select "ADF Rich Faces Page - Three Columns (xhtml, xml syntax)" and click Finish
    • In the JSP source view, modify the facet order, i.e. move "f:facet name=start" before "f:facet name=center"
  • Generate ADF OutputText tag on departmentId artifact
    • In the JSP source view, place the cursor within "f:facet name=start" tag
    • On the Palette view, switch to Tags tab, expand ADF Faces | DND "Panel Form Layout" and click Finish 
    • On the Palette view, switch to Data tab, expand HRModelSessionEJBLocal | findAllDepts, DND "departmentId" within panelFormLayout as "Text | ADF Output Text w/ Label"
    • save the page

Figure 4: Data First, DND data control artifact

Define artifact in Page Definition editor

  • In Project Explorer, right click on emplist.jspx | Open Page Definition
  • Define new attribute value binding
    • On Page Definition editor, click on + to add new Binding
    • On the New Binding dialog, select "attributeValues" and type in id "deptName", click OK
    • On the details panel, click on "Browse" button
    • On "Rebind Attribute selection", expand findAllDepts and select "departmentName", click OK
    • NOTE: The Page definition editor validates in-valid/undefined binding or iterators.
    • save and close page definition file

Figure 5: Page Definition editor

UI First, Department Name artifact generation

  • Switch to emplist.jspx and place the cursor after closing panelLabelAndMessage tag
  • On the Palette View, switch to "Tags" tab
  • Expand "ADF Faces" node and DND "Panel Label And Message" tag
  • Click on the binding button next to "Label" field and select "bindings.deptName.hints.label", click Finish
  • In the source view, place the cursor within panelLabelAndMessage tag and from Palette view, DND "Output Text" tag
  • Click on the binding button next to "Value" field and select "bindings.deptName.inputValue", click Finish

Figure 6: Panel Label & Message and Output Text tag editors



Generate ADF Tag from Data Palette view

  •  In the JSP source view, place the cursor after closing panelLabelAndMessage tag (i.e. after deptName)
  • On the Palette view, switch to Data tab, right click on "findAllDepts" | Insert in the page | ADF Navigation | Navigation Buttons

Figure 7: Data Palette | Data control artifact context menu item

Generate Employee Table

  •  In the JSP source view, place the cursor within f:facet name=center tag
  • On the Palette view, switch to Data tab, DND "findAllDepts | employees" as Table | ADF Table...
  • On the Table configuration page, select columns EmployeeId, FirstName, LastName and PhoneNumber, remove the remaining entries and click Finish

Figure 8: ADF Table tag editor


Modify Employee Table behavior

  •  In the JSP source view, place the cursor on table tag
  • On the Properties view, click on "Edit Component Definition"
    • Check "Read-only Table", select "Single row", and "Enable sorting"
  • Click Finish and save the page

Figure 9: Edit Component definition editor

Generate DVT Graph

  • In the JSP source view, place the cursor within "f:facet name=end" tag
  • In the Data Palette view, right click on findAllDepts | employees | Insert in the page | Graph | Bar Graph
    • Retain default Bar Graph Type and select second layout, click Next
    • Bars: Click "Add attribute" and select "employeeId"
    • X axis: Click "Add attribute" and select "salary", click Finish

Figure 10: Bar Graph wizard

Smart editor, Graphical representation of Binding references

  •  In the JSP source view, place the cursor on jsp:root tag
  • On the Properties view, switch to "Bindings" tab
    • You can navigate to the binding definition, iterator or referenced tag on the JSP page
    • Also, you can place the cursor on individual tag to view the corresponding binding references

Figure 11: Smart editor binding references

AppXaminer, Graphical representation of ADF artifact references

  • In Project Explorer, right click on emplist.jspx | Show AppXray Dependencies
    • The AppXaminer displays all web artifact references in JSP page, ex: references to resource bundle, image files, adf binding references, jsf managed bean references.
    • For each artifact reference, you can navigate deeper to source file, ex: in case of adf binding, you can navigate all the way up to JPA bean class.
    • The reference link on AppXaminer provides navigation to respective source file
    • In addition to JSP, the AppXray visualization works on other web artifact files, ex: taskflow, page definition, data binding, data control, managed bean or resource bundle file

Figure 12: AppXaminer visualization





Deploy and run ADF application on WLS P5 RT

  • In the Servers view, click on "new server wizard..." link
  • Select WLS PS RT, click Next
    • On "Specify a WebLogic domain directory" page click on create button and create a domain with JRF extension
    • On New Server dialog, click Finish
  • Start the server
  • NOTE: The eclipse internal browser has a known issue with DVT tag rendering, try the following step to use external browser
    • Window | Preferences | General | Web Browser | switch to "Use external web browser" and select Firefox / IE / Chrome
  • In Project Explorer, right click on emplist.jspx | Run As | Run on Server, select WebLogic Server 10.3.6 domain and click Finish

Figure 13: WLS server configuration and RT output of emplist.jspx




References

Wednesday Dec 05, 2012

The New OEPE 12.1.1.2 is Out - ADF Development and More

Yes you are reading it right. Having announced just last week the general availability of our OEPE release 12.1.1.1.1 which includes support for developing applications to the Oracle Cloud. Today we are happy to announce the release of OEPE 12c (12.1.1.2) which includes various improvements for Webservices policies and security, and new features for implementing ADF applications in Eclipse Juno (3.8.1 and 4.2.1) as well as, bug fixes for other areas of the product - all of the above on top of Oracle Cloud support from the previous release.

Many of the new features on this release have been added based on the feedback that we got from the ADF community, so, many thanks to you all and please, keep them coming! The main new features for this release are:

  • ADF Bindings support on Taskflow activities on the diagram.
  • Support for multi-node tree component bidings.
  • Automatic ID generation for ADF Faces components.
  • Support drag-n-drop of components and bindings into the page outline in addition to the regular jsp editor.
  • Improved Webservices policies and security. 

You can download the new versión from here. Remenber that you can send us your feedback or post your questions on our forum on OTN

The OEPE Team. 

Tuesday Nov 06, 2012

We'll be at QCon San Francisco!

Oracle Technology Network is a Platinum sponsor at QCon San Francisco. Don’t miss these great developer focused sessions:

Shay Shmeltzer - How we simplified Web, Mobile and Cloud development for our own developers? - the Oracle Story

Over the past several years, Oracle has beendeveloping a new set of enterprise applications in what is probably one of the
largest Java based development project in the world. How do you take 3000 developers and make them productive? How do you insure the delivery of cutting edge UIs for both Mobile and Web channels? How do you enable Cloud based
development and deployment? Come and learn how we did it at Oracle, and see how the same technologies and methodologies can apply to your development efforts.

Dan Smith - Project Lambda in Java 8

Java SE 8 will include major enhancements to the Java Programming Language and its core libraries.  This suite of new features, known as Project Lambda in the OpenJDK community, includes lambda expressions, default methods, and parallel collections (and much more!).  The result will be a next-generation Java programming experience with more flexibility and better abstractions.   This talk will introduce the new Java features and offer a behind-the-scenes view of how they evolved and why they work the way that they do.

Arun Gupta - JSR 356: Building HTML5 WebSocket Applications in Java

The family of HTML5 technologies has pushed the pendulum away from rich client technologies and toward ever-more-capable Web clients running on today’s browsers. In particular, WebSocket brings new opportunities for efficient peer-to-peer communication, providing the basis for a new generation of interactive and “live” Web applications. This session examines the efforts under way to support WebSocket in the Java programming model, from its base-level integration in the Java Servlet and Java EE containers to a new, easy-to-use API and toolset that are destined to become part of the standard Java platform.

The complete conference schedule is here: http://qconsf.com/sf2012/schedule/wednesday.jsp

But wait, there’s more! At the Oracle booth, we’ll also be covering:

  • Oracle ADF Mobile
  • Oracle Developer Cloud Service
  • Oracle ADF Essentials
  • NetBeans Project Easel
Hope to see you there! 

Monday Sep 24, 2012

Announcement: New Tutorial - Using ADF Faces and ADF Controller with OEPE

We are happy to announce the publication of our newest tutorial, that explores some of the latest features added in our OEPE 12c release for ADF Development. The tutorial walks you through the creation of an ADF application that uses the ADF Faces Rich Client components, in combination with the ADF Controler, ADF Model and JPA. By developing this tutorial you will work and understand various features added into OEPE 12c that are specific to ADF development such as:
  • ADF taskflow editor
  • Visual pageDefinition editor
  • ADF integration with AppXRay
  • Navigation across artifacts such as pages, pageDefinition, managed beans, etc.
  • Property inspector for ADF Faces components.
Stay tunned for more and exciting tutorials that explore this and much more OEPE features. And of course your feedback is always welcome!

Thursday Sep 06, 2012

OEPE and Oracle ADF at Oracle OpenWorld!

OEPE's support for Oracle ADF is really starting to cook!  

If you're going to Oracle OpenWorld 2012, check out this list that focuses on Oracle ADF.  It's long, but you can readily search for "Eclipse" to find the OEPE related sessions.  

Also here: https://oracleus.activeevents.com/connect/focusPDF.do?focusID=21149

Monday Aug 13, 2012

New OEPE video with Oracle ADF

Virtual Developer Day - Oracle Fusion Development (On-Demand)

From a recent OTN Virtual Developer Day - Oracle Fusion Development (July 2012)  - Checkout the OEPE presentation covering Oracle ADF development.  Plus checkout all the other cool demos and presentations available from the comfort of your office.

http://www.oracle.com/technetwork/community/developer-day/vdd-oracle-fusion-dev-day-1725597.html

Monday Jun 18, 2012

Eclipse and Oracle Fusion Development - Free Virtual Event, July 10th

Below is one of many sessions covering Oracle Fusion Development.  It's a free virtual event on July 10. Live chats with Oracle's technical staff.  Check it out!

Oracle Enterprise Pack for Eclipse - ADF Development

Oracle ADF Development has never been easier in Eclipse. During this session we will explore best practices to use standard Java EE technologies like EJBs and JPA to build rich ADF applications based on ADF Data Controls, Task Flows, and ADF Faces components all within Oracle Enterprise Pack for Eclipse (OEPE) 12c. We will also look at how OEPE’s AppXRay technology enables developers to understand and visualize dependency relationships between ADF components, xml descriptors, and Java objects in order to drive validation, content assist, and refactoring.

Free Virtual Developer Day - Fusion Middleware Development
Join a free online developer day where you can learn about the various components that make up the Oracle Fusion Development platform including ADF, ADF Mobile, Oracle WebCenter Portal, Business Intelligence and more. Online seminars and hands-on labs available directly from your browser. Join us on July 10!  Register here


About

The focus of this blog is on Oracle Enterprise Pack for Eclipse (OEPE) and Oracle's involvement in the Eclipse community. Visit us for information on releases, tips and tricks related to Eclipse, and general Eclipse community information.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today