Shay Shmeltzer's Oracle Development Tools Tips

Navigating between pages in ADF Mobile with Swipe gestures

Shay Shmeltzer
Director of Product Management - Oracle

Mobile users are getting used to specific touch gestures, such as swipe, in their applications. And sometimes you might want to incorporate those gestures as a means for navigating between pages in your ADF Mobile application.

You can do this by using the amx:actionListener component and having it bind to a method in your backing bean.

The basic ingredients:

In an AMX page add an actionListner to a component for example:

         <amx:listItem id="li1">
            <amx:outputText value="#{row.name}" id="ot3"/>
            <amx:actionListener id="al1" type="swipeLeft" binding="#{viewScope.ma.navigateMethod}"/>

The binding edit function in the property inspector can help you create the above managed bean (ma).

In the managed bean you can code this:

    public void navigateMethod(ActionEvent actionEvent) {
        AdfmfContainerUtilities.invokeContainerJavaScriptFunction(AdfmfJavaUtilities.getFeatureName(), "adf.mf.api.amx.doNavigation", new Object[] { "go" });

In your taskflow for the feature have a navigation rule like this:

      <control-flow-case id="__3">

Now with a swipe to the right on the list item you'll navigate to the camera page.

Join the discussion

Comments ( 3 )
  • guest Monday, March 3, 2014


    I m new in ADF Mobile & didn't got your point,

    can you send me full step by step code of above example.

    and can I use Jdeveloper on Windows 8.

  • guest Wednesday, April 9, 2014

    Hi Shay - thanks very much for this. Do you have any thoughts on a clean way to make a full page swipeable? I've got a scenario where I want to show different charts for a given data set, and I'd like navigation to be with left and right swipes, as if navigating a carousel (but essentially different representations of one record). Since the actionListener can only be a child of an artifact with its own listener, my current approach is to put my header for each page in to a dummy ListView with one static ListItem containing the outputText and the actionListeners. But I'd really like to let the whole panePage - or at least the chart area - be swipeable. Is there any sort of larger container with a listener I can use to achieve this? I've been looking through the tag library of items I don't use that often and haven't found the solution yet.

  • guest Thursday, June 19, 2014

    How to close Popup Behavior within the time interval in ADF Mobile?

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.