Shay Shmeltzer

Subscribe to Shay Shmeltzer feed
Tips and information about Oracle's Development Tools and Frameworks
Updated: 18 hours 13 min ago

Creating Oracle Application Builder Cloud Service App Based on Oracle ADF Business Components

Thu, 2016-10-20 11:29

Oracle Application Builder Cloud Service (ABCS for short) enables you (and your business users) to create rich web and mobile apps in a quick visual way from a browser with no-coding required (but coding is possible).

The UI that ABCS creates is based on Oracle JET, which many of our customers love because its responsiveness and lightness.

Some Oracle ADF customers have been on the hunt for a new client-side UI solution for their apps, and Oracle JET is certainly a technology that will work for those use cases.

A nice feature for Oracle ADF customers is that their data-access and business-service layer is built in a reusable way that is decoupled from the UI. And now, with the ability to expose ADF Business Components as REST service, they can use any modern UI framework to develop the UI including Oracle JET. There are already many blog entries with code samples on how to write JET apps that connect to ADF Business Components

But what if we could give you the simplicity of ABCS for the UI creation, the power of JET for the UI experience, and the ability to leverage your existing investment in Oracle ADF all without writing a single line of code manually?

Well, in the demo below I'll show you how you can reuse the logic you have in Oracle ADF Business Component and build a JET based UI on top of them in a declarative way with Oracle Application Builder Cloud Service.

Basically you get the best of each tool - and you don't need to write a single line of code !


In the 9 minutes demo I'll show you how to:

  • Create an ADF Business Components layer on top of Oracle Database in the Cloud - (0:00)
  • Expose the ADF Business Components as REST service - (1:45)
  • Deploy the REST service to Java Cloud Service (JCS) - (2:19)
  • Create an Oracle Application Builder Cloud Service application - (6:00)
  • Add an ADF BC REST Service as a data source to the app - (6:30)
  • Create the user interface to your application - (7:20)

(Times are indicated in case you want to skip sections you are already familiar with) 

If you are interested in a bit of a background on why this is so simple, the answer is that ABCS was built to enable easy integration with Oracle SaaS leveraging the REST services they expose. To quickly build the full app with all the defaulting you are seeing in there (full CRUD with a simple drag and drop) ABCS needs to know some basic information about the data that it needs to render (primary key, data types, etc). Since Oracle SaaS is built on Oracle ADF, we built into ABCS the capability to analyze the describe that ADF BC REST services provide. This makes it dead simple to consume ADF REST service in ABCS, whether these services come from Oracle's apps - or your own ADF apps :-) 

As you can see there is a great synergy between Oracle ADF, Oracle Application Builder Cloud Service and Oracle JET. 

Want to try it on your own? Get a trial of Oracle Application Builder Cloud Service here

Categories: Development

List with Details on a Single Page in Oracle Application Builder Cloud Service

Thu, 2016-10-13 11:11

This question came up a couple of times from users so I figured I'll document how to achieve a layout that shows a list of items and allows you to pick an item from this list to show the details of this item on the same page.

list with details image

The default layout that ABCS creates is a list on one page with the ability to select an item and go see the details or edit that record on another page.

To combine the two into a single page, start from the edit or the details page that ABCS created.

On this page you then add the table or list for the same object, and set the link on a field to do the edit or details - this basically means that you'll do a navigation to the same page.

If you now run the page you'll be able click items in the table and see their details on the same page.

Here is a quick demo of how it is done:

Note that if you want this to be the default view that people see when navigating to your app - just update the navigation menu of your application to reflect this. 

Categories: Development

Automatic Time-Based Dismiss for Oracle ADF Popups

Mon, 2016-10-10 11:09

This blog entry is about a nice little new feature that was introduced into ADF in the version, and didn't get a mention in the "what's new" document.

Self dismissing messages  are popping up everywhere these days (when you get an email, when you have a new calendar invite etc), and you might want to use this UI pattern in your ADF apps too.

There is a new property for af:popup components - autoDismissalTimeout - that allow popups to automatically dismiss after a certain number of seconds that you can specify. This is very useful for all sort of messages that you want to show to the user, but you don't want to require the user to do any activity to dismiss.

