Dynamic columns has been a PrimeFaces feature for some time via p:columns component. One popular enhancement request with 70+ community votes is adding sort-filter support so we’ve been planning to implement it in a future version like 3.3 or 3.4. However when we needed the same thing in an application we develop for a client, it was time to speed things up. This is yet another advantage of a web framework being used by its creators.
For the demo we’ve implemented something similar in google code issue tracker where you can define the columns in issue tracker via a template entered in an input field. Check out PrimeFaces Labs as usual to see dynamic columns in action!