limit = Integer.valueOf(limitParam);
} catch (Exception e) {
isPagination = false;
}
if (isPagination) {
Pagination p = null;
try {
JSONObject sort = JSONArray.fromObject(request
.getParameter("sort")).getJSONObject(0);
if (sort != null) {
p = new Pagination(start, limit,
sort.getString("property"),
sort.getString("direction"));
} else {
p = new Pagination(start, limit);
}
} catch (Exception e) {
p = new Pagination(start, limit);
}
PaginationUtils.setPagination(p);
}
}
return true;