Posts tagged adf
Weird ADF 11g requirement addressed with left outer join and modern SQL join syntax
Dec 13th
The functional requirement was a little unusual. The page should either show all master-records or – depending on the value of a parameter – it should show exactly one master-record joined with exactly one detail-record. The use case was valid – that was exactly the functionality that was required.
In terms of EMP and DEPT -I like to always simplify things to express them in EMP and DEPT terms – , we should either see all Departments (and no Employee data) or we should see the data for a specific Employee joined with the data for its corresponding Department. And of course we just one to create a single page, and make it as simple as possible to create that page.
A simplistic page that supports this functionality could like this:

when a specific Employee is requested and

when all Departments should be shown, because no single Employee is asked for.
Respond to end of download in ADF 11g – using poll, clientListener and fileDownloadActionListener
Nov 30th
The situation: in an ADF Faces 11g page, we have a popup with two buttons: one to start a download and one to cancel the popup. When the users presses the download button, a fileDownloadActionListener is activated, the corresponding server side method is invoked to start producing the content to be downloaded and eventually the browser will prompt the user to open or save (or cancel in the case of IE) the download.

The challenge: when the download commences, the download and cancel buttons should be disabled and perhaps an animated gif should be shown to suggest progress (we want to at least prevent the user from clicking the download button or getting frustrated in other ways while she is waiting for the report to be produced on the server side). When the download is complete – that means: when through the browser interaction the user has saved, opened or canceled the actual content download to the browser – the buttons should be enabled again and the animated gif can be removed.
In short: we want to be able to react – both to the beginning of the download as well as to the completion.
Manage Agility through Manage-ability – Introducing Design Time at Run Time in Oracle Fusion Middleware
Nov 10th
Below is my presentation from the OGH DBA, SOA & BPM Day on November 8th. My talk was about achieving instant agility with application, through the ability to manipulate behavior and look & feel of applications at run time. And also to provide various flavors – parallel versions – of the application through customization.
Oracle Fusion Middleware has built-in infrastructure to provide run time agility as well as customization. This infrastructure is commonly referred to as ‘design time at run time’ (and lately also the Fusion Extension Platform). It is based on MDS (meta data services) Repository and a bunch of run time, WYSIWYG tools: the composers.
To make agility work through design time at run time, it is adamant that organizations clearly define the roles and the process associated with it. And finding staff to play the role of ‘run time application editor’ will not be easy.
ADF: The best way to indicate for records in a table the existence of details – or: the importance of up-to-date SQL knowledge
Oct 27th
An interesting discussion arose in one of the projects I am involved in. The functional requirement at stake: show records in a table. In one of the columns, show an indicator (checkbox for example) that signals whether or not that particular record has a specific type of details associated with it. You could say that it was the equivalent of a table of Departments with a checkmark for each Department that has employees (or employees of a certain type).
There are several ways of doing this – and several tiers in the application at which it can be done. One fairly straightforward way in ADF BC would be to create a ViewObject for the detail records, link them through a ViewLink to the master-VO and create a Transient Attribute in the master VO that uses a Groovy expression to count the number details.
However, when discussing the best approach, we came across other options and then took the discussion to a more generic level. One of my favorite guidelines, useful in situations like this, is to not bring data to where it is not really needed. In this, on the middle tier we do not really need the detail records. All we need is an indication of the existence of the detail records, which is not the same at all. When you consider the approach in an extreme situation – say records can have 1 milion details – it quickly becomes clear that there is a distinction between deriving the indication of detail-existence on the database or in the middle tier.
An easy approach that makes it unneccessary for the ADF BC framework to query the database for detail-records and make a server round trip for every row presented in the web page in the table is the following:
ADF Faces: Handle task in background process and show real time progress indicator for asynchronous job using Server Push in ADF
Oct 19th
Recently I received an email from Peru. An ADF developer from Peru was facing a challenge with ADF. In short: ‘the upload of a (large) file should be followed by a potentially long running job. Ideally, the browser would not freeze while the uploaded file is processed and on top of that it would be great to report the progress of the job to the user’.
I like this kind of challenge, especially since I consider both asynchronous processing and server push two of my areas of interest. So I took on the challenge and tried a quickly put together an application that demonstrates this behavior.
This article discusses how I used standard Java concurrency functionality to take the job off line (in a scheduled, background job) and how I leveraged Active Data Service in ADF Faces to have the background job report its progress through an active bean and server push to the browser.
After the user kicks off the job by pushing a button:

