int numSort = UIUtil.getIntParameter(request, "iSortingCols");
if (numSort > 0)
{
for (int idx = 0; idx < numSort; idx++)
{
Sort sort = new Sort();
// we need to remove 2 because the datatable structure has uuid
// and relationPreference as first columns
sort.col = UIUtil.getIntParameter(request, "iSortCol_"+idx)-2;
sort.asc = "asc".equalsIgnoreCase(request.getParameter("sSortDir_"+idx));
sorts.add(sort);