48

Oracle ADF + Jasper Visualize.js = Awesome

 5 years ago
source link: https://www.tuicool.com/articles/hit/RFb2Qnr
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

This week I was working on a task to integrate Jasper Visualize.js into Oracle ADF application JSF page fragment. I must say integration was successful and Jasper report renders very well in Oracle ADF screen with the help of Visualize.js. Great thing about Visualize.js - it renders report in ADF page through client side HTML/JS, there is no iFrame. Report HTML structure is included into HTML generated by ADF, this allows to use CSS to control report size and make it responsive.

To prove integration, I was using ADF application with multiple regions - ADF Multi Task Flow Binding and Tab Order . Each region is loaded with ADF Faces tab:

mMVRjyz.png!web

One of the tabs display region with Jasper report, rendered with Visualize.js:

nmYvue2.png!web

Check client side generated code. You should see HTML from Visualize.js inside ADF generated HTML structure:

nIJNB37.png!web

It is straightforward to render Jasper report with Visualize.js in Oracle ADF. Add JS resource reference to Visualize.js library, define DIV where report supposed to be rendered. Add Visualize.js function to render report from certain path, etc.:

QVrAFzq.png!web

Sample code is available on my GitHub

repo.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK