I blogged before about the support for tablet and touch device rendering with ADF Faces. Release 12c brings together features that were introduced in previous patches (such as 11.1.1.7) into a single line of code and even adds more features in this area.
To show you what ADF Faces does automatically for you, I re-recorded the interaction with the houses demo that I showed here, but this time on an iPad.
Things to note:
- Switching from stretch to flow layout (eliminates scroll bars and allow swipe scroll)
- Table pagination instead of scroll bars
- HTML5 rendering for data visualization components instead of Flash
- Drag and drop and tap and hold support on device
- Swipe support on objects such as cards in a hierarchy viewer
- Maximize area support
- New tablet style UI components (Springboard and list view for example)
It's a single application that runs on both the regular and mobile browser.
The only thing I needed to do is use an EL for two properties (maximize and dimensionsFrom) on the top containers in the page that will switch the whole page to do flow layout on touch devices. You would usually use this in your page template for the application.
The code I use is:
<af:document title="index.jsf" id="d1"
maximize="#{adfFacesContext.agent.capabilities['touchScreen'] eq 'none' ? true : false}">
<af:form id="f1">
<af:panelStretchLayout id="psl1"
dimensionsFrom="#{adfFacesContext.agent.capabilities['touchScreen'] eq 'none' ?'parent' : 'children' }">
Here's the video: