XML Data Control Article

Today Oracle published our article about the ADF EMG XML Data Control. With the article, also comes an extensive two part tutorial, go check them out at OTN:

Powerful and Easy ADF Data Control for XML Data
Article
Tutorial
Enjoy reading and if you have any comments or remarks, let me know!

Other Resources:
ADF EMG Community
XML Data Control wiki


Clear ADF 12c deployment on Integrated WLS

Sometimes you want to cancel your Integrated WebLogic Server, however, if you do this while a deployment is currently going on, you might run into trouble. The log window will not tell you anymore than a remote deployment failed and that the Application can not be run:



You need to clear some directories in your JDevHome before the application deployment works again. Before clearing the directories, make sure you close JDeveloper.

Go to the folder: JDevHome\system<versionnumber>\o.j2ee\drs
In here you should see your application that you try to deploy you can delete that folder or you can delete all the folders in this directory. They will be recreated for you when you run the specific application.

Next, go to the folder: JDevHome\system<versionnumber>\DefaultDomain\servers\DefaultServer
In here you should delete the ‘tmp’ folder.

After you deleted the folders, restart JDeveloper and run the application again.
You should now be able to deploy your application again to the Integrated WebLogic Server.


Exclude folders from you subversion update

Working in an IT project, means working with version control. A lot of times, this means subversion in combination with Tortoise SVN. In bigger projects it sometimes happens there are folders in the tree structure that you are not really interested in. 
It is a good things, that you can exclude this folders from your update, so you don’t get distracted by de commits done on folders you don’t care about. 

When you check out a new repository it is possible to press the button ‘Choose items’:

This will give you a popup from the Repository Browser and you can tick on and off the folders that you want:

This is a great feature. However, once you select this, it can be hard to find back this option. As the world around us changes, you might want to see updates in a folder you excluded or you want to exclude even more folders.
When you go to your Tortoise SVN menu, select the option ‘Update to revision’:

This will open the Update menu and here you see again the option ‘Choose items’:

Clicking this button, brings you to the same Repository Browser view:

So whenever in the need of changing your previous selection, you can tick and untick your previous choices.


Using Code Snippets in JDeveloper

In JDeveloper, it can be helpful to set up code snippets to be of easy use later. Personally I use this mainly to set up code snippets for demo purposes and this is rather easy to set up.
First of all, if not already open, open your Components Window in JDeveloper: 

Now open the file that you want to create the code snippet from, this can be any file in JDeveloper as example I opened a Java file with a main method in it. After you have opened the file, you should see a choice list in your Component Pane in JDeveloper.
In this choice list select the option ‘My Components’ and open the ‘Code Snippets’ area:

In the file you opened, select the part of the file that you want to save as a snippet and drag and drop this to the Code Snippets area:

After this a pop up should appear to enter a name for the snippet, enter a name and press OK:

The result should be a saved code snippet on the Code Snippets area when My Components is selected:

You can now drag and drop this code snippet into any other file to create the exact same code as you have saved.


Create a Custom ADF Component

During UKOUG Tech14 in Liverpool, Wilfred and I had a presentation about how to create your own Custom ADF Component. Since we were busy on preparing the presentation there were no blogs about these beforehand.
I thought it would be nice to give a small recap, for anyone interested in going into creating Custom ADF Components.

In our sample application we created an ADF Component called ‘multi select’ which offers the user the ability to show a list of items and the ability to add items, delete items and select an item. The result is the component within the red line:

During our presentation, we had an overview of the components involved in creating a custom ADF component. The overview looked as followed:

The slide deck on slideshare will take you through these components, the responsibilities and the code involved in creating this component. We have added comments to the code in the slides, so you are able to follow this without our voice over. The server side classes are all Java classes as where the client side is all JavaScript. The Skin is created in a css file using the ADF skin style.

At the end of the slide deck there is a slide with links to several documentation, we advise you to keep links to these documents close by you while starting to code your component. As you will see, we link to documentation from the ADF release 11.1.2.4 while we have build our component in ADF 12.1.3. This is because Chapter 31 ‘Creating Custom ADF Faces Components’ is not available in the 12c Documentation.
Last but not least, all our effort is available on a github repository, both the Custom ADF Component we have created as well as an example of a consuming ViewController project using this multiSelect component.

Resources:
- Presentation: http://www.slideshare.net/ROlrichs/adf-component-tech14
- GitHub Repository: https://github.com/wvanderdeijl/adfcomponent

JDeveloper Debugging Tips (Watchpoints & Beep)

