Rich Data Table has columns sorting feature built-in. Simplest way to add sorting capability is to define sortBy attribute at column you need to be sortable.

In this attribute you should define iterable object property which should be used when sorting performed.

In this example you could see that two first columns sorted after corresponding header click.

Sorting DataTable example
Details of usage

Next attributes could be defined to manage simple built-in sorting:

- sortMode - attribute of rich:dataTable which could be defined as "single"(Default) and "multiple". If multiple sorting defined - previous sorting will not be reseted. Column will be sorted
- sortOrder - attribute of rich:column allows to set initial sorting on the column. (Additional ways of usage to customize sorting described at "External Sorting" tab). Possible values are "ASCENDING", "DESCENDING" and "UNSORTED"(default)
- selfSorted attribute of brich:column which defines if the table will make header clickable and if click on the header will call sorting request. Default value is "true". In order to use custom sorting mechanism use value "false" for this attribute.