Run ADF & SOA on the IntegratedWLS in separated domains

In JDeveloper 12c, it is possible to run SOA Suite on the InternalWLS, which is a great feature. However, once you have done this, your domain will be filled with SOA extensions. Meaning the server start up time will increase drastically.
When you do both ADF & SOA development, this can be annoying when you just want to run your ADF application and the IntegratedWLS is busy starting up the SOA domain. One way to avoid this is to run two different JDeveloper instances with two different Jdev Homes configure.
In this blog I will describe you how to set this up.

First of all, I got my ‘normal’ JDeveloper for ADF development, this is installed on my C drive, under: C:\oracle\JDev1213, if you navigating to the Oracle_Home\jdeveloper\jdev\bin folder and open the jdev.boot file, you will see the variable ‘ide.user.dir.var’:


Now I recently installed a second JDeveloper 12c in a different directory, this JDeveloper is installed with the SOA extensions, I installed this on the C drive as well, but in the folder C:\oracle\JDevHomeSOA. Within this JDeveloper folder, there is also a jdev.boot file under the folder ‘\jdeveloper\jdev\bin’, however, I changed the ‘ide.user.dir.var’ to a specific _SOA variable:


Now all that is left to do is to create two new Environment Variables, pointing to different JDevHome directories:


This will create two different domains for each JDeveloper, keeping your environment clean and tidy!

Stretch your table to full page

In a previous blog I mentioned dynamic stretching table height with the autoHeightRows property. However, I have noticed people are having more troubles with stretching the height of the table.

This time I will focus on stretching your table to fill the total page height. We start with a simple ADF table on the employee table, showing all employees. Although I have seen more complex questions, including regions and more components in the structure, it all comes down to the same principle. I created a pretty straight forward jsf file with the following structure:



On the panelCollection I have set the styleClass AFStretchWidth to stretch the table to the full width of the page, however, by default it will not stretch the full height, but it will look like this:

Especially when you have a more complex structure, with more layout components in your page, it is easy to think you configured something wrong, however, this is the default behavior even when you use the panelStretchLayout.
In the documentation of the panelStretchLayout you can read up on the Geometry Management, it is important to focus on the section about the ‘dimensionsFrom’ property. The default value is read from the web.xml context-param ‘oracle.adf.view.rich.geometry.DEFAULT_DIMENSIONS’ which results in ‘auto’.
However, for our page we want the table to take the dimensions from parent. You can set the dimensionsFrom="parent" on the panelStretchLayout on your page, or you can override the default in the web.xml parameter.
The result will be the same, a table shown over the full page:





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