Intercepting user customization – such as column reordering in tables – in ADF 11g change persistence

Lucas Jellema

The requirement I was facing was simple: act on column reordering through user drag and drop in a rich table. More specifically: invoke a method in a managed bean whenever the user changes the position (or side or visibility) of a column.

At first it seemed trivial – just use an AttributeChangeListener. When that turned out not to work – this listener does not get triggered for column reordering – the challenge turned almost unsurmountable. Finally I ran into the ADF Change Persistence framework and more specifically into the concept of a ChangeManager. See for some background this article that I wrote a long time ago: Some background can also be found here: (Fusion Middleware Fusion Developer’s Guide for Oracle Application Development Framework 11g – 35 Allowing User Customizations at Runtime).

In short: enable user customizations and configure a custom class that extends from ChangeManager to intercept the customizations.

when User Customizations are enabled –


the web.xml file is extended with a context parameter org.apache.myfaces.trinidad.CHANGE_PERSISTENCE. This parameter has session (or mds) as default value. However, it can be overwriten with the name of a custom class that extends from org.apache.myfaces.trinidad.change.ChangeManager. This class is invoked every time a user customization is processed. I have implemented by own class


that extends from SessionChangeManager. This class overrides the method addComponentChange. This method is invoked for many user induced customizations, including column repositioning.


In this particular case, I have abused the headerClass attribute to make a string value (activiteit) available (note: I had a problem with using clientAttributes on the columns, perhaps because the columns are rendered dynamically inside a forEach and also contain two nested columns).

When I change the order of the columns


the resulting logging is:


Next Post

Create a JasperReport from Oracle BPEL

In my previous post I described how to create a Report (CDBooklet) with JasperReport in Java. Follow this link to take a look at the post ‘Using Java to create a report with the JasperReport java API’ For this new post I created a webservice wrapper around this reporting functionality […]
%d bloggers like this: