Thursday, September 1, 2011

Making It Work Together - MDS User and Seeded Customizations

MDS is one of the most powerful and important elements of ADF/WebCenter framework. Users can perform ADF UI personalizations on runtime through MDS, as well as developers can implement seeded MDS customizations on design time and modify ADF components for different targets. However, if you would try to enable and run both options together - MDS User and Seeded Customizations, it will not work out of the box. My today post is about how to make it work together. Before reading this post, I would highly recommend to read previous posts:


Sample application (EnterprisePortalApp_v7.zip) is enabled with both - MDS User and Seeded Customizations:


MDS Seeded Customizations are functional on SiteCC level, because seeded customizations should be applied on application scope. This means MDS should be configured with SiteCC class:


All good at this point, let's login into portal application as user redsam:


MDS Seeded Customization works, we see our changes applied:


Let's apply user personalization now, hide few table columns - ManagedId, LocationId, for redsam user:


Login with different user, for example scott:


We faced an issue now - MDS personalizations from user redsam are visible for user scott:


This happens because MDS is configured with SiteCC class (for MDS Seeded customizations to work), so all personalizations are getting stored in application scope and are visible to every user. We can fix this by enabling our custom MDS session options factory class and programmatically merging custom UserCC and SiteCC layers (described in this blog - Applying Personalization and Customization in Oracle ADF 11g and Oracle WebCenter 11g). Predefined VIEW_LAYER will combine both SiteCC and UserCC inside custom Session Options Factory class and allow to operate both MDS Seeded Customizations and User Personalizations without conflict:


Custom Session Options Factory class must be registered inside adf-config.xml, page-editor-config tag:


In order for this Custom Session Options Factory to be enabled, we need to define WebCenter Composer filter inside web.xml:


Don't forget to define filter mapping for WebCenter Composer filter in web.xml:


Let's perform user personalization again, after applying all the changes mentioned above - reorder DepartmentName column by user redsam:


Login as another user scott, MDS Seeded Customizations are working well:


MDS User Personalization works now as well, personalizations from user redsam are not visible anymore for user scott:


MDS behaves correctly now, personalizations are stored under personal MDS folder:


Okej, so it all works now. However, there is one more trick you should keep in mind, when you would apply MDS Seeded Customization next time. Custom SiteCC layer is defined with webcenter value:


Before switching to Customization Developer mode and starting working with MDS Seeded Customization, make sure you switch temporary from SiteCC to UserCC customization class in adf-config.xml. This is needed, because we want to apply application scope customizations. Switch it back to UserCC, once seeded customization development is done:


In Customization Developer mode:


Make sure customization mode is set to webcenter:


This will store MDS Seeded Customizations under webcenter path:


Same webcenter name is defined for custom SiteCC layer:


Once back to normal mode, don't forget to switch back to UserCC - this will ensure proper user personalization functionality:


2 comments:

Anonymous said...

Hi andrejus!!
Thanks to your posts I´m learning a lot.

I have two questions about WebCenter customization, perhaps somebody could help us:
1) Tag cloud: The existing component is too complex for our goal, we only need to show the most used tags (not showing the toolbar and other functionality), do you know if it is possible?
2) SEO: We are having strong problems with meta-tags personalizations; the user need to specify the title, description, url of each page.

Again, thanks in advance for your help!

Andrej Baranovskij said...

Hi,

If you are attending OOW this year, I will be presenting our product called Social Enterprise Suite. We are extending WebCenter product with more business tailored functionality. Your requirements sound like very closely related.

Andrejus