Here is an example of such a message that you can associate with a save button:

popup sample

And here is the code you'll need to do this:

            <af:popup id="p1" animate="true" autoDismissalTimeout="2">

                <af:panelGroupLayout id="pgl1" layout="horizontal">

                    <af:image source="stat_confirm_16.png" id="i1"/>

                    <af:outputFormatted value="Your changes have been saved" id="of1"/>



One more (small) reason to adopt the new versions of Oracle ADF! 

Categories: Development

New Capabilities for the Status Meter Component in ADF

Mon, 2016-09-26 18:58

While building a demo of new Oracle ADF features for my OOW session, I came across some nice new functionality in the dvt status meter gauge component (dvt:statusMeterGauge), specifically the round one which has become quite popular in various Oracle Alta UIs.

Turns out you can turn the dial and cut it so it shows just parts of a circle.

By adding thresholds you can use it as a replacement for the dial gauge.

Here is how it can look: 

status meter

Here is the code used:

                            <dvt:statusMeterGauge orientation="circular" inlineStyle="width:150px; height:100px;"

                                                  id="statusMeterGauge1" maximum="25000"

                                                  value="#{bindings.Salary.inputValue}" minimum="0" startAngle="180" angleExtent="180"


                                <dvt:gaugeMetricLabel rendered="true" id="gml1"/>

                                <dvt:gaugeThreshold id="gt1" maximum="4000" color="red"/>

                                <dvt:gaugeThreshold id="gt2" maximum="6000" color="yellow"/>

                                <dvt:gaugeThreshold id="gt3" maximum="20000" color="green"/>


Categories: Development

Oracle OpenWorld 2016 and Where You'll Find Me

Tue, 2016-09-13 17:49

It's that time of the year - Oracle OpenWorld is taking place starting on Sunday - and my calendar is full of activities.

I'm going to be presenting on multiple tools and frameworks including sessions on Oracle Application Builder Cloud Service, Oracle JDeveloper and Oracle ADF, Oracle Developer Cloud Service and a session discussing which dev framework and tool is right for you. 

In case you want to catch me at #OOW16 here is my schedule:

Simplified Multichannel App Development for Business Users [CON2884] 
Monday, Sep 19, 1:45 p.m. | Moscone West - 2005 - A session where I'll demo how easy it is to create and host your own applications with Oracle Application Builder Cloud Service.

Oracle Application Development Framework and Oracle JDeveloper: What’s New [CON1226]
Tuesday, Sep 20, 4:00 p.m. | Moscone West - 2018 - A quick review of the new features we added in the 12.2.* releases of JDeveloper and ADF

Oracle Development Tools and Frameworks: Which One Is Right for You? [MTE6650]
Tuesday, Sep 20, 6:15 p.m. | Moscone South - 301- A session for all of those who are not sure which technology is right for them, or for those who want to ask me "is Oracle [fill in the product name] dead?"

A Guide to Cloud-Based Agile Development Methodology Adoption [CON1947]
Wednesday, Sep 21, 12:15 p.m. | Moscone West - 2018 - A demo focused session that show cases how Oracle Developer Cloud Service helps your team adopt agile development. 

No Code Required: Application Development and Publishing Made Easy [HOL7402]
Tuesday, Sep 20, 11:30 a.m. | Hotel Nikko - Nikko Ballroom III (3rd Floor)
Monday, Sep 19, 4:15 p.m. | Hotel Nikko - Nikko Ballroom III (3rd Floor) - Your two chances to try out  the new Oracle Application Builder Cloud Service and develop your first app

Agile Development Management and Continuous Integration Simplified [HOL7403]
Wednesday, Sep 21, 8:00 a.m. | Hotel Nikko - Nikko Ballroom III (3rd Floor) - Your chance to manage a whole development team agile process using Oracle Developer Cloud Service

I'm also going to be in the mobile theater in the mobile area in the demo ground on Tue and Wed at 10:30 doing a quick demo of ABCS and its mobile capabilities.

In between these sessions, you'll be able to find me at the Oracle Demoground doing some shifts in the Oracle ADF booth (which is in Moscone South far left corner) - the rest of our pods are close by including JET, DevCS, ABCS and even Forms :-)

