Wednesday Jan 23, 2013

How-to programmatically display a popup message

For an ADF mobile sample I needed to display a confirmation message upon successful upload of an image. Because I could not see how to do this from Java using the ADF Mobile popup dialog, I used JavaScript. The JavaScript function I called is part of PhoneGap, which is neat because this ensures I don't have to maintain custom JavaSCript code in my AMX page.  To call the PhoneGap notification dialog, I  added

20-October 2013: important. Since I've written this sample, the libraries have been changed from PhoneGap to Cordova. Make sure the script below is changed to the Cordova JS (!!!)

Script sample

to the AMX page. I added this script tag to the body section of  the amx:panelPage component tag. Note that the relative addressing /../.../.../ in the JS reference is for AMX pages that are in the public_html folder. If your page is in a sub folder, you will need to add an extra "/.." for each folder

In my Java bean, which I called from a method binding, I used the ADF Mobile AdfmfContainerUtilities.invokeContainerJavaScriptFunction(...) call to invoke the PhoneGap "navigator.notification.alert" function

navigator.notification.alert(message, alertCallback, [title], [buttonName])


The Java call is shown below:

            new Object[] {"Image uploaded: \n " +
            "File Name: "+fileName+"\n File Type: "+fileType,"",
            "Image Uploaded to Server", "Ok"});

Note the use of the object array to pass multiple arguments to the JavaScript function. The "" string is the ADF Mobile feature Id of the feature that contains the AMX page with the JavaScript reference.

The result is shown in the image below:

PhoneGap dialog displayed in ADF Mobile

Using the same technique you can call any other PhoneGap JavaScript function from ADF Mobile (and your custom JavaScripts as well)
See also:

Friday Jan 04, 2013

JavaScript function to intercept or listen for tab remove event

The af:panelTabbed component allows you to remove tabs from display using the tabRemoval property

tabRemoval Valid Values: none, all, allExceptLast

determines if tab removal is enabled.

This attribute supports these tabRemoval types:

  • none - tab removal is not enabled.
  • all - tab removal is enabled on all tabs, regardless if they are disclosed. The last tab in the panelTabbed can be removed.
  • allExceptLast - tab removal is enabled on all tabs, regardless if they are disclosed. The last tab in the panelTabbed cannot be removed.


Because tab removal is not automatic in ADF Faces, developers configure an item listener on the af:showDetailItem component that make the tabs within a panel tab


itemListener javax.el.MethodExpression Only EL a method reference to an item listener


"Choosing to remove a tab will cause an ItemEvent of type 'remove' to be launched. This event can be listened for on a showDetailItem using the itemListener attribute. It is up to the developer to handle this event and code the actual removal of the tab. This is because of the dynamic nature of the panelTabbed component, which may have dynamic children. This also allows a finer level of control by the developer, who can then choose a custom implementation that may (for example) include warning dialogs, and control of which tab gains focus after a tab is removed."


This apparently works with logic written in Java saved on the server. A question on OTN was how to handle or intercept this remove event on the client side using JavaScript. This information - unfortunately - is a bit hidden in our documentation and you have to look into the JavaScript documentation for this.


If there is an AdfItemEvent that fires on the ADF Faces client side, then there also must be a configuration available on the af:clientListener to listen for such an event. And there is (just not obvious)

 <af:panelTabbed id="pt1" tabRemoval="all">  
    <af:showDetailItem text="TAB 1" id="sdi1" stretchChildren="first" clientComponent="false">
         <af:clientListener method="alertTabClose" type="item"/>

The JavaScript function to this looks similar to

