Monday, September 29, 2008

Second Session on UKOUG 2008 Conference

I already was accepted for UKOUG 2008 Conference with my paper - ADF Task Flow - Based On Practical JDeveloper 11g Experience.

However, during last week in San Francisco (Oracle OpenWorld), I got a phone call from UKOUG office and was invited to deliver second presentation on UKOUG 2008. They have asked to present similar session as I was doing on OpenWorld, Oracle Develop track - My Session at Oracle Open World 2008 (Oracle Develop). It is about Oracle Maps integration with ADF in JDeveloper 11g.

See you during UKOUG 2008, it will be really fun !

Wednesday, September 24, 2008

JDeveloper/ADF News from Oracle OpenWorld 2008

This week I'm in San Francisco, attending Oracle OpenWorld 2008 conference.

One of the main news for me, announced on Ted Farrell keynote - Breaking Enterprise Application Platform Barriers, was a date of JDeveloper 11g production release - October 1. I already can start to play with it, Oracle provided private ACE Directors build on September 21.

Ted Farrell announced Oracle Developer Tools Strategy:


As you see, JDeveloper/ADF is Oracle's strategic tool and framework. Enterprise Pack for Eclipse is second strategic tool, designed for core Java developers.

On the same keynote, vision for Rich Enterprise Applications powered by ADF and WebCenter was defined:


In 11g, ADF becomes really rich framework, with support for WebCenter Services, View layer with JSF Core, Data Visualization, GeoMap and Data Manipulation. ADF can render View layer on different devices, in the future there will be support for iPhone as well.

I already did my session on Monday - My Session at Oracle Open World 2008 (Oracle Develop). It was attended very well, almost full room (60 people), and what is most important no errors in demo development. You can download application - OraMaps11_Session.zip, I have developed during my session:

Saturday, September 13, 2008

JDeveloper 11g - CRUD in ADF Form Component

I'm again back to one of most popular topics on my blog - CRUD implementation in ADF. I was blogging previously about CRUD in 10g and also about CRUD in 11g af:table component - JDeveloper 11g - Create, Edit and Delete operations in ADF Faces af:table component. Today I want to describe CRUD in ADF Form implementation, it is different comparing to ADF Table implementation. Actually, its easy to implement CRUD operations in ADF Form, however it can be complex to implement user friendly CRUD behavior. Main focus of my blog post will be to describe how to achieve user friendly CRUD behavior with ADF Form component.


This post is based on sample application I have developed - UndoCreate.zip. Sample is based on standard HR schema, before running application make sure you have correct DB connection defined.

1) Find Functionality

By default, when you are using ADF Search Form functionality, entered query parameters are stored and are shown again when user will re-open form in Find mode. However, based on my experience, usually it is not a desired behavior. Users prefer not to see old query parameters when they re-open form in Find mode. For example, when some query parameter is entered:


Search is executed and result returned:


And now, when user will press Find button again, previous query criteria should be cleared. It is not cleared by default in ADF, however it is cleared in my sample application:


I'm clearing previous query parameters by executing combination of Rollback, Find, Delete and Create actions in backing bean findButton_action() method associated with Find button.

2) Find Functionality - No Results

When user enters query parameter, that will not give any result, and press Search button - empty form will be returned by default. Example of non-existing query criteria:


Empty form returned by default:


In my sample application, I have changed this default behavior in executeButton_action() method in backing bean. I'm doing a check - if iterator is empty, I'm returning to Find mode and displaying information message - 'No Results found!':


In this case I'm not clearing entered query criteria.

3) Undo Functionality in Create Mode

When form is in Create mode, user usually prefer to have 3 choices - to store entered data and to go to Edit mode, to clear entered data and to remain in Create mode, and to close Create mode by opening form in Find mode:


If with 2 cases - to store entered data or to open form in Find mode everything is less or more okej, there is a problem with a case when user wants to clear entered data and to remain in Create mode. With default Undo functionality, when using only Rollback action, user will be navigated back to Edit mode. In order to change this, I'm re-invoking Create mode initialization from backing bean in undoButton_action() method, it is invoked after default Rollback action. This allows to clear entered data and to stay in Create mode after Undo button is pressed:


4) Undo Functionality in Edit Mode

By default, when Undo button is pressed while in Edit mode and Rollback action is executed, changes will be discarded and at the same time form will be refreshed and will show first row from iterator. This means, user will be navigate from a row he is currently editing to a first row in iterator.

To make this behavior more user friendly, I have implemented custom Rollback functionality in undoButton_action() method in backing bean:


In this code, I'm acquiring form related iterator, getting current row user is editing and refreshing it. At the end, I'm applying Partial refresh to a form in order to display correct data. More information about Rollback functionality you can find in Chris Muir blog post - JDeveloper and the art of the rollback. The same functionality can be applied not only in 11g, but in 10g as well.

With implemented functionality, if user is editing data:


And decides to remove all changes by pressing Undo button, form will remain on the same row:


5) Delete Functionality

When user executes Delete functionality, I can recommend to commit transaction at the same time. In developed sample application, when Delete button is pressed - deleteButton_action() method is invoked, where confirmation popup is opened:


When user confirms Delete action, Commit action is executed at the same time, and row is removed from database.

6) Delete Functionality - Last Row

By default, after user will delete last row from iterator, empty form will be rendered:


Such behavior is not user friendly, much better to navigate to Find mode automatically:


This logic is implemented in deleteDialogListener(DialogEvent dialogEvent) method in backing bean:


7) Confirm or Undo Pending Changes

When user is editing data and there are pending changes (before commit or rollback), based on my experience its better not allow to navigate from current row. For example, when data is changed and there are pending changes:


Buttons related to form logic - Find, Create, Delete and buttons related to form navigation - First, Previous, Next and Delete are blocked. Information message is shown - 'Save or Undo Changes First!' asking user to confirm or dismiss current pending changes:



Information about pending changes is retrieved from bindings.Commit.enabled using Expression Language. Its enough to edit data available in the form and bindings.Commit.enabled will return true.

Wednesday, September 10, 2008

Oracle JDeveloper/ADF Developers Wanted

In my current Oracle JDeveloper/ADF project we are searching for additional developers. Project is based on Oracle Fusion 11g, so it can be excellent opportunity for you to get experience with a new Oracle JDeveloper/ADF release. However, if you already have knowledge in 11g, it will be only a benefit.

If you are interested, drop me an email with Resume. If it will be needed, I will be glad to provide more details.