That sample shows the rich:extenedDataTable sorting example. Actually if you will just look into the code you will see that it's completely similar to rich:dataTable one because both tables follows completely the same rules for sorting definition.

Besides that demo shows addition of sorting icons (manual for now) and switching between multiple and single sorting.

Multiple selection in that sample follows very simple rules. Next column added to sorting just clarifies sorting criteria. If you need some other column to become main sorting property - reset sorting from the beginning.