My today post is next in ADF integration series - Integration. Sample application, I'm going to describe, is based on Dynamic Dashboard Demo code from Oracle ADF Faces Components demo (see Visual Designs).
In one of my projects, I got a design requirement to develop entire application with regions, practically using only one JSPX page. Different regions were implemented in separate applications and integrated into main application using ADF JAR libraries. Logically thinking, I should not develop any Dynamic Dashboard UI Shell, and just use ADF Dynamic Regions functionality. Unfortunately, in current JDev 11g PS1 release, we have problems with Dynamic Regions rendering and usage - see SR 3-1354209241 Oracle Metalink request logged by fellow developer. I decided to implement UI Shell that renders static ADF Regions, but in dynamic way.
Download sample application - ADFIntegrationDashboard.zip, this sample contains main application called DynamicDashboard, where ADF Regions from separate applications are integrated. I developed four separate applications with JSF Fragments and packaged them into ADF JAR libraries:
Those libraries are imported into DynamicDashboard application:
You can see that Model project in DynamicDashboard is empty, thats correct - because I'm using it only to integrate content from another applications. ViewController contains one JSPX page, where Dynamic Dashboard is implemented, and Toolbar declarative component with toolbar elements. You will find DemoDashboardBean there as well, its where all drag and drop logic is implemented. Same bean controls minimize, maximize and restore operations applied for Dynamic Dashboard elements.
I'm not going to describe all technical specifics for Dynamic Dashboard, its code is quite straightforward. I took Oracle example from Oracle ADF Faces Components demo and removed things I didn't wanted to have, now it is more lightweight and optimized for ADF Regions integration. I rather will focus on functionality.
Here you can see main Dynamic Dashboard screen - four integrated ADF Regions, placeholder to keep minimized regions on the left and New Job, Job Distribution, Assigned Jobs, Show All and Shown None links on the top. These links allow to show predefined sets of regions.
If user wants to hide any available region, he can just take it and drop on the left. Locations and Employees regions are minimized now, only Departments and Jobs are available:
User can maximize displayed region and then restore to original view:
Depending on a use case, Dynamic Dashboard potentially can replace UI design with different tabs.