In a previous blog post I talked about scoping breakpoints for debugging purposes, next to scoping breakpoints JDeveloper has more interesting debugging features to offer.

I created a simple example to show both the watchpoint as well as the beep functionality. To illustrate this, I created a page with an inputText and a button, both bound to a backingBean. 

This  is the jsf code:
 
      
      
 
The code from the bean is also pretty straight forward:
   private String value = "value";

    public void setValue(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public void changeValue(ActionEvent actionEvent) {
        value += "!";
    }

Now imagine that I want to halt execution everytime the bean field value changes. I can simply right-click the field and choose ‘Toggle Watchpoint’:

This will show a nice sunglass instead of a breakpoint in the line gutter:


I also want to be informed when the getter of the value is called, however, I do not have the need to be redirected to JDeveloper and press F9 again to continue. I just want a signal that we have been inside the getValue() method, in this case a beeping sound.
To do this, you place a breakpoint in the getter, right-click on it and go to ‘Edit Breakpoint’.

Go to the Actions tab, in here unselect the ‘Halt Execution’ option and select the ‘Beep’ option. You will hear a beep when the breakpoint is reached, but it will not force you into JDeveloper.


If you run the page, you will hear a Beep whenever the getter is called, so you recieve a signal of this action. Whenever the field value is changed, it will take me into JDeveloper and halt the execution, this means it will halt execution in the method when I press the button on the screen, while there is no explicit breakpoint at this point in the code:

You can also see the old and new value in the log window:


OOW14 summary: Oracle ADF

Being an ADF developer, off course a lot of my focus and attention went to the ADF related sessions. I left OOW with a mixed feeling about the ADF sessions. On the downside I felt there was not a lot of attention for ADF during the OOW conference. You see ADF or ADF related features during almost all the presentations, whether it is the Cloud, SOA Suite and Service Bus or MAF, but not a lot on ADF itself. Then again this might be a good thing, meaning the framework being more stable and reliable.
However, the upside of the conference for me personally still is the User Group session on the Sunday, thanks to the ODTUG user group and the ADF EMG community there was a whole Sunday full of nice ADF presentation, I enjoyed all of them, a great day!

ALTA UI
One of the key ADF features at Open World was the release of the new ALTA UI, which can be viewed upon as a Simplified UI 2.0, if you want (also see my blog about the UX event). It is not just a skin, but a way of creating ADF applications. Follow the patterns, use the building blocks and create not only a functional, but also a good looking application with a good user experience.

Diagrams for ADF
A presentation done by Duncan Mill and Jairam Ramanathan about the new DVT component to create diagrams in ADF. This is not just a ready to use DVT, that can work for you in some situations. This is actually a framework you can use to create the exact diagram you need for your use case at that time. This will result in a SVG in the HTML output, which means there is native browser support and the user can actually use default functionality like zooming & panning.
Duncan wrote a series containing over 10 articles, which included the necessary steps on how to get yourself familiar with the diagrams and how to use this. A leap forward in the visualization tools within ADF, maybe we will get to see more of this in the framework?
 
High Availability and ADF
Jobinesh had a great session on High Availability (HA) support within ADF. If you want to run ADF on HA, the framework does not do all the work for you, you have to help it a little bit.
Look up his presentation to read up on how to ensure the correct working of failover and data replication, but also for some great code guidelines on how to program MBeans, TaskFlows and more within a HA environment. There is no need for me to repeat all these steps he worked out for you so well.

DVT within ADF
In this session the Data Visualization Tools (DVT) team showed some cool new features from the current (12.1.3) as well as the upcoming release. They are not ADF only, because almost all of them are also available within the MAF framework. The layout and animation of all the DVTs are now responsive and there has been a great performance improvement in all of them. Within the thematic map it is now possible to provide your custom map.
In the upcoming release the there will be a nice cool feature to mashup DVTs. Meaning you can switch between different DVTs without losing the state/context of the data.

Maven support
Since the release of ADF 12c, there is now support in JDeveloper for Maven. Which can be of great use in your Continuous Integration and/or Continuous Deployment process. JDeveloper understands how to work with the pom file and everything you need to do to get started with maven and your project you can do from within JDeveloper.

ADF EMG XML Data Control
Last but not least some shameless self plug. If you do anything with XML within ADF, whether it is just to show data on an UI or to manipulate it. Make sure you have a look at the XML Data Control. The 1.0 version is out and it can saves you lots of time , headaches and lines of code in Java.

Available online resources