And if I'll have any spare time, I'll try and catch some of the other session on this list of Dev tools and framework sessions

See you next week.


Categories: Development

CI, DevOps and ALM for Oracle SOA Suite with Oracle Developer Cloud Service

Tue, 2016-07-26 18:31

We have a lot of developers who are using JDeveloper to develop applications with Oracle SOA Suite, and in this blog I wanted to show them how the combination of JDeveloper along with Oracle Developer Cloud Service can help automate their whole development and delivery lifecycle.

One unique aspect of Developer Cloud Service is that it has an instance of JDeveloper available in the build environment. This allows customers who are building Oracle SOA artifacts to leverage the OJDeploy mechanism to package their applications as part of a continuous integration cycle just like they do during development time.

With the improved DevCS integration that we added in JDeveloper 12.2.1, developers can go beyond integration with the Git server offered by DevCS and can now interact with the DevCS task tracking system directly as well as associate code changes to specific tasks they are working on.  

In this 10 minutes video I show:

  • Creating Ant based builds for Oracle SOA artifacts
  • Automating Continuous Integration build and packaging for Oracle SOA from Developer Cloud Service
  • Managing SOA project code with Git and Developer Cloud Service 
  • Tracking tasks from JDeveloper and monitor agile development in Developer Cloud Service

By the way, for those who rather use Maven to automate their builds - this is totally possible and supported in DevCS as well. There is a set of videos that show you how to do that here

