Column Sorting in ADF TreeTable by Soham Dasgupta

Posted: April 22, 2018 in JDeveloper & ADF
Tags: , , , , , , ,

image

Sorting of columns are not supported in ADF TreeTable by default.

The documentation of 12c says :

Unlike the Table, the TreeTable does not support automatic sorting. The underlying TreeModel must support sorting by implementing it’s sorting logic in the setSortCriteria(List criteria) method of the TreeModel.

But my client wanted sorting on the tree table on few columns. It was a good challenge and this is how I solved it.

Steps :

1. The treeModel is based on a managed bean. You cannot have the tree based on ADF-BC bindings. Simply because you need to override setSortCriteria().

2. Added a few Comparators required for sorting of the columns. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Technorati Tags: PaaS,Cloud,Middleware Update,WebLogic, WebLogic Community,Oracle,OPN,Jürgen Kress

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.