public static Comparator getBindingOrExpressionComparator(
FacesContext facesContext, UIComponent child, String var, boolean descending, Comparator comparator) {
if (USE_BINDING) {
ValueBinding valueBinding = child.getValueBinding("value");
return new ValueBindingComparator(facesContext, var, valueBinding, descending, comparator);
} else {
return FacesUtilsEL.getBindingOrExpressionComparator(facesContext, child, var, descending, comparator);
}
}