Sunday, August 24, 2014

Seeded Customizations using MDS in Oracle ADF

In the last post Personalization using MDS in Oracle ADF we saw the power of MDS Framework in Oracle ADF using which Users can personalize pages, components etc according to their own need. MDS saves these changes in MDS Store based on every user and applies on the runtime to the base document.

In Personalization, user is at the driver seat , changing things according to the needs. But there are cases where the application is developed and after there is a requirement of two different flavours of the same application. For example, there is a ADF application and there are two clients. One client wants some fields to be visible and some specific color settings while other client wants other fields to be hidden and different color settings. We can also put in this way, that one client want some regions (task flows) to be displayed and other client says other regions to be displayed.

Now in these cases the , making changes to the existing application will be difficult. Most common solution will be we create two versions of application , each version having specific changes required by the client. Hmm that works good for two clients but what will happen if there are hundreds, thousands of clients. One has to create / maintain same number of versions of applications. More to it, what will happen if there will be a common functionality change which needs to go to all versions. Maintenance will become a nightmare.

So by using Seeded Customizations provided by MDS, changes for specific needs / clients can be done on base document. There will be a single Base Application and changes corresponding to all the clients/layers will be done and these changes will be applied on runtime depending upon which client is using it..

Use Case :
There is a requirement that there is a ADF application which has one ADF Form on the page. There are two clients "ABCCorp" and "XYZCorp" which will be going to use this application. ABCCorp does not want to show Salary attribute to its users and want Employee ID to be in color "AQUA":

XYZCorp wants to show salary component to users and wants Employee ID background to be in color "LIME"

Lets get started with this Use Case :
Created a simple ADF Applications in Jdev . Created ADF BC using HR schema with Employee EO and VO and AppModule.

In the VC Project, created a simple jspx page and used EmployeeVO to create a af Form.

Now we have a basic application with a form. We need to start customizing the application for both ABCCorp and XYZCCorp.

First step will be to enable Seeded Customizations in the projects.

This is done by ViewController -> Properties -> ADF View -> Enable seeded customizations.

Now the next and most important step is to create Customization Layer which will return the Name of the client, whether it is ABCCorp or XYZCorp.

So let us create a Customization class ClientCC which extends oracle.mds.cust.CustomizationClass provided by framework.

Now when you extends from CustomizationClass, one has to override these three methods. I will explain these methods and how to implement them in my next post. For now consider that getName method returns the name of CC layer and getValue method returns the current layer value. Here we are reading the value of client Name from Initialization Parameter in web.xml . If that parameter is set to ABCCorp, getValue method returns ABCCorp and so on.

Now we need to add this Customization Layer Class ClientCC to our application. But to make this class available, the project containing it needs to be deployed as ADF Shared jar and placed at <Jdev Home>/jdeveloper/jdev/lib/patches.

So after placing this jar to above path we are good. Now lets add this class to adf-config.xml.
adf-config.xml -> MDS Configuration

Now project is added with ClientCC Layer Class. Our setting in project is done.

Next step is to modify CustomizationLayerValues.xml . This file is available at <JdevHome>/jdeveloper/jdev
This XML file basically defines the design time values which can be returned from getValue method of CC class.

Add below XML to CustomizationLayerValues.xml

<cust-layers xmlns="">
    <cust-layer name="client" id-prefix="s">
        <cust-layer-value value="ABCCorp" display-name="ABCCorp" id-prefix="ABCCorp_"/>
<cust-layer-value value="XYZCorp" display-name="XYZCorp" id-prefix="XYZCorp_"/>

As one can see, there are two values defined ABCCorp and XYZCorp. This means when Jdev is open for customizations, these two values will be shown and one can select the values and make necessary changes for that value. Same these two values will be returned by getValue method of ClientCC class. Thus changes done to any value will be applied to the Layer returned by ClientCC get value method.

Next step is to open Jdeveloper in Customization Role. For doing this, go to Tools -> Preferences -> Roles -> and select option "Always prompt for role selection on startup".

After OK Restart the Jdev.

On Restarting, you will be prompted for the role. Select Customization Developer.

Jdeveloper will be opened in Customization Developer role and there will be a window , Customization Context in which by default one Value from CustomizationLayerValues.xml will be selected.

Now whatever changes one does, applies to this value returned by the layer. When ABCCorp is selected in Customization Context window -> Tip layer, whatever changes are applied on base application are for ABCCorp client.

Lets open our JSPX page which has Form.

Remember, there will be many things, component which will be read only. One cannot modify things which are core functionality of base document. Only things related to behaviour that can be customize will be editable. Also one can add new component for this particular value  

As per the requirement, on clicking on EmployeeId attribute of the form, we set the back ground color as aqua.

And made the Salary attribute of the form Render as false because ABCCorp does not want to show Salary Component.

We are done with change to ABCCorp. Save and close the jspx. Now select XYZCorp from Customization Context window and again open the JSPX.

For EmployeeID, XYZCorp needs background color as Lime, and Salary attribute should be visible.

Great we are all done. The only thing left is setting In Parameter. Lets first set it to ABCCorp. Restart jdeveloper in Default Role. Open Web.xml. Enter ClientName as "ABCCorp".

Now lets run the the JSPX page.

We can see that page comes up according to ABCCorp. Employee Id background is AQUA and Salary attribute is not visible.

Now lets change Parameter in Web.xml to XYZCorp.

Save and run the page again. 

Page Comes up according to XYZCorp. EmployeeId background is Lime and Salary attribute is Visible.

Also if we see the project structure , there is a folder MDSSYS created in View Controller project which has two folders ABCCorp and XYZCorp and they consist of CommonCorpPage.jspx.xml which is our JSPX. So these folders contains all the customized artifacts values in form of XML and are applied on runtime to the base document.

