Wednesday Oct 14, 2015

Stretching AMX components with amx-fitParent and amx-filmStrip-stretchItems styles

Stretching AMX components with amx-fitParent style

If you want any AMX component (that is stretchable, i.e. one that responds to width and height dimensions like a listView or deck) to stretch and take up the size of it's parent component (assuming the parent component is allocating space for children vs. one that is as tall or wide as its children), you can use the amx-fitParent style on that component.

Example 1:

In the example shown below, an amx:deck component is placed within the center facet of a panelStretchLayout. On setting the styleClass attribute to amx-fitParent , the deck component takes up the available width , available height, and stretches to fill up the center facet. You can find this example implementation in the LayoutDemo public sample. Look at tabsTopWithFilmStrip.amx page within the LayoutDemo sample for more details.

<amx:deck displayedChild="item1" styleClass="amx-fitParent" id="d1"/>

Example 2:

In the example shown below, an amx:commandLink component is placed within an amx:filmStripItem component. On setting the styleClass attribute to amx-fitParent, the commandLink component takes up the size of it's parent filmStripItem component.  You can find this implementation in the WorkBetter sample application. Look at login.amx page for more details.

<amx:filmStripItem id="fsi3">
<amx:commandLink id="cl3" styleClass="amx-fitParent" shortDesc="Login Karen Link">

Stretching AMX components with amx-filmStrip-stretchItems style 

If you want the filmStripItem component to stretch and take up the size of the filmStrip component, you can set the attribute itemSizing="stretched" on the filmStrip component. Alternatively you can also set the styleClass attribute on the filmStrip component to amx-filmStrip-stretchItems. The former option (setting itemSizing attribute to 'stretched') is the recommended approach.

Example :

In the example shown below, the section highlighted in the red represents a filmStripItem component which is taking up the entire available width and available height of the it's parent (filmStrip) component. You can find this implementation in the LayoutDemo sample application. Look at filmStripWithFlex.amx page for more details.

<amx:filmStrip id="fs1" styleClass="amx-fitParent" itemSizing="stretched">
<amx:filmStripItem id="fsi1">

Oracle MAF 2.2 New Features

V2.2 is the new release of Oracle Mobile Application Framework (Oracle MAF). This blog provides an overview of several new features added in this release.

 1. UI Components

This release introduces several new components and enhancements to help developers support latest mobile patterns

Swipe To Reveal :

Allows user to swipe on a row in a list to reveal contextual actions. This functionality can be added to an AMX page using <amx:accessoryLayout/> component.

Example usage:

Swipe To Reveal Sample

Pull To Refresh :

Allows developers to swipe down and refresh the contents of a page. This capability can be added to a page using <amx:refreshContainer/> component.  

Example usage:

Pull to refresh

New Layout Components 

Allow developers to easily build flexible Dashboard and Grid layouts.  

MasonaryLayout :  Typically used for building Dashboard style pages involving tiles laid out in the form of a grid. The size of each tile can be adjusted using css. It provides the following key capabilities

  1. Adjusts layout based on the available width
  2. Allows drag and drop of tiles in the layout 

Example usage:

Pull to refresh

FlexLayout: A layout component that displays its children in a group. It supports horizontal and vertical orientations, with automatic changes based on the device orientation. By default, the layout creates even space for each child, and stretches these children within its boundaries.

Example usage: 

Data Visualization Enhancements :

  • Stock Charts : Stock charts are useful for displaying stock data across time. A unique feature of stock charts is the ability to render series data as 'candlesticks' representing open, close, high, and low stock price data.
  • Chart Drill Events : Allows users to tap on series or group or data items to raise drill events to drill in to the chart data
  • Support for overview and vertical orientation for Timeline component

Alta Mobile V1.4 :  

New skin with support for Google Material design for Android L

2. Data binding Enhancements

Support For Nested DataControl Context:

  • Allows developers to build recursive navigation flows using Task Flows
  • Isolate state at the Taskflow level
  • Manage the number of Taskflow/DC instances maintained in the stack 
  • Example: Opportunity List -> Opportunity Detail -> Account Detail (from the account associated with the Opportunity) -> Related Opportunity List -> Opportunity Detail (with a different Opportunity than previous)

3. Navigation Enhancements

  •  Full support for Android back button
    • Support for overriding the default behaviour using <amx:systemActionBehavior> tag or JS API
    • “__back” navigation rule is used by default
  • Support for limiting pageFlowScope variables to TaskFlow boundaries

