Use tree binding accessors to show detail rows

Tree bindings can be very handy, for example to combine details in the same row as the master. Let’s assume we have the following starting point based on the HR schema:


We see the department in a form layout with navigation buttons, with a table under the form showing information about the employees. As you can see in the screenshot below in the ApplicationModule, there is also a Jobs detail under the EmployeeView.


If you go to the bindings on the page, you see the Tree Binding ‘EmployeesView’. You can edit the Tree binding very easily through the overview of the binding page. If we add the JobsView as detail this will be available in the page as well.


Don’t forget to shuffle the attributes that you need to the right:


After pressing ok, the source of the PageDef should now look something like this:


You see that the first nodeDefinition in the tree has gained an Accessors element, in this Accessors element there is an item with the name JobsView. We can now use this accessor in our table in the page as well. To illustrate I add two new columns to the table.


The editor does not really understand this, so you do not get any help from the IDE. You can see that the EL expression to the hints of the EmployeeView is the same, but after that we use the accessor value to navigate to that nodeDefinition in the Tree, after which we enter the value from the AttrName inside this nodeDefinition.
The value itself however, we need to access through the row. You can see the EL expression in the value of the outputText. After the row we again first use the accessor value but then go to the bindings, after the bindings we enter the AttrName value and we end the EL expression with the inputValue.

On run time this results in the two extra added columns:



Access your MDS-SOA repository from your ADF application

In our Enterprise Landscape the SOA Services and our Canonical Data Model (CDM) live on a different WebLogic Server than our ADF application. But often we want to use these services and CDM in our ADF application. 
Calling WebServices from an ADF application is not that difficult, however, we often want to manipulate the result that comes from this WebService. In 90 percent of the time, this are little adjustments to the existing CDM that are UI specific. This knowledge is not something we want to put in our CDM or in our WebService, but in the ADF application. We decided to create an UI specific XSD and map the result from the WebService in CDM to this UI specific XSD. 
To accomplish this, we created an XSD that extends the existing XSD from the CDM. The problem with this approach was to reach the XSD from the CDM that lives on the SOA Server from our ADF Application that lives on our ADF Server. 

It turns out, you can configure the MetaData Repositories on your WebLogic Server to look at different servers. When logged in to the Enterprise Manager, you can go to the MetaData Repositories, now if you click on an existing MDS, you can go through to menu to Administration -> Register/Deregister:


In here you see an overview of both the database and the file based repositories.
Now you can click the Register button to register a new database MDS repository.


This will bring up the screen to register a database based metadata repository in which you need to provide the information of your SOA MDS where the CDM is found.


After filling in the information, press query and enter the repository name ‘mds-soa’ and fill in the correct password. Pressing the OK button will register this mds-soa metadata repository and will bring up the next screen:


In here it is very important not to forget to target the correct server on which you ADF application is running.
Once this has been set up, your ADF application will be able to connect on run time to your CDM that lives inside the soa-mds repository under the /soa-infra partition. Next you need to configure your ADF application to actually look for this repository. You do this in the adf-config.xml:


In the adf-config file you see the mds-config, here you tell the application to look for any mds repository starting with /apps to look in the ‘mstore-usage_2’ this mstore is defined below in the metadata-store-usage section.
You need to enter the partition-name, which is ‘soa-infra’, the metadata-path is used locally and points to an environment variable. When deploying this application from JDeveloper, the deployment wizard understand that the MDS needs to be configured and it brings up the Deployment Configuration wizard:


In this wizard we select the mds-soa repository and select the correct repository and the correct partition. After this your ADF application will be able to resolve oramds urls and you can import XSDs from the CDM. As a result your ADF application specific XSD will be able to understand an import like this:


Meaning you can extend any XSD type defined in the CDM and make it UI specific for your needs.

Disabling and Enabling the Auto Map for XSL

When working with more complex XSL files, it can sometimes be useful to disable the Auto Map option. This can easily be achieved in the Auto Map Preferences popup you get when drawing lines in the design view of an XSL Map.


However, once disabled, you will not get this popup anymore to re-enable the Auto Map option. You need to do this through the Tools -> Preferences menu in JDeveloper. On the bottom of the list you see the XSL Maps menu with a submenu for Auto Map properties.


Here you can re-enable the Auto Map option for you XSL maps.

Announcement: ADF EMG XML DataControl

During the ADF community event at AMIS Services last Thursday (22 may 2014), Wilfred and myself announced a new upcoming open source project, named XML DataControl.

On the AMIS Live blog there was a good summary about the functionality of the XML DataControl:
The XML Data Control is an ADF Data Control that is used by developers to create data bindings in ADF Faces pages, just like the ADF BC Data Control and the POJO Data Control. The data exposed through this data control can be any XML source – from a SOAP or REST WebService, from a static XML document or a custom Java Class that produces an XML document from anywhere. It offers much more control and flexibility than the Web Service Data Control does (that is very limited in scope and usability).


You can check out the slides of this very short presentation if you like, but there is more news, in the very near future, an official launch event for this component will be held on the premises of MN in The Hague. To attend this event or to be informed about the next steps with the XML Data Control, you can register through this signup form.