Thats it. By using powerful features of MDS provided by ADF, Customizations of the applications can be done according to specific requirements.

Thanks !!


  1. It would be great if you post the sample application.

  2. Hi Sfti,

    Updated the post with link to sample application. You can download the same.


  3. Thanks Rohan. I get MDS-00035: cannot load the class: view.ClientCC. error when I re-open jdev with Customization Developer role. Also, both the options are disabled in the Customization Context window.

  4. Hi Sfti, As described in the post, you need to create a jar file of ViewController project and place it in /jdeveloper/jdev/lib/patches. And you in customization role, add values to Customizationlayervalues.xml as described in post.


  5. Hi Rohan, thanks for your post, it is very useful and clear.

    I have a question about the deploy of this customizations. I have understood that this customizations are packaged in a .MAR file within the EAR. Is it possible deploy new customizations in production environment dynamically without redeploy all the app? Have you ever tried this?


  6. Thanks bro for sharing I was looking for the same
    snapchat for pc free

  7. Thanks for the such a Nice and useful post. The way you are putting things are very simple and creating interest to us.

  8. Thanks dtmrp !! Glad you liked it .

  9. A great information regarding Oracle ADF, it is interesting and people should understand easily who are looking to take certification course in Oracle ADF,Job Assistance and find out some more information in the site,Oracle ADF Online Training with free Demo class in USA | UK | INDIA | SINGAPORE | Australia | Canada.

  10. Somebody necessarily help to make severely posts I might state. This is the first time I frequented your website page and to this point? I surprised with the research you made to create this particular post extraordinary. Well done admin..

    Oracle Training in Chennai

  11. If you want your ex-girlfriend or ex-boyfriend to come crawling back to you on their knees (no matter why you broke up) you have to watch this video
    right away...

    (VIDEO) Get your ex back with TEXT messages?

  12. can any tell me how to apply seeded customization's to the existing EAR file in weblogic server

  13. CIITN is located in Prime location in Noida having best connectivity via all modes of public transport. CIITN offer both weekend and weekdays courses to facilitate Hadoop aspirants. Among all Hadoop Training Institute in Noida , CIITN's Big Data and Hadoop Certification course is designed to prepare you to match all required knowledge for real time job assignment in the Big Data world with top level companies. CIITN puts more focus in project based training and facilitated with Hadoop 2.7 with Cloud Lab—a cloud-based Hadoop environment lab setup for hands-on experience.

    CIITNOIDA is the good choice for Big Data Hadoop Training in NOIDA in the final year. I have also completed my summer training from here. It provides high quality Hadoop training with Live projects. The best thing about CIITNOIDA is its experienced trainers and updated course content. They even provide you placement guidance and have their own development cell. You can attend their free demo class and then decide.

    Hadoop Training in Noida
    Big Data Hadoop Training in Noida

  14. Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.

    rpa training in marathahalli

    rpa training in btm

    rpa training in kalyan nagar

    rpa training in electronic city

    rpa training in chennai

    rpa training in pune

    rpa online training

  15. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging.
    Python training in usa
    Python training in marathahalli
    Python training in pune

  16. Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    Devops Training in pune
    Devops Training in Chennai

    Devops training in sholinganallur
    Devops training in velachery
    Devops training in annanagar
    Devops training in tambaram

  17. Awesome! Education is the extreme motivation that open the new doors of data and material. So we always need to study around the things and the new part of educations with that we are not mindful.

    angularjs Training in chennai
    angularjs Training in chennai

    angularjs-Training in tambaram

    angularjs-Training in sholinganallur

    angularjs-Training in velachery


  18. I’m planning to start my blog soon, but I’m a little lost on everything. Would you suggest starting with a free platform like Word Press or go for a paid option? There are so many choices out there that I’m completely confused. Any suggestions? Thanks a lot.
    Best AWS Training in Marathahalli | AWS Training in Marathahalli
    Amazon Web Services Training in Anna Nagar, Chennai |Best AWS Training in Anna Nagar, Chennai

  19. Great Article… I love to read your articles because your writing style is too good,
    its is very very helpful for all of us and I never get bored while reading your article because,
    they are becomes a more and more interesting from the starting lines until the end.
    data science online training
    python online training
    uipath online training
    data science with python online training
    rpa online training

  20. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you article.
    angularjs online training

    apache spark online training

    informatica mdm online training

    devops online training

    aws online training

  21. You’ve written a really great article here. Your writing style makes this material easy to understand.. I agree with some of the many points you have made. Thank you for this is real thought-provoking content

    Microsoft Azure online training
    Selenium online training
    Java online training
    Java Script online training
    Share Point online training

  22. And indeed, I’m just always astounded concerning the remarkable things served by you. Some four facts on this page are undeniably the most effective I’ve had.
    Data science Course Training in Chennai | No.1 Data Science Training in Chennai
    RPA Course Training in Chennai | No.1 RPA Training in Chennai

  23. Thanks for sharing very helpful information. I found another OCA Training in Greater Noida, site , they provide very helpful services.

  24. Thanks for sharing this great article. It made me understand few things about this concept which I never knew before. Keep posting such great articles so that I gain from it. Java Training in Chennai | J2EE Training in Chennai | Advanced Java Training in Chennai | Core Java Training in Chennai | Java Training institute in Chennai

  25. It’s always so sweet and also full of a lot of fun for me personally and my office colleagues to search your blog a minimum of thrice in a week to see the new guidance you have got.

    Best PHP Training Institute in Chennai|PHP Course in chennai
    Best .Net Training Institute in Chennai
    Oracle DBA Training in Chennai
    RPA Training in Chennai
    UIpath Training in Chennai