4. Performance Improvements

  •  30% overall performance improvement compared to previous release
  • Major Performance improvements in the following areas
    • JSON Parsing : New parser based on JSONP
    • New Optimized JVM : 30-40% performance improvement in Java processing
    • UI performance improvements to improve the page rendering time 


Oracle MAF 2.2 has many exciting features and we encourage everyone to upgrade and give it a try. Several of the features listed above are used in the sample applications shipped with the release. Please refer to the samples for sample code. Component Gallery, Layout Demo and WorkBetter sample Apps cover most of the features listed above.

Friday Oct 02, 2015

Oracle Mobile Developer Certification Exam Now Available

We are happy to announce the availability of the Oracle Mobile Development Essential Certification Exam.

Get an official Oracle Certification acknowledging your Oracle MAF and mobile development capabilities.

The Oracle Mobile Development 2015 Implementation Specialist certification is designed for individuals who possess a strong foundation and expertise in implementing Oracle Mobile Development. This certification covers topics such as: Mobile Application Framework (MAF), Mobile Application Framework (MAF) Data Layer, User Interface (UI) Development, Device Services Integration, and App Security. This certification differentiates candidates in the marketplace by providing a competitive edge through proven expertise. Up-to-date training and field experience are recommended.

Get the full details about this new certification here

Note, for Oracle Partners, this exam is part of the larger Oracle Enterprise Mobility Specialization Criteria, details for that one are here.

Tuesday Sep 29, 2015

MAF and OS X El Capitan and Xcode 6

UPDATE - It's official.  The Apple Developer page Submit your apps to the App Store states "OS X El Capitan requires Xcode 7. If your app still depends on Xcode 6, you'll need to keep a partition or external hard drive with OS X Yosemite installed in order to submit from Xcode 6."  That sounds like too much effort to me, so I recommend you simply stay put on OS X Yosemite for now while the current version of MAF requires Xcode 6.

Apple today announced that OS X El Capitan will be available on Wednesday, September 30 as a free update for Mac users.

There have been reports of incompatibility between beta releases of OS X El Capitan and Xcode, with Apple suggesting a workaround on the Apple Developer Forums here. Whilst that post makes it clear that Xcode 7 will be fully supported on OS X El Capitan, it remains unclear whether Xcode 6 will be fully supported.

MAF 2.1.3 requires Xcode 6. 

As soon as OS X El Capitan is released, the MAF development team will commence certification of MAF 2.1.3 using Xcode 6 on OS X El Capitan.  Until this certification has been completed, you may wish to remain on your current OS X release.

Monday Aug 24, 2015

New Features : Oracle Mobile Security Suite Integration in Oracle MAF 2.1.3


MAF 2.1.3 provides a tighter integration with Oracle Mobile Security Suite (OMSS) integration offers capabilities like, Android Containerization, Data Leak Protection, Data Encryption, Application Tunneling, Container Authentication and Single Sign-On. Features like Containerization, Data Leak Protection and Data Encryption are already supported on iOS from previous MAF releases.

New Features

1. Support for Android Containerization

Mobile app containerization allows customers to add a standardized security layer to native mobile apps. 

The containerization process is simple, and developers do not need to change a line of code. MAF developers just need to deploy the application to OMSS, in JDeveloper or Eclipse. During the deployment, the app is first compiled and an unsigned version of the app is generated that is intended to be signed with an enterprise distribution certificate for distribution within the company. After deployment, a wrapped APK file is generated which is signed with the signing certificates which are configured in the MAF JDeveloper / Eclipse Preferences, in the Android platform section.

Enable OMSS deployment in JDeveloper 

Enable OMSS deployment in Eclipse 

2. Data Leak Protection on Android

