Author: amarkhel
Date: 2010-12-22 10:41:42 -0500 (Wed, 22 Dec 2010)
New Revision: 20746
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
Log:
RF-9779 Calendar: component broken when monthLabels evaluated to null
-added changes for weekDayLabels and weekDayLabelsShort
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
---
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2010-12-22
15:34:44 UTC (rev 20745)
+++
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2010-12-22
15:41:42 UTC (rev 20746)
@@ -448,14 +448,14 @@
int monthMin = calendar.getActualMinimum(Calendar.MONTH);
String [] weekDayLabels =
RenderKitUtils.asArray(calendarComponent.getWeekDayLabels());
- if (weekDayLabels == null) {
+ if (isEmptyArray(weekDayLabels)) {
weekDayLabels = dateFormat.getWeekdays();
weekDayLabels = shiftDates(minimum, maximum, weekDayLabels);
}
RenderKitUtils.addToScriptHash(map, WEEK_DAY_LABELS, weekDayLabels);
String [] weekDayLabelsShort =
RenderKitUtils.asArray(calendarComponent.getWeekDayLabelsShort());
- if (weekDayLabelsShort == null) {
+ if (isEmptyArray(weekDayLabelsShort)) {
weekDayLabelsShort = dateFormat.getShortWeekdays();
weekDayLabelsShort = shiftDates(minimum, maximum, weekDayLabelsShort);
}
Show replies by date