function alertTabClose (closureEvent){
     var tab = closureEvent.getSource();  

This allows you to handle (and suppress) the tab remove event on the client using JavaScript in ADF Faces

Thursday Dec 27, 2012

Book Review: Securing WebLogic Server 12c

"Security is a must in modern Enterprise architecture, and WebLogic implements a very complete, complex architecture for this." is a quote taken from the book covers of Securing WebLogic Server 12c book written by Luca Masini and Rinaldi Vincenzo, published by Packt Publishing ( book then sets the reader's expectation within another quote from the book covers: "Securing WebLogic Server 12c will simplify this complex world abd let you develop abd deploy in a production system with best practices for both the development and deployment world."

When Packt Publishing asked me to review and write about this book, my expectation was to get a book of 400 pages in size that covers security from its Java EE fundamentals down to its implementation in WebLogic Server 12c. When the long awaited shipment arrived, to my surprise, the book only had 80 pages. Such small format is not uncommon for Packt Publishing and in August 2012 I reviewed the "Oracle WebLogic Server 12c: First Look" book written by Michel Schildmeijer ( So my expectation was to find an overview to WebLogic Server 12c features with pointers of how to use them and where to follow up reading about it.

Securing WebLogic Server 12c starts with "WebLogic Security Concepts" that introduces Java EE terms like Principals and Subjects and WebLogic server terms like authentication providers, credential mappers and identity assertion. This chapter touches on many topics without going into details. A nice addition to this chapter would have been pointers to follow up readings for readers to be able to gain a deeper understanding of a topic.

Chapter 2 is about WebLogic server security realms, the identity store and policy stripe you define for a WebLogic server domain. This chapter is interesting to read (I only have problems with statements like "A user is an entity that can be authenticated and used to protect application resources", which I think is a wrong and misleading definition) and explains the WebLogic server user, role and group architecture. It would have helped if there were screen shots to this chapter for people who are not familiar with WebLogic server to better follow. Maybe the requirement for this book, though not spelled out, is that you have WebLogic server 12c installed or experience with a previous version of it. In the following the chapter explains how to configure authentication providers in WebLogic server, by example of LDAP, which IMO is a good and very useful chapter. The troubleshooting section for the LDAP configuration is well written and really shares the author's experience.

Chapter 3 is about Java EE Security with WebLogic and explains how to use Maven to administer WebLogic server by example of creating role mappings on the fly. This chapter clearly is wrongly labeled and should have been titled: "Using Maven to administer WebLogic server" because there is nothing new you learn in regards to security and how to protect WebLogic server or your applications. Instead you learn how to use Maven for configuring role mappings upon deployment instead of editing metadata files at design time.  The security bits mentioned in this chapter are Java EE 6 security annotations for servlets and EJB, so nothing that is really specific to WebLogic server. The Maven information is good and detailed, though lost me here and there in some of its folder and project descriptions. The section "A RESTful and secure EJB component" actually explains that in Java EE 6 EJB modules can be deployed with a servlet in a WAR file, which then - using annotations - you can secure in that you check the user role membership before executing a method.

Chapter 4 explains how to build a custom authentication provider using Maven and a JAAS login module. Its an interesting and useful chapter that gives you some good insight in how you build the authentication provider wrapper for a JAAS login module and how WebLogic server MBeans are used for administration. The custom authentication provider authenticates against a JSP file, which the authors use to simulate a legacy or existing SSO system. Again, Maven is used to assemble the provider and to deploy it. The use of Maven adds some complexity to the custom authentication provider explanations and also take a lot of pages from the overall 80 page budget of this book. I wished the use of Maven for deploying the custom authentication provider was explained in a separate chapter. Again, there are no pointers for readers to follow up with a topic. This is a problem with the book as a whole.

Chapter 5 is about Kerberos integration for authentication, which is a frequent customer requirement. The chapter is a step-by-step instruction to how to make the Kerberos authentication work with WebLogic server though, in my opinion, assume quite abit for the reader to know and have as to seen a beginners guide.

As usual, when doing book reviews, I am annotating book pages with questions I have and follow ups action items. The annotations I used the most in this book were Why and How. For sure pointers to follow-up reading would have been good and welcome. I also had difficulties to identify the audience for this book: As an overview it was too technical and not comprehensive in some areas. As a technical book and reference it wasn't detailed enough, leaving me guessing and wondering far too often. In some parts, like the Kerberos configuration in chapter 5, it reads like notes the authors took while setting up the environment for the company they work for.

So who is this book for? To quote the book: "If you are a WebLogic Server administrator who is looking forward to a step-by-step guide to administer and configure WebLogic security, then this guide is for you. This book is also for WebLogic developers who want to leverage the complex but powerful WevLogic security infrastrucure."

This book is well written and contains some good information you want to follow up on after reading the book's 80 pages. However, neither the administrators nor developer finds all that he / she needs to know about WebLogic and Java EE application security to protect a business. In my opinion, the book is good, but the title is wrong! A better title would have been  "WebLogic 12c administration and application deployment with Maven by example of Java EE security".

"Security is a complex matter, and Java EE is not an exception to this rule. To make things even more complicated, WebLogic Server extends standard securtity [...]" - page 5 of  "Securing WebLogic Server 12c". I agree with this statement, but also read from it that the authors were well aware of the need for a more in depth book.

All in all I enjoyed reading this book, though I did not learn a lot in regards to security (the Maven - WebLogic server administration and deployment bits are good though).

My final review summary you can quote me on thus is that The book is a good reference for everyone who has "Maven deployement to WebLogic Server 12c", "custom authentication provider development" and "Kerberos authentication for Windows based authentication" on his or her to-do list.


Ps.: My suggestion to reviewers: Ask more questions about what you read and don't understand. If I see explanations like the following (taken from page 18): "View User Attributes: Some user attributes" then this clearly has not been reviewed with enough care.

Monday Dec 17, 2012

Accessing ADF Faces components that are read-only from JavaScript

Almost as a note to myself and to justify the time I spent on analyzing aproblem, a quick note on what to watch out for when working trying to access read-only ADF Faces components from JavaScript. 

Those who tried JavaScript in ADF Faces probably know that you need to ensure the ADF Faces component  is represented by a JavaScript object on the client. You do this either implicitly by adding an af:clientListener component (in case you want to listen for a component event) or explicitly by setting the ADF Faces component clientComponent property to true.

For the use case I looked at in JDeveloper 11g R1 ( I needed to make an output text component clickable to call a JavaScript function in response. Though I added the af:clientListener tag to the component I recognized that it also needed the clientComponent property set to true.

Though I remember this as not being required in, I like the new behavior as it helps preventing read-only components from firing client side events unless you tell it to do so by setting the clientComponent property to true.

Note: As the time of writing, JDeveloper is not publicly available and I put the note in this blog as a reminder in case you ever hit a similar challenge so you know what to do.

Thursday Nov 29, 2012

Book Review: Oracle ADF Real World Developer’s Guide

Recently PACKT Publishing published "Oracle ADF Real World Developer’s Guide" by Jobinesh Purushothaman, a product manager in our team. Though already the sixth book dedicated to Oracle ADF, it has a lot of great information in it that none of the previous books covered, making it a safe buy even for those who own the other books published by Oracle Press (McGrwHill) and PACKT Publishing.

More than the half of the "Oracle ADF Real World Developer’s Guide" book is dedicated to Oracle ADF Business Components in a depth and clarity that allows you to feel the expertise that Jobinesh gained in this area. If you enjoy Jobinesh blog ( about Oracle ADF, then, no matter what expert you are in Oracle ADF, this book makes you happy as it provides you with detail information you always wished to have. If you are new to Oracle ADF, then this book alone doesn't get you flying, but, if you have some Java background, accelerates your learning big, big, big times.

Chapter 1 is an introduction to Oracle ADF and not only explains the layers but also how it compares to plain Java EE solutions (page 13). If you are new to Oracle JDeveloper and ADF, then at the end of this chapter you know how to start JDeveloper and begin your ADF development

Chapter 2 starts with what Jobinesh really is good at: ADF Business Components. In this chapter you learn about the architecture ingredients of ADF Business Components: View Objects, View Links, Associations, Entities, Row Sets, Query Collections and Application Modules. This chapter also provides a introduction to ADFBC SDO services, as well as sequence diagrams for what happens when you execute queries or commit updates.

Chapter 3 is dedicated to entity objects and  is one of many chapters in this book you will enjoy and never want to miss. Jobinesh explains the artifacts that make up an entity object, how to work with entities and resource bundles, and many advanced topics, including inheritance, change history tracking, custom properties, validation and cursor handling.

 Chapter 4 - you guessed it - is all about View objects. Comparable to entities, you learn about the XM files and classes that make a view object, as well as how to define and work with queries. List-of-values, inheritance, polymorphism, bind variables and data filtering are interesting - and important topics that follow. Again the chapter provides helpful sequence diagrams for you to understand what happens internally within a view object.

Chapter 5 focuses on advanced view object and entity object topics, like lifecycle callback methods and when you want to override them. This chapter is a good digest of Jobinesh's blog entries (which most ADF developers have in their bookmark list). Really worth reading !

Chapter 6 then is bout Application Modules. Beside of what application modules are, this chapter covers important topics like properties, passivation, activation, application module pooling, how and where to write custom logic. In addition you learn about the AM lifecycle and request sequence.

Chapter 7 is about the ADF binding layer. If you are new to Oracle ADF and got lost in the more advanced ADF Business Components chapters, then this chapter is where you get back into the game. In very easy terms, Jobinesh explains what the ADF binding is, how it fits into the JSF request lifecycle and what are the metadata file involved.

Chapter 8 then goes into building data bound web user interfaces. In this chapter you get the basics of JavaServer Faces (e.g. managed beans) and learn about the interaction between the JSF UI and the ADF binding layer. Later this chapter provides advanced solutions for working with tree components and list of values.

Chapter 9 introduces bounded task flows and ADF controller. This is a chapter you want to read if you are new to ADF of have started. Experts don't find anything new here, which doesn't mean that it is not worth reading it (I for example, enjoyed the controller talk very much)

Chapter 10 is an advanced coverage of bounded task flow and talks about contextual events

 Chapter 11 is another highlight and explains error handling, trains, transactions and more. I can only recommend you read this chapter. I am aware of many documents that cover exception handling in Oracle ADF (and my Oracle Magazine article for January/February 2013 does the same), but none that covers it in such a great depth.

Chapter 12 covers ADF best practices, which is a great round-up of all the tips provided in this book (without Jobinesh to repeat himself). Its all cool stuff that helps you with your ADF projects.

In summary, "Oracle ADF Real World Developer’s Guide" by Jobinesh Purushothaman is a great book and addition for all Oracle ADF developers and those who want to become one.


Sunday Oct 07, 2012

How-to get the binding for a tab in the Dynamic Tab Shell Template

The Dynamic Tab Shell template does expose a method on the class that allows you to get access to the ADF binding container for a tab. At least in theory this works, because in practice this call always returns a null value (a bug is filed for this).

To work around the problem, you can use code similar to the following to get the ADF binding for a specific tab

DCBindingContainer currentBinding = (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();
DCBindingContainer templateBinding = (DCBindingContainer)currentBinding.get("ptb1");
DCBindingContainer tabBinding= (DCBindingContainer)templateBinding.get("r"+0); 

 In the code line above, the tabBinding variable will hold the binding reference to the first tab in the dynamic tab shell template. Note that the tab doesn't need to be visible for this (which has to do with how the template works).

 "ptb1" is the template reference name in the PageDef file (Executable section) of the template consumer view. Check this string in your page before using this code. If it differs, change it also in the code above.

"r0" is the binding reference of the first tab in the template. Te last tab is referenced by "r14".


Thursday Sep 20, 2012

Displaying Exceptions Thrown or Caught in Managed Beans

Just came a cross a sample written by Steve Muench, which somewhere deep in its implementation details uses the following code to route exceptions to the ADF binding layer to be handled by the ADF model error handler (which can be customized by overriding the DCErrorHandlerImpl class and configuring the custom class in DataBindings.cpx file)

To route an exception to the ADFm error handler, Steve used the following code


The same code however can be used in managed beans as well to enforce consistent error handling in ADF. As an example, lets assume a managed bean method hits an exception. To simulate this, let's use the following code:

public void onToolBarButtonAction(ActionEvent actionEvent) {
   throw new JboException("Just to tease you !!!!!");        

The exception shows at runtime as displayed in the following image:

Exception in Managed Bean

Assuming a try-catch block is used to intercept the exception caused by a managed bean action, you can route the error message display to the ADF model error handler. Again, let's simulate the code that would need to go into a try-catch block

public void onToolBarButtonAction(ActionEvent actionEvent) {
   JboException ex = new JboException("Just to tease you !!!!!"); 
   BindingContext bctx = BindingContext.getCurrent();

The error now displays as shown in the image below

Exception displayed by ADFm error handler

As you can see, the error is now handled by the ADFm Error handler, which - as mentioned before - could be a custom error handler. Using the ADF model error handling for displaying exceptions thrown in managed beans require the current ADF Faces page to have an associated PageDef file (which is the case if the page or view contains ADF bound components).

Note that to invoke methods exposed on the business service it is recommended to always work through the binding layer (method binding) so that in case of an error the ADF model error handler is automatically used.

Wednesday Sep 19, 2012

Oracle ADF Coverage at OOW

Below is the schedule for all ADF related sessions at a glance. Note the Meet and greet session added for Wednesday Octiber 3rd from 4.30 pm to 5:30.

Oracle ADF and Fusion Development

General Session

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
12:15 PM - 1:15 PM General Session: Extend Oracle Fusion Apps to Tablets/Smartphones with Oracle Mobile Technology Moscone West - 3014
1:45 PM - 2:45 PM General Session: Extend Oracle Applications to Mobile Devices with Oracle’s Mobile Technologies Moscone West - 3002/3004
4:45 PM - 5:45 PM General Session: Building Mobile Applications with Oracle Cloud Moscone West - 2002/2004

Conference Session

Time Title Location
12:15 PM - 1:15 PM Understanding Oracle ADF and Its Role in Oracle Fusion Moscone South - 306
1:45 PM - 2:45 PM Building Performant Oracle ADF Business Components to Meet Tomorrow’s Needs Marriott Marquis - Golden Gate C3
3:15 PM - 4:15 PM End-to-End Oracle ADF Development in Eclipse Marriott Marquis - Golden Gate C3
4:45 PM - 5:45 PM Classic Mistakes with Oracle Application Development Framework Marriott Marquis - Salon 7

Time Title Location
10:15 AM - 11:15 AM One Size Doesn’t Fit All: Oracle ADF Architecture Fundamentals Marriott Marquis - Golden Gate C2
10:15 AM - 11:15 AM Oracle Business Process Management/Oracle ADF Integration Best Practices Marriott Marquis - Golden Gate C3
11:45 AM - 12:45 PM Mobile-Enable Oracle Fusion Middleware and Enterprise Applications with Oracle ADF Moscone South - 306
11:45 AM - 12:45 PM Secrets of Successful Projects with Oracle Application Development Framework Marriott Marquis - Golden Gate C2
1:15 PM - 2:15 PM Develop On-Device iPhone and iPad Apps Without Writing Any Objective-C Code Marriott Marquis - Golden Gate C2
1:15 PM - 2:15 PM BPM, SOA, and Oracle ADF Combined: Patterns Learned from Oracle Fusion Applications Moscone West - 3003
1:15 PM - 2:15 PM The Future of Forms Is … Oracle Forms (and Friends) Moscone South - 306
5:00 PM - 6:00 PM Best Practices for Integrating SOAP and REST Service into Oracle ADF Marriott Marquis - Golden Gate C2

Time Title Location
10:15 AM - 11:15 AM Mobile Apps for Oracle E-Business Suite with Oracle ADF Mobile and Oracle SOA Suite Moscone West - 3001
10:15 AM - 11:15 AM Visualize This! Best Practices for Data Visualization in Desktop and Mobile Apps Marriott Marquis - Golden Gate C3
10:15 AM - 11:15 AM Set Up Your Oracle ADF Project and Development Team for Productivity: Seven Essential Tips Marriott Marquis - Golden Gate C2
11:45 AM - 12:45 PM How to Migrate an Oracle Forms Application to Oracle ADF Marriott Marquis - Golden Gate C2
1:15 PM - 2:15 PM Oracle ADF: Lessons Learned in Real-World Implementations Moscone South - 309
3:30 PM - 4:30 PM Oracle ADF Implementations Around the Globe: Best Practices Marriott Marquis - Golden Gate C2
3:30 PM - 4:30 PM Oracle Developer Cloud Services Marriott Marquis - Salon 7
4:30 PM - 5:30 PM Oracle JDeveloper and Oracle ADF: What’s New Hilton San Francisco - Continental Ballroom 5
5:00 PM - 6:00 PM Mobile Solutions for Oracle E-Business Suite Applications: Technical Insight Moscone West - 2020
5:00 PM - 6:00 PM Extending Social into Enterprise Applications and Business Processes Marriott Marquis - Golden Gate C3
5:00 PM - 6:00 PM The Tie That Binds: An Introduction to Oracle ADF Bindings Marriott Marquis - Golden Gate C2

Time Title Location
11:15 AM - 12:15 PM Using Oracle ADF with Oracle E-Business Suite: The Full Integration View Moscone West - 3003
11:15 AM - 12:15 PM Deep Dive into Oracle ADF: Advanced Techniques Marriott Marquis - Golden Gate C2
12:45 PM - 1:45 PM Monitor, Analyze, and Troubleshoot Your Oracle ADF Application Marriott Marquis - Golden Gate C2
2:15 PM - 3:15 PM Oracle WebCenter Portal: Creating and Using Content Presenter Templates Marriott Marquis - Golden Gate C2

HOL (Hands-on Lab)

Time Title Location
10:45 AM - 11:45 AM Developing Applications for Mobile iOS and Android Devices with Oracle ADF Mobile: Hands-on Lab Marriott Marquis - Salon 10A
1:45 PM - 2:45 PM Build Mobile Applications for Oracle E-Business Suite Marriott Marquis - Salon 10A
3:15 PM - 4:15 PM Developing Applications for Mobile iOS and Android Devices with Oracle ADF Mobile: Hands-on Lab Marriott Marquis - Salon 10A
3:15 PM - 4:15 PM Introduction to Oracle ADF: Hands-on Lab Marriott Marquis - Salon 3/4
4:45 PM - 5:45 PM Application Lifecycle Management with Oracle JDeveloper: Hands-on Lab Marriott Marquis - Salon 3/4

Time Title Location
10:15 AM - 11:15 AM Developing Applications for Mobile iOS and Android Devices with Oracle ADF Mobile: Hands-on Lab Marriott Marquis - Salon 10A
5:00 PM - 6:00 PM Developing Applications for Mobile iOS and Android Devices with Oracle ADF Mobile: Hands-on Lab Marriott Marquis - Salon 10A

Time Title Location
10:15 AM - 11:15 AM Introduction to Oracle ADF: Hands-on Lab Marriott Marquis - Salon 3/4
11:45 AM - 12:45 PM Developing Applications for Mobile iOS and Android Devices with Oracle ADF Mobile: Hands-on Lab Marriott Marquis - Salon 10A
1:15 PM - 2:15 PM Build Mobile Applications for Oracle E-Business Suite Marriott Marquis - Salon 10A
3:30 PM - 4:30 PM Developing Applications for Mobile iOS and Android Devices with Oracle ADF Mobile: Hands-on Lab Marriott Marquis - Salon 10A
5:00 PM - 6:00 PM Developing Applications for Mobile iOS and Android Devices with Oracle ADF Mobile: Hands-on Lab Marriott Marquis - Salon 10A

Time Title Location
11:15 AM - 12:15 PM Developing Applications for Mobile iOS and Android Devices with Oracle ADF Mobile: Hands-on Lab Marriott Marquis - Salon 10A
11:15 AM - 12:15 PM Introduction to Oracle ADF: Hands-on Lab Marriott Marquis - Salon 3/4
12:45 PM - 1:45 PM Oracle ADF for Java EE Developers with Oracle Enterprise Pack for Eclipse Marriott Marquis - Salon 3/4

BOF (Birds-of-a-Feather)

Time Title Location
6:15 PM - 7:00 PM How to Get Started with Oracle ADF Marriott Marquis - Club Room
7:15 PM - 8:00 PM Building Next-Generation Applications with Oracle ADF and Oracle BPM Marriott Marquis - Golden Gate C3
7:15 PM - 8:00 PM The Future of Oracle Forms: Upgrade, Modernize, or Migrate? Marriott Marquis - Golden Gate C2
7:15 PM - 8:00 PM Oracle ADF Faces: One Site for Many Devices Marriott Marquis - Golden Gate C1 -

User Group Forum (Sunday Only)

Time Title Location
9:00 AM - 10:00 AM Oracle ADF Immersion: How an Oracle Forms Developer Immersed Himself in the Oracle ADF World Moscone South - 305
10:15 AM - 11:15 AM Deploy with Joy: Using Hudson to Build and Deploy Your Oracle ADF Applications Moscone South - 305
11:30 AM - 12:30 PM ADF EMG User Group: A Peek into the Oracle ADF Architecture of Oracle Fusion Applications Moscone South - 305
12:45 PM - 3:45 PM ADF EMG User Group: Oracle Fusion Middleware Live Application Development Demo Moscone South - 305
3:15 PM - 4:15 PM Mobile Development with Oracle JDeveloper and Oracle ADF Moscone West - 2010


Demo Location
Developer Moscone North, Upper Lobby - N-002
Oracle ADF Mobile Development Moscone North, Upper Lobby - N-001
Oracle Eclipse Projects Hilton San Francisco, Grand Ballroom - HHJ-008
Oracle Enterprise Pack for Eclipse Moscone South, Right - S-208
Oracle JDeveloper and Oracle ADF Moscone South, Right - S-207
Exhibitor Location
Accenture Moscone South - 1813
Moscone South - 2221
Infosys Moscone South - 1701
Moscone South - SMR-005
Innowave Technology Moscone South - 2309
ODTUG Moscone West, Level 2 Lobby - Kiosk in the User Groups Pavilion

Oracle ADF Developers Meet Up

Time Activity Location
4:30 PM - 5:30 PM Stop by the OTN Lounge and meet other Oracle ADF & Fusion developers as well as product managers and engineers who work on Oracle ADF, ADF Mobile and ADF Essentials. Feedback and questions welcome, or simply stop by and say ‘hi!’ and enjoy free beer. OTN Lounge

Wednesday Sep 12, 2012

Iterating selected rows in an ADF Faces table

In OTN Harvest May 2012; I wrote about "Common mistake when iterating <af:table> rows". In this entry I showed code to access the row associated with a selected table row from the binding layer to avoid the problem of having to programmatically change the selected table row.

As it turns out, my solution only worked fro selected table rows that are in the current iterator query range. So here's a solution that works for all ranges

public String onButtonPress() {
  RowKeySet rks = table.getSelectedRowKeys();
  Iterator it = rks.iterator();
  while (it.hasNext()) {
   List selectedRowKeyPath = (List);            
   //table is the JSF component reference created using the table's binding
   Row row = ((JUCtrlHierNodeBinding)table.getRowData(selectedRowKeyPath)).getRow();
   System.out.println("Print Test: " + row.getAttribute(1));
   return null;

Monday Aug 27, 2012

ADF Partner Community News Session - Open Invitation: "ADF as a basis of Fusion Apps - the biggest ADF project ever (in English)"

After a successful guest performance of Ted Farrell in 2011, this year's international ADF speaker to speak during an ADF News session is Chris Muir from Oracle. 

ADF News Session - Friday September 14, 8:30 AM - 9.00 AM (CET) - Topic: ADF as a basis of Fusion Apps - the biggest ADF project ever (in English)

+++ this webcast will be conducted in English +++

dial-in numbers conc. ADF News Session, Sep. 14 2012

You are invited to join the next ADF News Session, that is going to take place September 14 2012

speaker:  Chris Muir / Oracle
time:         8:30 AM (CET)
duration:  30 minutes
topic:        ADF as a basis of Fusion Apps - the biggest ADF project ever (in English)

dial-in webconf:
conf ID:      595 484 157
confkey:    123456

Please enter your name and an abbreviation of you company name when dialing in (please don´t use blanks and special characters). Please notice that this information will be visible to all participants of the webcast. Thank you.
dial-in telco:

          +49 (0)69 2222 16 106 or +49 (0)800 66 485 15
          ConfCode: 208 503 9
          SecurityPasscode: 112233

 Other toll-free dial in numbers for EMEA countries are listed below (information is supplied without liability):







Czech Republic








































Saudi Arabia


Slovak Republic




South Africa









00800 44632129



United Arab Emirates


United Kingdom



Thursday Aug 23, 2012

ADF EMG Sunday at OOW 2012 (30. Sep 2012) - A day full of content

I do know what I am doing on Sunday September 30 2012 at OOW - how about you ? Well, I am sitting in the back of a room packed with ADF enthusiasts at the ADF EMG Sunday session at Moscone South room 305. Chris Muir managed to get a full day track for the EMG on that Sunday, which I know was a lot of work. In addition a he got lots of good speakers with interesting topics lined up.

The below is copied from Chris' announcement at: :

On the user group Sunday 30th of September the ADF EMG has a full day of sessions for anybody interested in ADF.  The collective sessions are designed to have something for everyone, ADF beginners, ADF experts, all.  All sessions will be held in Moscone South room 305.

To start out with for OOW attendees coming from a Forms background, Gert Poel and Pieter Gillis from iAdvise will give us the lowdown on ADF for Forms programmers.  This is a very important presentation for the beginners in the ADF community who are coming from a Forms background: 

1) UGF3783 - Oracle ADF Immersion: How an Oracle Forms Developer Immersed Himself in the Oracle ADF World - 9am-10am Moscone South room 305 

At the other end of the spectrum for EMG members who are looking to expand their ADF skills beyond the basics, Aino Andriessen from AMIS will be looking at using Hudson for building ADF applications.  Surprisingly via the EMG new member's survey around 25% of new members have no idea about CI tools so I think Aino's presentation is a great addition to the ADF EMG line up: 

2) UGF4945 - Deploy with Joy: Using Hudson to Build and Deploy Your Oracle ADF Applications - 10:15am-11:15am Moscone South room 305 

The 3rd presentation is one ADF EMG members have been asking for such a long time: 

3) UGF10463 - A Peek into the Oracle ADF Architecture of Oracle Fusion Applications - 11:30am-12:30am Moscone South room 305 

In this presentation Simon Haslam will be discussing the actual Fusion Apps "ADF" architecture.  In other words forgot the high level "yes ADF was used to build Fusion Apps" bullet points, Simon is going for a deep dive into the nitty gritty details of how ADF was used to build Fusion Apps.  For ADF EMG members remember all those times you posted to the EMG wishing to know more details about how ADF was used in Fusion Apps? This is the session for you to learn and bring your own questions.

But the fun doesn't stop here.  The final presentation is a muti-slot presentation, where a team of FMW programmers, including ADF programmers, SOA programmers and more will build an end-to-end application, live in front of your very eyes: 

4) UGF10464 - Oracle Fusion Middleware Live Application Development Demo - 12:45-3:45pm Moscone South room 305 

Why this presentation rocks, is rather than a single presentation on ADF here, then a separate presentation on SOA there, the goal of this presentation is to bring it altogether so you can see an end-to-end Fusion Middleware application being built at once.  I've seen this before, this is a great session, and I highly recommend it.

 Is there something I disagree with? Yes, the title Chris chose for his announcement:

The Year After the Year of the ADF Developer - the ADF EMG at OOW 2012

Every year is an ADF year! No need to point to the past.  The year after the year of the ADF developer is the year of ADF developer.

Monday Aug 20, 2012

Book Review: Oracle WebLogic Server 12c: First Look

"Oracle WebLogic Server 12c: First Look" written by Michel Schildmeijer and published by Packt Publishing (ISBN 978-1-84968-718-8) is a well structured overview of new features in Java EE 6 and Oracle WebLogic Server 12c. On 117 pages (no typo on my side), Michel provides a well done digest of what you need to know about Java EE 6 development and deployment with WebLogic server 12c. Michel shows in depth expertise in the Java EE and open source landscape as well as in WebLogic server configuration and administration, as well as Oracle Exalogic.

  • Chapter 1 "Ready for the Cloud!" is a brief introduction to Oracle's WLS stratey and the features of Java EE.
  • Chapter 2 "Supporting the Java EE 6" shows an overview of interesting Java EE 6 features like CDI, EJB 3.1, JSF 2.1, JPA, Servlet 3.0 and REST. The book doesn't go in depth when describing the new features but gives you enough information to feed Google for more information.  From a developer perspective its a well written heads up on what you want to research further in preparation for JDeveloper 12c and WLS 12c.
  • Chapter 3 "Deployment, Installation and Configuration Features" lets you know about a lean start option of WLS, class loader analysis, Enterprise Manager functionality and additional packages for application performance monitoring. Again, a lot of heads up to follow up on.
  • Chapter 4 "Integrated and External Services" is about Grid Link and RAC integration, as well as new JDBC features. You also learn about WLS and Java EE security services and the work with RESTful services. Again, this chapter only scratches the surface and is more of a laundry list of what you want to follow up with for your future application development(I at least put down a lot of notes). If you are a project lead or manager (so no developer who need to know exactly how to do things), then this chapter however provides you all information you need to know of.
  • Chapter 5 "Integration and Management with Enterprise Manager 12c Cloud Control is - together with chapter 2 - my personal favorite and explains Enterprise management options a bit closer. Especially WebLogic Server 12c monitoring in this chapter is what I thought "this is what people really need to know about".
  • Chapter 6 "Oracle Weblogic 12c to the Cloud: Exalogic" is less in depth information on what Oracle Exalogic and Exadata is but again provides a reasonable bird's eye overview of the benefits this system provides

As mentioned, 117 pages full of information that are worthwhile reading. The perfect holiday novel for geeks. Definitive, this book is a best value you can get for the cost of if.


Tuesday Jul 31, 2012

Warning: java.lang.IllegalArgumentException: The file .jsff is not a source file

Randomly I experienced the following error when working with JSFF page fragments in JDeveloper 11g R2 (

Warning: java.lang.IllegalArgumentException: The file file:<directory listed here>\DepartmentsView.jsff is not a source file

This happened when I compiled the project. As it seems the compiler treats JSFF page fragments as Java source files. This issue has been reported as bug 12732652 for applications using Facelets as the page source holder. The fix for both cases, JSF pages as JSPX and Facelets, is to edit the web.xml file as follows

  * randomly, when editing files, compilation fails with an illegal argument exception
  * java.lang.IllegalArgumentException: The file <file name> .jsff is not a source file
  * To avoid this error, which initially has been reported as bug 12732652 for Facelets
  * I added the jsp-property-group entry below

Just add the above snippet before the " <mime-mapping>" entry in web.xml. At least for me, this did the trick

Monday Jul 23, 2012

How-to reset ADF Faces inputFile components

When working with the ADF Faces input file component, you'll notice a change in the UI after uploading a file in that the file name is displayed as a label and the upload button text changes to Update.

From a use case perspective this behavior may be fine if you bind the component value property to a managed bean that you want to update with changed file uploads. For generic file upload functionality though you probably prefer the input file to reset its state to the original display: input field and upload button text as "Browse".

To achieve this, you need to explicitly reset the input file component in a call to resetValue() on the RichInputFile component instance.

You can access the RichInputFile component instance from a JSF component binding to a manage bean (sub-optimal) or from a dynamic component lookup (recommended) in the component tree, using the UIViewRoot as a starting point or using Apache MyFaces Trinidad ComponentUtils: ComponentUtils.html

Tuesday Jul 17, 2012

How-to add new ADF bound table row at the end of a table

A frequent question on OTN, which I often see answered with new rows created on the ADF BC view object level instead the ADF binding layer, is about how to create a new row for a table and append it as the last row in the table. The following code below shows how to do this properly using the binding layer only. Note that while it adds the row as the last row of the table, it doesn't do this as the last row of all possible rows that haven't yet been queried from the database. There is a difference between the last row in a table and the last row in the database.

public String onRowCreate() {
 BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
 //access the name of the iterator the table is bound to. Its "allDepartmentsIterator"
 //in this sample
 DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("allDepartmentsIterator");
 //access the underlying RowSetIterator
 RowSetIterator rsi = dciter.getRowSetIterator();
 //get handle to the last row
 Row lastRow = rsi.last();
 //obtain the index of the last row
 int lastRowIndex = rsi.getRangeIndexOf(lastRow);
 //create a new row
 Row newRow = rsi.createRow();
 //initialize the row
 //add row to last index + 1 so it becomes last in the range set
 rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow); 
 //make row the current row so it is displayed correctly
 return null;

For the table to show the newly created row after this ensure:

1. The table is configured to always show the current selected row by setting  its displayRow property to selected

2. The table is PPR'ed after the row is created, which can be done declarative using the PartialTriggers property of the table pointing to the ID of the command creating the new row

But what is wrong with the approach of doing the same on the View Object level in ADF BC if it works? Well, it works but it doesn't ensure separation of the layers unless the functionality is exposed as a method on the view object interface. The code in this blog entry is generic and works the same for other business services, like EJB, POJO and Web Services for creating new table rows (which then however you need to persist explicitly in opposite to what you have to do when using ADF BC). So while the other code works, the one in this is the proper solution.


A blog on Oracle JDeveloper, ADF, MAF, MCS and other mobile and web topics inspired by questions and answers posted on the OTN forums.

Frank Nimphius


« July 2016