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

Tuesday Jan 22, 2013

Join Us at EclipseCon Boston 2013

Oracle is a Gold sponsor for EclipseCon Boston 2013 March 25-28.  

If you're planning to go, stop by our booth and join our sessions. We'll have a number of sessions and events including:

  • Hudson as an effective Agile ALM Tool (Winston Prakash)
  • Large-Scale Adoption of Hudson (Jim Clark)
  • Dali Tooling for Dynamic Persistence and NoSQL (Neil Hauge)
  • EclipseLink: Beyond Relational and NoSQL to Polyglot and HTML5  (Shaun Smith)
  • A couple of presentations covering Oracle Enterprise Pack for Eclipse (Greg Stachnick)
  • Our BoF event: Oracle & Eclipse,Djava Unchained - "the 'D' is silent"

 

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. 

Friday Nov 30, 2012

New Oracle Cloud support in OEPE

Oracle Enterprise Pack for Eclipse 12c (12.1.1.1.1) includes updated support for development with the Java Cloud Service. Users can now do iterative development against their Java Cloud Service instance in addition to testing against local and remote WebLogic Server installations. Some details of the cloud tools are below:

  • Templates and wizards to create projects and server configurations for Oracle Java Cloud Service
  • Develop applications to run and deploy to the cloud, including Oracle ADF.
  • Check cloud server runtime and deployment logs in new log analyzers
  • Test applications before deployment with integrated whitelist scans. Whitelist tools support as-you-type validation, project build validation, and on demand scans to highlight coding violations. Errors are reported in application source, the Problems view, and a new Whitelist violations view.
  • Access the Oracle Public Cloud administrative consoles directly from within Eclipse.

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! 

Tuesday Oct 16, 2012

What a week! Oracle OpenWorld & Maria Bartiromo (CNBC)

Maria Bartiromo at OOW 2012

It's been a week since the end of Oracle OpenWorld and JavaOne and both events were a huge success!

We had many announcements including Oracle ADF Mobile, Oracle ADF Essentials, Oracle Developer Cloud Service and tons more.  Above is a picture I snapped of Maria Bartiromo from CNBC, who was there to interview Larry Ellison and Mark Hurd.  The stage was right in the midst of the booths that showcased new products, at Moscone North.  She's such a pro. With all the noise and people milling around gawking and taking pictures (myself included) she was solid & composed.   Her level of focus and the production quality of the show is impressive. She later stopped by for a demo of OEPE's  new support for Oracle ADF as well as Oracle Developer Cloud Service. She seemed impressed too. ;-)

Monday Sep 24, 2012

Don't Miss All the OEPE Action at OOW and JavaOne

This year at Oracle Open World the OEPE team will be participating in various activities along the week. Here is the summary of all them: mark your calendars and secure your spot, we'll be showing all the new and exciting that we have been working on.

Sessions:

Time Title Location
10:45 AM - 11:45 AM General Session: The Future of Development for Oracle Fusion—From Desktop to Mobile to Cloud

Marriott Marquis - Salon 8

4:45 PM - 5:45 PM General Session: Building Mobile Applications with Oracle Cloud Moscone West - 2002/2004
3:15 PM - 4:15 PM End-to-End Oracle ADF Development in Eclipse Marriott Marquis - Golden Gate C3
Time Title Location
3:30 PM - 4:30 PM Oracle Developer Cloud Services Marriott Marquis - Salon 7
Hands-On Lab:
Time Title Location
12:45 PM - 1:45 PM Oracle ADF for Java EE Developers with Oracle Enterprise Pack for Eclipse Marriott Marquis - Salon 3/4

Also you can see live demos throughout the week at our demo booths over in JavaOne and Moscone Center

Demos
Demo Location
Cloud Developer Moscone North, Upper Lobby - N-002
Oracle Eclipse Projects Hilton San Francisco, Grand Ballroom - HHJ-008
Oracle Enterprise Pack for Eclipse Moscone South, Right - S-208

Also the OEPE team will be at the first ADF Developer Meetup at OOW, on Wednesday from 4.30 p.m - 5.30 p.m  at the OTN Lounge. Let's have a beer and let us know what you think about the product.

See you in San Francisco! 

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

Wednesday Aug 01, 2012

OEPE 12.1.1.1 now live on OTN!!

Oracle Enterprise Pack for Eclipse (OEPE) 12.1.1.1 is now available for download and includes support for Eclipse Juno (both 3.8 and 4.2),  new design-time tools for Oracle ADF, and support for SOAP-based web service security. Details of the new features can be seen below.

 New ADF tools for Data Controls and Bindings:

  • Creation of ADF Data Controls from EJB and POJOs
  • Redesigned Palette displays Tags (HTML, JSP, JSF, ADF Faces) and Data (Page Variables, Managed Beans, ADF Data Controls)
  • New Drag and Drop ADF Faces Patterns including Master-Detail, Forms, Data Visualizations
  • Property sheet binding wizards are now ADF Bindings aware
  • New AppXRay content assist, hyperlink navigation, and validation for ADF Data Controls and Page Bindings
  • AppXRay-driven refactoring support for ADF Bindings and Page Definitions
  • New ADF Page Definition Editor provides form-based editing, wizards, and validation
  • AppXaminer dependency viewer displays ADF Bindings relationships within the application
  • Eclipse Debugger enhancements for ADF Data Controls and Bindings including breakpoint support in ADF Page Definitions

New Tools for WS-Policy:

  • WS-Policy tools for Oracle Web Services Manager and WebLogic Web Services
  • Configure and browse Web Service Policy Store
  • Add and Configure Web Service Policies for Java Web Service Development
  • Attach Web Service Policies to web service clients
  • Deploy and test against Oracle WebLogic Server 10.3.4 and higher

Check out the OEPE OTN page for new downloads, demos, and tutorials.


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


Wednesday May 23, 2012

Eclipse Juno DemoCamp, June 13, Redwood Shores, CA (Oracle HQ)

Oracle <3 Eclipse

Oracle is hosting an Eclipse Juno DemoCamp, June 13, Redwood Shores, CA (@Oracle HQ)  Come learn/view presentations on Oracle’s support for Eclipse (external presentations are also welcome!) and network with your colleagues and peers over beer and pizza.  You can register directly here:  http://eclipsedemocamporacle2012.eventbrite.com/

Wednesday Mar 28, 2012

m2e-wtp proposal to move into an Eclipse project

I am attending EclipseCon 2012 in Reston VA this week and had a chance to attend Jason van Zyl's session on M2E. One announcement during the presentation was the plan to move m2e-wtp plugin into the m2e project at Eclipse. The project proposal was posted yesterday afternoon for those who are interested - http://www.eclipse.org/proposals/technology.m2e.m2e-wtp/. Jason said that m2e-wtp will not make it into the m2e Juno release but they expect the code to be transitioned over to Eclipse over the next six months.

Getting the maven and wtp project models to play nicely together has been an issue for quite some time for our users. Hopefully this is a good step toward resolving those issues.

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