Skip navigation.

Andrejus Baranovski

Syndicate content
Blog about Oracle technology
Updated: 4 hours 52 min ago

ADF BC Range Paging and REST Pagination

Thu, 2015-02-19 13:14
In this post I would like to explore and integrate two thing - ADF BC Range Paging and REST service pagination. It would inefficient to retrieve entire set of data in the REST service, ideally should be available option to specify number of rows and range number to fetch. ADF BC allows to query VO in Range Paging mode - SQL query will be constructed with row numbers, to query data in certain range of rows (this allows to fetch less data from DB). We could combine this with REST service and provide light interface to access data.

Here you can download sample application - RestADFBCApp.zip (compiled with ADF 12c). I'm translating ADF BC VO structure into HashMap, this allows to publish unified structure through REST, without creating a separate POJO object. There is a special generic method called toHashMap, it iterates over VO attributes and constructs a HashMap with attribute names and values:


Generic AM method accepts parameters for page number and range size. Here we enforce Range Paging mode for VO and using ADF BC API methods to scroll to the certain page and set the range size (number of rows to fetch). It is important to get results from default rowset, otherwise ADF BC will generate a separate default SQL query:


ViewController project contains a list of references to the REST and Jersey related libraries, these extra libraries are required to transform HashMap to the REST response:


Here is the REST method. I'm accessing ADF BC Application Module and invoking custom method, with range size and page number coming from the REST request. Result is a list of HashMaps - a set of VO rows:


Make sure there is Jersey servlet defined in web.xml, REST request will not work without it:


Here is the example, where I perform a request through REST for rangePage = 1 and rangeSize = 10. This means 10 rows from the first page of rows are fetched:


You should check SQL query in the log. REST request from above generates a special SQL with ROWNUM. This means we are retrieving less data from DB, only data we need to display in the current page:


MAF 2.1 Alta Mobile UI and Oracle Mobile Suite

Mon, 2015-02-09 12:19
This post is about Alta Mobile UI and MAF 2.1. I was using Oracle Work Better mobile application as a reference, along with Alta Mobile UI Design Guidelines. This is based on my previous posts about Oracle Mobile Suite and MAF 2.1 integration, read more here - Oracle Mobile Suite - Web Service Performance Optimisation with Result Caching. You could also use Alta UI 12c with regular ADF Web applications, check more here - Custom ADF Application with New ADF 12c Alta UI.

Sample application - MobileServiceBusApp_v5.zip (contains ADF BC SOAP Web Service, Oracle Mobile Suite SOAP to REST transformation and MAF 2.1 application with Alta Mobile UI) implements a dashboard. Component to visualise amounts and values comes out of the box with MAF (iPad view):


User could open a springboard and select Employees option in the sample application:


Here we can search for employees by first name/last name and bring results as a list:


Optionally user could switch to cards view, to display the same results in different way:


You could click on employee icon - this will load details screen and bring additional info:


Steven King is a manager, he manages Executive department and there are two team members reporting to him. Compensation graph can be displayed for team members:


A list of team members is displayed in the third tab:


There is MAF 2.1 Deck component in Employees search page, it allows to switch between a list and cards view:


Employee details page is rendered with a help of MAF 2.1 Deck component as well, along with Select Button component to display tab UI and navigate between Detail, Compensation and Team sections:


You could check how these pages are implemented in the sample app provided above.