the user will be in control again (synchronous but background parrtial request completes) and and will also be informed on the job’s progress through the server push:

In this example, the job progress in steps of 10% that take between 2 and 4 seconds. As soon as a step is completed, the client is updated and the user thus informed.
(Slides for) Instant Agility in Oracle Fusion Middleware through Design Time @ Run Time (Oracle Open World 2011)
Oct 7th
Agility is about ability to adapt. Enterprises need to quickly respond to changing circumstances and requirements. Agility is a state of mind (“embrace change”) that must be supported by process and technology. This session will demonstrate how Fusion Middleware provides a substantial dose of instant agility through its design time @ run time facilities. Application Management evolves into Application Composition as BPM and SOA Suite applications allow run time editing of business logic, human tasks and process definitions. Likewise, ADF applications, especially when integrated with UCM and WebCenter, support run time editing of content, page composition and even security, data sources and visualizations – even customized per user group.
This presentation introduces the concept of Design Time at Run Time, the benefits it may offers and the consequences it may (or will) have on an organization. The various run time edit hooks are discussed as well as the underlying architecture based on MDS and the future roadmap.
(Slides for) Push to the limit – rich and pro-active user interfaces with ADF (Oracle Open World 2011)
Oct 6th
ADF 11g Rich Faces: using popup for viewing and editing big fields
Oct 5th
During the Oracle Open World conference going on this week I was asked by one of the attendees to one of my sessions for a little guidance on the following challenge in ADF:
“We currently have an Oracle Forms application that we are rebuilding in ADF 11g. One of the features in this Forms application, is that whenever a field can contain a really large block of text, it will automatically be shown in a popup when the user clicks on or otherwise enters the field. Inside the popup, the entire field and its contents can be shown. Could you show me how to do this in ADF 11g?”
And that is a type of question I quite like. It is tangible, it is something I can easily help out with and by doing so promote ADF a little. So here it goes.
ADF Gold Nuggets – from Oracle Open World’s ADF Enterprise Methodology Group Super Sunday
Oct 3rd
Sunday 2nd of October 2011 saw, in the prelude to the Oracle Open World conference, the ADF Enterprise Methodology Group’s Super Sunday. Six valuable presentations on planning, designing, building and improving ADF applications by experienced ADF specialists. In front of an audience of over 150.
Interest in ADF seems higher than ever – with an increasing number of organizations starting with BPM, WebCenter or/and ADF proper – and many of them interested in having their approach confirmed as well as finding new and better ways to address certain challenges.
I presented the ADF Gold Nuggets presentations – on valuable yet often unknown or underestimated features and functions in ADF. Going from very small, single property features to large areas and event architectural concepts, I took the audience on a somewhat strange ride – that most seemed to enjoy though. I have put my slides on Slideshare, accessible below.
Generate IDs in all components in ADF Faces pages and fragments – to facilitate automated Selenium based testing
Sep 21st
Lately, we have been introducing Selenium based testing for many our ADF Faces based web applications. Or rather, our testers created the tests for the web pages using Selenium. And did so quite successfully.
However, certain test scripts seemed to fall apart after having been run only a few times. That was rather annoying. Upon closer inspection, we noticed that the scripts that started failing had one thing in common: the Selenium scripts contained references to element id values that started with j_id. I realized that these id values are not defined in the pages by the developer, but instead assigned at run time by the ADF Faces framework. That in turn means that these ID values can easily change, between two test sessions using the same test script for example.
In order to have test scripts that continue functioning – it was required to have fixed id values. Besides, it is a best practice to assign id values to all components at design time rather than having them generated dynamically. Unfortunately, as found out later, we had over 2000 components lacking an id attribute with developer defined value. Going through all files and assigning ID values manually was not a task anyone on the team was really looking forward to.
We then decided to write a small Java utility that processes all JSPX and JSFF files, locates elements of specified types without and ID attribute and assigns a unique ID attribute value. Running this utility took all of 45 seconds and corrected 2186 components.