Last, but not least, I would like to leave with a quote from Wilfred about the XML Datacontrol:
"This is a real time saver for ADF/SOA projects. We now have junior ADF developers finishing their Model project in half an hour and fully focusing on the View side of things. I really think something like the XML DataControl can turn around the perception of ADF as an overly complex framework. It makes things so much simpler."

We expect and hope to have an official and stable release coming out this summer!

Share your source between projects

Normally we pack functionality into libraries and use this library to share the functionality. However, during development of several JDeveloper Extensions our goal was to have one shared java source between our JDeveloper 11g and JDeveloper 12c extension.
Off course we wanted the ability to easily develop, test, debug and run the extension, but we also want to share the java code to introduce reusability.

We accomplished this, by creating a separated ‘coresrc’ folder and add this folder as a Java source path both in JDeveloper 11g and JDeveloper 12c. To illustrate two screenshots of the open source project ADF EMG Audit Rules.

JDeveloper 11g:


JDeveloper 12c:

A great trick to share your Java source between several projects, where you can still keep project specific source in the regular project src directory.

New release of the ADF EMG Audit Rules

There is a new release of the ADF EMG Audit Rules extension. With this release there is now support for both JDeveloper11R1 and JDeveloper12c. However, remember that JDeverlop11g does not support the suppression of violations, so this may lead to a lot of violation on existing projects.
Remember that you can define a custom profile in the Audit tab under preferences to unselect certain rules, but off course it is better to look at the warnings and see if you can fix them.


In this new release we also improved the stability of the extension, but if you see unexpected behavior in JDeveloper and you suspect it comes from the ADF EMG Audit Rules extension, you can file an issue in Jira. The amount of rules went up from 18 in version 1.0 to 35 audit rules in version 2.0.


Next to Wilfred I would also like to thanks Rohan Walia for his time and commitment to this project!


If you would like to help out and get involved in this project, check out the Index page with various links to documentation, blogs and the open source project on java.net. 

What I learned from the UX Event

Last Tuesday, March 18, there was an UX Event organized by AMIS Services together with the Oracle Applications User Experience Team. Between noon and 8 p.m. I visited a total of 13 sessions, 3 demonstrations and had a lot of great discussions, overall a great day and amazing event.

I picked up various things, from small tips and tricks to big lessons. Instead of keeping my notes to myself, I will try to give a brief overview of what I learned and what will stay with me.

Oracle Slogan
First off, the Oracle slogan, consisting of three key words: Simplicity, Mobility, Extensibility.

In short:
Simplicity: In your design, only present the user what he needs. Give the user less to learn (about the application) and more focus on their actual work.
Mobility: Not mobile, but mobility. The user should be able to access his or her information anywhere. Whether it is a laptop, smart phone or tablet.
Extensibility: Use tailoring for successful implementation for customers. The UX team provides both the Simplified UI (more later) and Best practices & Guidelines for the best UX.

The road to success
Remember that user experience is an umbrella for multiple disciplines. The usability is not just the look and feel of an application. 
  • Business value is key. 
  • It is not free, creating a better usability cost time, effort and knowledge. 
  • Quickly visualize and validate, know where you are heading and organize UI Workshops. 
  • Use an agile methodology.
  • Use wireframes or screen sketching tools to envision your product.

How do we present information?
Traditionally we present data on screens, however, data does not equal information. How to present your data as information? Use techniques to transform data into information that the matches the user his or her needs: 
  • Filter
  • Sort
  • Abstract
  • Aggregate
  • Associate/Interpret
  • Predict

Tips & Tricks
Tablet-First Design, the world is moving away from desktops and monitors, use a tabled design to think about how your application runs on a mobile device.  
Use a multi channel approach, it shouldn’t matter through which channel the users provides his or her input. 
Building blocks, keep in mind: Just because you use the correct building block does not guarantee you end up with a useable interface. 
Usability test, organize usability tests with actual users of your product, not just their managers. 

Simplified UI
By far the most sessions I visited and talks I had were about the new Simplified UI and the Design Patterns concerning this UI. 

The Simplified UI, is a 100% ADF design, there were a few slides that give detailed information about which ADF Components are used to create this UI:


However, the most exciting news might be the fact that there is an starters kit in the making. This starters kit will help you create a custom ADF application with default functionalities of this simplified UI. Not limited to, but including functionality as:
  • The layout, look & feel and skinning of the Simplified UI.
  • Starting an isolated sandbox session to record changes to the application.
  • Using (page)composers to edit the application.
  • Writing this changes to the MDS to support tailoring. 

Patterns
Last, but not least, patterns, or in more detail, design patterns! 
Sten Vesterli explained pretty powerful in one slide why we need patterns:

Good news, Oracle has a lot of information online about design patterns.
At the Oracle UX website, there is a special tab ‘For Developers’ to browse through UX Design Patterns, best practices and read about success stories. Next to the UX there is also an UX Direct website, here you find a quick look at the design process. You can read more about the ‘Discover, Desgin, Deploy’ circle and browse through resources.    

A great example of how these patterns can come into use, is for example this Pattern Set Decision Table:

Besides the web content Oracle gave out a free eBook during the UX Event, containing 60 pages of Design Patterns for the Simplified UI. The book is called: ‘Simplified User Experience Design Patterns for the Oracle Applications Cloud Service’. I wasn’t able to find the book online yet, but I’m sure they will publish it sooner rather than later.

Resources