(If you haven't seen how quick and easy it is to create a DevCS project, create a git repo, track tasks and create agile team boards - see this video and this one too).

Note that developers get access to Developer Cloud Service with every subscription to the Oracle SOA Cloud Service. 

Here are the two ant files used in the video:

Note that in the you'll want to change the application and project names to match the ones you are working on.

As you see in the video the build.xml is generated for you automatically and you just need to add the line:

<property environment="env" />



<?xml version="1.0" encoding="UTF-8" ?>
<!--Ant buildfile generated by Oracle JDeveloper-->
<!--Generated Jul 25, 2016 5:11:09 PM-->
<project xmlns="" name="ProcessOrder" default="all" basedir=".">
<property environment="env" />
<property file=""/>
<path id="library.SOA.Designtime">
<pathelement location="${install.dir}/soa/plugins/jdeveloper/extensions/"/>
<path id="library.SOA.Runtime">
<pathelement location="${install.dir}/soa/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar"/>
<pathelement location="${install.dir}/soa/soa/modules/oracle.soa.fabric_11.1.1/tracking-api.jar"/>
<pathelement location="${install.dir}/soa/soa/modules/oracle.soa.fabric_11.1.1/tracking-core.jar"/>
<pathelement location="${install.dir}/soa/soa/modules/oracle.soa.fabric_11.1.1/edn.jar"/>
<pathelement location="${install.dir}/soa/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar"/>
<pathelement location="${oracle.commons}/modules/"/>
<path id="library.BPEL.Runtime">
<pathelement location="${install.dir}/soa/soa/modules/oracle.soa.bpel_11.1.1/orabpel.jar"/>
<path id="library.Mediator.Runtime">
<pathelement location="${install.dir}/soa/soa/modules/oracle.soa.mediator_11.1.1/mediator_client.jar"/>
<path id="library.MDS.Runtime">
<pathelement location="${oracle.commons}/modules/oracle.mds/mdsrt.jar"/>
<path id="library.BC4J.Service.Runtime">
<pathelement location="${oracle.commons}/modules/oracle.adf.model/adfbcsvc.jar"/>
<pathelement location="${oracle.commons}/modules/oracle.adf.model/adfbcsvc-share.jar"/>
<pathelement location="${oracle.commons}/modules/commonj.sdo.backward.jar"/>
<pathelement location="${oracle.commons}/modules/commonj.sdo.jar"/>
<pathelement location="${oracle.commons}/modules/oracle.toplink/eclipselink.jar"/>
<pathelement location="${oracle.commons}/modules/"/>
<pathelement location="${oracle.commons}/modules/"/>
<pathelement location="${oracle.commons}/modules/"/>
<path id="classpath">
<path refid="library.SOA.Designtime"/>
<path refid="library.SOA.Runtime"/>
<path refid="library.BPEL.Runtime"/>
<path refid="library.Mediator.Runtime"/>
<path refid="library.MDS.Runtime"/>
<path refid="library.BC4J.Service.Runtime"/>
<target name="init">
<mkdir dir="${output.dir}"/>
<target name="all" description="Build the project" depends="deploy,compile,copy"/>
<target name="clean" description="Clean the project">
<delete includeemptydirs="true" quiet="true">
<fileset dir="${output.dir}" includes="**/*"/>
<target name="deploy" description="Deploy JDeveloper profiles" depends="init">
<taskdef name="ojdeploy" classname="oracle.jdeveloper.deploy.ant.OJDeployAntTask" uri="oraclelib:OJDeployAntTask"
<ora:ojdeploy xmlns:ora="oraclelib:OJDeployAntTask" executable="${oracle.jdeveloper.ojdeploy.path}"
<ora:parameter name="workspace" value="${oracle.jdeveloper.workspace.path}"/>
<ora:parameter name="project" value="${}"/>
<ora:parameter name="profile" value="${}"/>
<ora:parameter name="nocompile" value="false"/>
<ora:parameter name="outputfile" value="${oracle.jdeveloper.deploy.outputfile}"/>
<target name="compile" description="Compile Java source files" depends="init">
<javac destdir="${output.dir}" classpathref="classpath" debug="${javac.debug}" nowarn="${javac.nowarn}"
deprecation="${javac.deprecation}" encoding="UTF8" source="1.8" target="1.8">
<src path="SOA/SCA-INF/src"/>
<target name="copy" description="Copy files to output directory" depends="init">
<patternset id="copy.patterns">
<include name="**/*.GIF"/>
<include name="**/*.JPEG"/>
<include name="**/*.JPG"/>
<include name="**/*.PNG"/>
<include name="**/*.cpx"/>
<include name="**/*.dcx"/>
<include name="**/*.ejx"/>
<include name="**/*.gif"/>
<include name="**/*.ini"/>
<include name="**/*.jpeg"/>
<include name="**/*.jpg"/>
<include name="**/*.png"/>
<include name="**/*.properties"/>
<include name="**/*.sva"/>
<include name="**/*.tag"/>
<include name="**/*.tld"/>
<include name="**/*.wsdl"/>
<include name="**/*.xcfg"/>
<include name="**/*.xlf"/>
<include name="**/*.xml"/>
<include name="**/*.xsd"/>
<include name="**/*.xsl"/>
<include name="**/*.exm"/>
<include name="**/*.xml"/>
<exclude name="build.xml"/>
<copy todir="${output.dir}">
<fileset dir="SOA/SCA-INF/src">
<patternset refid="copy.patterns"/>
<fileset dir=".">
<patternset refid="copy.patterns"/>

Categories: Development

Extending Oracle SaaS with Oracle Application Builder Cloud Service - Simplified PaaS for SaaS

Tue, 2016-07-19 16:18

One of the focus area for us when developing the new Oracle Application Builder Cloud Service (ABCS) was to create a tool that would make it very simple to enrich Oracle SaaS applications.

This integration is a key part of Oracle's PaaS for SaaS offering - where we have unique capabilities in our Platform as a Service offering for our Software as a Service customers.

With ABCS it is very easy to pick up objects from Oracle SaaS (through the built in service catalog) and then design new web and mobile interfaces that show data from those.

In addition you can then add your own custom fields and related objects with additional data you want to track.

Once your application is complete - you can then either run it as a stand-alone app, or embed it into an Oracle SaaS interface. 

I wrote two blogs and recorded two videos that show you the basics.

Creating Oracle ABCS application connected to Oracle SaaS

Embedding Oracle Application Builder Cloud Service Apps in Oracle Sales Cloud

<span id="XinhaEditingPostion"></span>

These videos are part of the new Oracle Application Builder Cloud Service YouTube Channel

And the blogs are published on the Oracle Application Builder Cloud Service OTN Community

We have more tutorials there to help you go even further - so check them out! 

Categories: Development

Continuous Integration for Database Developers - Updated

Wed, 2016-07-13 17:25

About a year ago I posted a demo showing how to manage the full development lifecycle of your database code with the help of Developer Cloud Service. Since then we released new versions of both Developer Cloud Service and JDeveloper that make the experience even smoother and add more features - so I figured I'll record a small updated demo.

In this demo I'm starting from an existing project that has a list of tasks being tracked in a development sprint in the new Agile tab in Developer Cloud Service - which gives you a great view of your development effort and progress. 

(If you want to see how you create the initial project and add issues to it check out the previous demo). 

A few new things you'll see in this demo:

  • The new Agile/Sprint management dashboard in Developer Cloud Service
  • Task tracking integration in JDeveloper
  • Updating definition of database objects in JDeveloper and generating SQL scripts
  • Branching Git repositories
  • Code review for SQL files
  • Build automation for DB changes with Ant - including deployment to a cloud database

Note that in this video I'm using a cloud instance of an Oracle database where port 1521 is open for SQLNet communication. The instructions for opening this port for communication on an Oracle Cloud Database are here.

Another approach that you can take is to use scripts that execute commands using SSH on the Database Cloud Service - you can see this approach in action in this video showing Developer Cloud Service managing an Oracle APEX Lifecycle.  

The Ant script used in the sample is:

 <?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="" default="init">
  <target name="init">
  <path id="antclasspath">
    <fileset dir=".">
      <include name="ojdbc7.jar"/>
  <target name="deploy">
    <sql driver="oracle.jdbc.OracleDriver" userid="C##xxxx" password="xxxx"
         url="" src="./database/DATABASE1/dbcreate.sql"
         classpathref="antclasspath" onerror="continue"/>

Note that you need the Oracle JDBC jar file to be accessible from the Ant script - I just included it in my git repository.

If you like to try this out with your own database development project - get a trial of Oracle Developer Cloud Service here

Categories: Development

Getting Started with Oracle JET

Wed, 2016-07-06 14:31

Last week I did an "Introduction to Oracle JET" session at the KScope16 conference, and I wanted to share the demo I used there with more people.

Specifically the demo shows how you can adopt the code from the Oracle JET cookbook samples to work in the quick start template project.

In this demo you'll learn how to create your first JET application and build a basic JET page.

Specifically it shows the following steps:


Hopefully this video can help you build your first Oracle JET page.

Now that you watched this video that shows how to use the pre-configured project provided as a quick start, you might want to follow up and watch the video that shows you how to work with the base distribution and hook up the JET libraries. 

Need more help with Oracle JET? Join the JET community on OTN

Categories: Development

Calling REST Services from Application Builder Cloud Service

Mon, 2016-03-21 16:33

One of the frequent requests we get when we demo ABCS is - can I invoke some external functionality that is exposed as a REST service and pass parameters to it.

Well, with a minimal amount of JavaScript coding you can do it in the current version. 

I recorded the demo below that shows you how to do that.

I'm leveraging a public REST API that github exposes to get a list of repositories for a user. The service is available at

I then design an ABCS page that has a parameter field, a button that invokes the REST/JSON call, and a placeholder for results. It looks like this: 

In addition the video also shows some other techniques that are useful, including:

  • How to create a new blank data entry page
  • How to add custom component that renders HTML content
  • How to add a button that calls a REST service
  • How to pass a parameter to the JavaScript custom code
  • How to set a page to be the default page of the app
  • How to stage your application for external testing

&amp;amp;amp;amp;lt;span id=&amp;amp;amp;amp;quot;XinhaEditingPostion&amp;amp;amp;amp;quot;&amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;gt;

It seems that right now you are restricted to accessing REST services that are secured over HTTPS protocol (which is a good thing).

Note that you of course don't have to stage the app to see it run, you can just go into live mode, or run it to see it working. I just wanted to make sure I have a demo out there that shows how staging works.

The JavaScript snippet I'm using in the video is: 

$.getJSON(""+ +"/repos", function(result){

$.each(result, function(i, field){

$('[name="myOutput"]').append( + " ");




If you'll actually add a


as the first link, it will clear the field for you each time you re-press the button. 

Categories: Development

OTN Interview about Application Development with Oracle

Tue, 2016-03-15 14:34

A few weeks ago, I set down with Bob from OTN for an interview that covered some of the key products our group works on.

I covered the various frameworks (ADF, JET, MAF), what we are doing with cloud based development (DevCS) and our tools for citizen developers (ABCS).

In case you are interested in any of these acronyms here is the video:

Note that things move really fast at Oracle, and since this interview we already released a new version of Oracle JET and also made it open source, we released an update to Developer Cloud Service, and Application Builder Cloud Service has gone production.

Categories: Development

Application Builder Cloud Service - Menus, Buttons and Validation

Fri, 2016-03-04 12:11

Continuing with the exploration of Oracle Application Builder Cloud Service, I've picked up the application I created in the previous blog entry and added a few more things to demo how to:

  • Configure the logo and title
  • Modify and add menu items
  • Define field level validation
  • Add buttons and define their actions

Check out this short demo:

Categories: Development

First Steps with Oracle Application Builder Cloud Service

Wed, 2016-02-24 19:22

Last week we released a new cloud service - the Oracle Application Builder Cloud Service.

(I'll refer to is as ABCS here to keep it short).

ABCS is built for the non-professional developer, what some call the citizen developer, giving them a solution to very quickly build and publish applications that can address immediate business needs. As you'll see in the demo below, a UI first approach makes development very simple.

I recorded a quick demo to show you just the basics of app development and wet your appetite.

As you'll see ABCS makes it dead simple to create Web apps, define business objects that you want to track (implemented as tables in an Oracle cloud database instance), and fine tune the UI creating multiple forms. The underlying UI technology of both ABCS and the apps that it creates is Oracle JET. 

Note that in this video I didn't cover the steps to actually stage and then publish your application so other users can access it - another thing that ABCS makes simple. On these and other capabilities in future blogs...

Categories: Development

Agile Development with Oracle Developer Cloud Service and JDeveloper 12.2.1

Tue, 2016-02-02 18:49

I blogged in the past about using Oracle Developer Cloud Service (DevCS) together with JDeveloper/ADF to manage your code and automate your builds.

Since I wrote those blog entries, we released a new version of JDeveloper (12.2.1) that added deeper integration with the Developer Cloud Service functionality for tracking tasks/issues. In parallel Developer Cloud Service also added various features with one of the new areas being covered is managing sprints and an agile development processes

I thought it might be interesting to show some of the new features of both products working togethers.

In the video below you'll see how to:

  • Connect to DevCS and its projects from inside JDeveloper
  • Leverage the Team view in JDeveloper (tasks, builds, and code repositories)
  • Interact with Tasks/Issues in JDeveloper
  • Handle Git transactions
  • Associate code commits with specific tasks
  • Monitor team activity in the Team Dashboard
  • Create Agile boards and manage sprints in Developer Cloud Service

One other interesting feature I'm not showing above is the ability to do code reviews on your code by team members - before those are merged into your main code line.

If you want to try Developer Cloud Service out, just get a trial account of the Oracle Java Cloud Service - and you'll get an instance of the Developer Cloud Service that you can use to test this new way of working. 

Categories: Development

Developing with Oracle MAF and Oracle ADF Business Components - The REST Edition

Mon, 2015-11-30 18:24

When Oracle ADF Mobile was released over 3 years ago, one of the first blogs I created on this topic showed how to leverage Oracle ADF Business Components to access a server database and create a mobile front end on top of it.

Since then both frameworks have matured, and we learned some best practices doing implementations internally and for customers. Today I'm going to show you a better way to build this type of applications, specifically leveraging REST as the communication protocol between the ADF backend and the Oracle MAF front end. REST based integration performs much better than SOAP for this mobile scenario, and as you'll see development is as simple.

Specifically I'm leveraging the Oracle A-Team Mobile Persistence Accelerator (AMPA) JDeveloper Extension- this extension simplifies MAF's interacting with REST backends, and has some cool extra features if your  REST services are based on ADF BC.

I used JDeveloper 12.2.1 to expose REST services from my ADF Business Components.  If you are not familiar with how to do that, see this blog on exposing ADF BC as REST services, and then this blog about enabling CORS for ADF Business Components.

The video below picks up the same application (Application14) and continues from where the previous two ended. 

Now let's see the MAF development part:

As you can see, it is quite easy to create your MAF UI. The AMPA extension does a lot of work for you making the access to the REST backend as easy as possible. (thanks goes out to Steven Davelaar).

The AMPA extension can also generate a complete UI for you - so you can give that wizard a try to if you are  looking for even more productivity. 

Categories: Development

Doughnut Chart - a Yummy Addition to Oracle ADF Faces

Mon, 2015-11-23 02:16

Another new feature in Oracle ADF 12.2.1 is the new Doughnut Chart capability.

It looks like this:

When I first tried to create this one, I couldn't find the option for doughnut chart in the JDeveloper wizard.

Then I was told that a doughnut is just a pie with a hole in the center - so you actually just need to create a pie chart, and then specify some properties.

And indeed, if you'll look at the property inspector for pie charts you'll see a few new properties you can leverage. 

For example there is the InnerRadius property - that expects a value between 1 and 0 - this controls how big is the hole in your doughnut.

Another nice capability is the you can put some filling in your doughnut - basically put some text that will go in the middle empty area. You do this by using centerLabel property. In the example above I used the center of the doughnut to report the total salary of a department - using a groovy sum expression in the Departments ViewObject - learn how here.

(Don't forget to use the centerLabelStyle property to assign it a bigger font - a best practice from the Oracle Alta UI book).

Here is the code from the JSF page:

<dvt:pieChart selectionListener="#{bindings.EmployeesView4.collectionModel.makeCurrent}"
   dataSelection="single" id="pieChart1" var="row"
   centerLabel="Total Salary: #{bindings.SumSalary.inputValue}" innerRadius="0.7"
   centerLabelStyle="font-size:large;" title="Salary BreakDown" 
         <dvt:chartLegend id="cl1" position="bottom"/>
         <dvt:pieDataItem id="di1" label="#{row.LastName}" value="#{row.Salary}"/>

Try it out - it's a yummy new addition to Oracle's set of bakery based charts. 

Categories: Development

Enabling CORS for ADF Business Component REST Services

Fri, 2015-11-20 05:12

CORS (which stands for Cross-Origin Resource Sharing) is a setting that will enable your REST services running on one server to be invoked from applications running on another server.

I first encountered this when I was trying to run an Oracle JET project in my NetBeans IDE that will access a set of REST services I exposed using Oracle ADF Business Component in my JDeveloper environment. Since NetBeans runs the HTML on a GlassFish instance, while JDeveloper ran the ADF BC layer on a WebLogic instance I got the dreaded No 'Access-Control-Allow-Origin' header is present error:

 XMLHttpRequest cannot load No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8383' is therefore not allowed access.

There is no built-in functionality to enable CORS for ADF BC in JDeveloper, but I found it very easy to leverage the CORS Filter libraries to do this. All you need to do is add the two JAR files it provides to your project and configure the web.xml to support the filter and the specific REST operations you want to enable CORS for.

Here is a quick video showing you the complete setup (using the REST ADF BC project created here).

The web.xml addition is:

                <param-value>GET, POST, HEAD, PUT, PATCH, DELETE</param-value>

If you follow my approach in the video and add the JARs as a new user library to JDeveloper and don't forget to check the "Deploy by Default" check box for the library.

Categories: Development

Remote TaskFlows/Remote Region - For Advanced Reusability in Oracle ADF

Tue, 2015-11-17 17:56

A new feature in Oracle ADF 12.2.1 is Remote TaskFlows (or Remote Regions) - this allows one application to have regions inside it that are populated from taskflows that are running as part of another application.

Initially some of you might be a bit confused - "wasn't this something that we were able to do with ADF libraries already? We could just package a taskflow from one app as an ADF library and use that library in the other application".

The slight distinction here is that the library approach had the taskflow running as part of your consuming application. Remote task flows on the other hand have the taskflow running as part of the other application and don't require the creation of a library. As a result they also don't require an ADF library update when the taskflow changes- the minute the changes are deployed on the remote server, your application will get the new version. 

One way of thinking about remote taskflows is as adding a "portal" like functionality to your ADF app - allowing one app to display parts of another app leveraging the other app resources for executing any logic. 

Here is a quick video demoing how to configure and run this.

The URLs you'll need for creating the remote region resource connection are:




Note that there are some limitation on the type and functionality of taskflows that can be exposed as remote taskflows. And there are other things to consider such as security and session timeout settings. So have a read through the remote region documentation before you start leveraging this feature.

A couple of notes.

1. In the currently available 12.2.1 version of JDeveloper from OTN, there is a slight bug that will prevent you from creating the connection to the remote task flow - there is a patch available for this from Oracle Support - request the patch for bug 22132843 or 22093099.

2. At my OOW session about new features I mentioned that remote task flows are loaded in parallel, that is actually still not the case, while we started work on this capability - it didn't made it into 12.2.1. So remote task flows behave like other task flows and load in sequential way right now. 

Categories: Development

REST based CRUD with Oracle ADF Business Components

Mon, 2015-11-16 12:17

A key new feature in Oracle ADF 12.2.1 is the ability to expose ADF Business Components through REST/JSON interfaces.

REST/JSON is the preferred interface for many client side UI technologies to access remote backend services - as examples both Oracle JET and Oracle MAF leverage REST as the way to access data from remote servers. 

Oracle ADF makes it very simple to expose your existing business components as REST services - all through a declarative set of dialogs.

Once you published the service interface for a view object, you should be able to do the full set of CRUD operation on that object through different REST action:

GET - will do a Read

POST - will do a Create

PATCH - will do an Update

DELETE - will do a Delete

One thing that you'll want to verify is that when you are passing JSON data back into the REST interface you specify in the header that:

Content-Type is application/

otherwise you'll get an error along the lines of: The content type is not a ADFm REST entity. Content-Type: text/plain 

In the video below I show very quickly how to expose a REST interface and then how to invoke all the CRUD operations directly from the chrome app "Postman". 

These new feature can make your Oracle ADF business services part of any new application that prefers to use REST/JavaScript/HTML5 type of architecture.

Read more about exposing Oracle ADF BC as REST in the documentation

Categories: Development

Responsive UI in Oracle ADF 12.2.1 with the MatchMediaBehavior Tag

Tue, 2015-10-27 08:42

Another very powerful addition to the responsive capabilities of ADF Faces in version 12.2.1 is the new af:matchMediaBehavior tag. It allows you to control almost every bit of your UI and change properties in response to changes in the viewport size.

Check out what it can do in this video:

Note that in the mediaQuery you can use other type of CSS media queries

The code for the page in the demo is

       <af:panelSplitter id="ps1" orientation="horizontal" splitterPosition="201">
                <f:facet name="first">
                    <af:panelFormLayout id="pfl1" labelAlignment="start">
                        <af:matchMediaBehavior matchedPropertyValue="top" propertyName="labelAlignment"
                                               mediaQuery="screen and (max-width: 768px)"/>
                        <af:inputText label="Label 1" id="it1"/>
                        <af:inputText label="Label 2" id="it2"/>
                        <f:facet name="footer"/>
                <f:facet name="second">
                    <af:panelFormLayout id="pfl2" labelAlignment="start" rows="2">
                        <af:matchMediaBehavior matchedPropertyValue="top" propertyName="labelAlignment"
                                               mediaQuery="screen and (max-width: 900px)"/>
                        <af:matchMediaBehavior matchedPropertyValue="4" propertyName="rows"
                                               mediaQuery="screen and (max-width: 800px)"/>
                        <af:inputText label="Label 1" id="it3"/>
                        <af:inputText label="Label 2" id="it4"/>
                        <f:facet name="footer"/>
                        <af:inputListOfValues label="Label 1" popupTitle="Search and Result Dialog" id="ilov1"/>
                        <af:inputFile label="Label 1" id="if1"/>
                <af:matchMediaBehavior matchedPropertyValue="vertical" propertyName="orientation"
                                       mediaQuery="screen and (max-width: 768px)"/>
                <af:matchMediaBehavior matchedPropertyValue="100" propertyName="splitterPosition"
                                       mediaQuery="screen and (max-width: 768px)"/>
Categories: Development