Friday, July 8, 2016

MDS : Save Result Layout issue in adf

Probably everyone is aware of MDS(Meta data service) feature provide by ADF which is kind of a black box to developers. Most of the things are out of box and configuration driven , hardly developers need to code to get along with personalization . While the MDS feature works fine in most of the cases but there is a glitch which i encountered recently. 

This post only focuses on the issue with "Save Result Layout" feature provided in ADF query component when MDS is enabled and does not cover MDS and Security configurations which are essentials for runtime personalizationof ADF pages


ADF query component with MDS works great for saving the search results with search criteria, but it fails to persist the results layout.

Steps to reproduce:
1) Enter a search criteria and click on search
2) Hide a column(sps Dept Name) or Move a column on the results table from one position to another
3) Select the Save Results Layout checkbox while saving the search results with a name sps. "Dept Search : DeptName hidden".

4) Switch back to any other saved searches and you will see the changes which you made in step 2 is applied to all saved searches.

The above statement(Save Results Layout) is little confusing as the layout save happens on all the saved searches and not specific to any saved searches selected by user.

With much of a trying i could not hack any configurations or code anything to make it work but after spending much of time, played around with "UI Shell template" and to my surprise it worked.

So, finally i modified the UI Shell Template with just a center facet and used it as a jar in my consuming application. My consuming application has a page which inherits this template and in the page we can drag our taskflows or any query component directly to test MDS personalization of saved searches with layout.

Also make sure persistent change manager in adf-config file is changed to MDSDocumentChangeManager as below :
<persistent-change-manager-class>oracle.adf.view.rich.change.MDSDocumentChangeManager</persistent-change-manager-class>