writer.endElement("tbody");
}
private Script getJSDateRangesArray(FacesContext context, Calendar calendar) {
List<Object[]> dateRangesList = new ArrayList<Object[]>();
DateRanges dateRanges = findDateRanges(calendar);
String dateRangesStyleClassName = null;
String dateRangesRolloverStyleClassName = null;
String selectedDayClassName = null;
String rolloverSelectedClassName = null;
boolean disableExcluded = false;
boolean disableIncluded = false;
if (dateRanges != null) {
ValueExpression ve = dateRanges.getValueExpression("value");
Object ranges = null;
if (ve != null) {
ranges = ve.getValue(context.getELContext());
}
/*
if (dateRanges.getChildCount() == 0 && ranges == null)
throw new FacesException("At least one date range should be declared inside " +
"'dateRanges' component or value binding to 'value' property specified.");
*/
dateRangesStyleClassName = Styles.getCSSClass(context, calendar, dateRanges.getDayStyle(),
StyleGroup.regularStyleGroup(4), dateRanges.getDayClass(), DEFAULT_DATE_RANGES_CLASS);
dateRangesRolloverStyleClassName = Styles.getCSSClass(context, calendar, dateRanges.getRolloverDayStyle(),
StyleGroup.rolloverStyleGroup(4), dateRanges.getRolloverDayClass(), DEFAULT_ROLLOVER_DATE_RANGES_CLASS);
selectedDayClassName = Styles.getCSSClass(context, calendar, dateRanges.getSelectedDayStyle(),
StyleGroup.selectedStyleGroup(2), dateRanges.getSelectedDayClass());
rolloverSelectedClassName = Styles.getCSSClass(context, calendar, dateRanges.getRolloverSelectedDayStyle(),
StyleGroup.selectedStyleGroup(3), dateRanges.getRolloverSelectedDayClass());
disableExcluded = dateRanges.isDisableExcludes();
disableIncluded = dateRanges.isDisableIncludes();
List<UIComponent> allRanges = dateRanges.getChildren();
for (Object dateRangeObj : allRanges) {
AbstractDateRange dateRange = (AbstractDateRange) dateRangeObj;
if (dateRange instanceof SimpleDateRange) {
String styleClassName = Styles.getCSSClass(context, calendar, dateRange.getDayStyle(),
StyleGroup.regularStyleGroup(5), dateRange.getDayClass(), DEFAULT_DATE_RANGE_CLASS);
String rolloverStyleClassName = Styles.getCSSClass(context, calendar, dateRange.getRolloverDayStyle(),
StyleGroup.rolloverStyleGroup(5), dateRange.getRolloverDayClass(), DEFAULT_ROLLOVER_DATE_RANGE_CLASS);
String selectedDayClassNameDR = Styles.getCSSClass(context, calendar, dateRange.getSelectedDayStyle(),
StyleGroup.selectedStyleGroup(4), dateRanges.getSelectedDayClass());
String rolloverSelectedDayClassNameDR = Styles.getCSSClass(context,
calendar, dateRange.getRolloverSelectedDayStyle(), StyleGroup.selectedStyleGroup(5), dateRange.getRolloverSelectedDayClass()
);
dateRangesList.add(new Object[]{dateRange, styleClassName, rolloverStyleClassName, selectedDayClassNameDR,
rolloverSelectedDayClassNameDR});