Monday 10 August 2015

Oracle ADF dynamic tabs shell doesn’t work on 12c - SOLVED

 

Oracle ADF allows to create a page with a template in which you can open tabs dynamically (it is not really dynamically, but we will ignore it for now). The guide by Oracle can be found here Oracle dynamic Tabs UI shell

If you follow the guide you will find very interesting and frustrating fact. It doesn’t work.

And the reason is because Jdeveloper doesn’t create the binding for the template.

If I just create the page and specify the Tabs template I will see.

image

And the bindings is empty. To make it work we need to define the binding and make the template use it.

image

Now go to the page source and modify af:pageTemplate tag to be

 <af:pageTemplate   viewId="/oracle/ui/pattern/dynamicShell/dynamicTabShell.jspx" id="pt1"
value="#{bindings.pageTemplateBinding}">

 


Now your application will work

 
 

Extending the ADF Controller exception handler

 

There is a good article by Frank Nimphius explaining how to create custom exception handler for ADF application .Frank's blog

But I noticed that it is missing an important details. It is common when someone that KNOWS takes things as obvious and just don’t mention something important.

In this case I am talking about this step

Create a textfile with the name “oracle.adf.view.rich.context.ExceptionHandler” (without the quotes) and store it in .adf\META-INF\services (you need to create the “services” folder)

I opened my project and did exactly as instructed. Created the folder and placed the file. And…. nothing happened

image

Eventually after digging another 20 minutes in Google I eventually found that the actual place I need to put the file is .adf\META-INF directory which is located in the main application directory

image

Details… pay attention to details.