Once a MAF app is containerized with OMSS, IT administrators can apply various data leak protection policies and restrict how and if users can share data within the app

  • Email allowed can restrict the ability to send email from an app.

  • Instant Message allowed can restrict the ability to send Instant Message from an app.

  • Video chat allowed restricts the ability to share information via services such as FaceTime.

  • Social Share allowed restricts the ability to share information via services such as Facebook or Twitter.

  • Print allowed restricts the ability of the user to print.

  • Restrict file sharing restricts the ability of the user to share files outside the secure enterprise workspace.

  • Restrict copy/paste allows copy/paste inside the secure container, containerized apps or between containerized apps, but not to apps outside the secure enterprise workspace.

  • Redirects to container allowed prevents any app outside the Mobile Security Container workspace from redirecting a URL into the container.

  • Save to media gallery allowed prevents images, videos and audio files from being saved to media gallery and photo stores.

  • Save to local contacts allowed prevents contacts inside secure enterprise workspace apps from being saved down to native device contacts app.

  • Redirects from container allowed prevents any vApp from the Mobile Security Container workspace or containerized app from redirecting a URL outside the Mobile Security Container workspace or containerized app.

3. Data Encryption on Android

OMSS Containerization provides the ability to encrypt the data stored offline within MAF android applications. Starting with 2.1.3 this functionality is available for MAF applications as well. Encrypted data storage includes application data, including files, databases, application cache, and user preferences. Developers can use MAF encryption with OMSS containerization without having to worry about double encryption. Within a containerized application, MAF frameworks delegates encryption to the container this ensures that there are no code changes needed based on whether an app is Containerized or not. 

4. Application Tunneling

MAF 2.1.3 release provides support for application tunneling through Oracle Mobile Security Suite on both Android & iOS. Application tunneling provides a secure way to access the corporate resources behind the firewall, within a mobile client, without the need of device level VPN. Tunneling functionality allows administrators to intercept, and manage, all the requests coming from a specific MAF application. Administrators can configure the requests coming from a specific URL to go through a proxy on MSAS server. They can also either completely block the requests, or redirect the requests directly to the internet.You can find more details on how to configure application tunneling in the Web Settings section of Administrative Console Guide for Oracle Mobile Security Suite.

5. Container Authentication & Single Sign-On

When Web SSO authentication type is used in MAF apps with Oracle Access Manager and Oracle WebGate used in the back-end for authentication, the end user is not challenged for credentials in the application after Container authentication. The user identity from the Container is propagated to the App and the back-end services. SSO across multiple apps in the Container is also supported, i.e. user can login once to the Container and access all the apps in the Container with out additional authentication challenges. 


Here is a quick demo which shows all three features (Android Containerization, Data Leak Protection, and File Encryption) 

Using Oracle MAF Authentication To Access Secure Services From Oracle MCS

Oracle MAF 2.1.3 release makes it easy to authenticate against Oracle Mobile Cloud Service (MCS) and access secure data from services hosted on MCS.  Below are the steps to configure MAF application to authenticate against MCS:

1. Create Login Connection : In maf-application.xml go to security tab and create a login server connection. Select authentication type as "HTTP Basic" as shown below 

create login connection

create login connection

The login server URI is of the form https://<host>:<port>/mobile/platform/users/login . You can obtain the host & port from a Mobile Backend(MBE) settings page in you MCS instance. The above URI can be used for any MBE in the MCS instance.

2.  Configure Custom Header : During authentication MCS requires a custom header with the MBE id to be injected with the request. Configure the header in the Custom Headers tab  as follows:

configure custom header

You can get the MBE Id from the MBE settings page in MCS. The header name should be "Oracle-Mobile-Backend-Id"

3. Configure Security Policy : Now that we have the login connection created, the next step is to create a connection to API end point on MCS.  In the Web Service Security Policies section :

  1. Create a REST/HTTP Connection to an API end point in connections.xml, in the example below it's named "fiftechnician".  
  2. Associate the "fiftechnician" connection with the login connection created in steps 1 & 2. This allows the framework to inject the user identity obtained during authentication for any service calls to the connection.    
  3. In the "Policy" column, double click on the pencil icon to launch a dialog to select the security policy to be used for the connection. Select "oracle/wss_http_token_client_policy". This policy can be used for Basic-Auth protected connections with either HTTP and HTTPS. 
configure security policy

select the correct policy :

configure security policy

The above steps would allow mobile app developers using MAF to securely access data from API hosted on MCS through simple configuration without writing any code and be assured that you are following security best practices.


This blog is is dedicated to announcements,tips and tricks and other items related to developing, integrating, securing, and managing mobile applications using Oracle's Mobile Platform. It is created and maintained by the Oracle Mobile product development team.

Archive of past entries

Even More Mobile Development Blogs

Oracle A-Team Site - Mobile Related Entries

Code samples from the Community

Fusion Middleware Blogs


« November 2015