PageControl pageControl = WebUtility.getPageControl(request);
form.setPn(pageControl.getPageNumber());
form.setPs(pageControl.getPageSize());
form.setSc(pageControl.getPrimarySortColumn());
PageOrdering ordering = pageControl.getPrimarySortOrder();
form.setSo((ordering != null) ? ordering.name() : null);
form.setSchedules(schedules.toArray(new MeasurementSchedule[schedules.size()]));
form.setMetricCount(schedules.size());
if (schedules.size() == 1) {
// If there's only a single schedule, auto-select it.