Author: pyaschenko
Date: 2007-12-18 08:01:06 -0500 (Tue, 18 Dec 2007)
New Revision: 4893
Modified:
trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
Log:
RF-1461
Modified:
trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
---
trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2007-12-18
12:59:42 UTC (rev 4892)
+++
trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2007-12-18
13:01:06 UTC (rev 4893)
@@ -519,9 +519,16 @@
throws IOException {
String messageBundle = context.getApplication().getMessageBundle();
- ResourceBundle bundle = ResourceBundle.getBundle(messageBundle);
+
+ ResourceBundle bundle = null;
+
+ if (null != messageBundle)
+ {
+ bundle = ResourceBundle.getBundle(messageBundle);
+ }
+
ResponseWriter writer = context.getResponseWriter();
- writer.writeText("\n labels:{", null);
+ writer.writeText(",\n labels:{", null);
if (null != bundle && messageBundle.contains("calendar")) {
@@ -551,15 +558,15 @@
try {
String closeLabel = bundle.getString("closeLabel");
- writer.writeText("close:'"+closeLabel+"', ", null);
+ writer.writeText("close:'"+closeLabel+"'", null);
} catch (MissingResourceException e) {
// Current key wasn't found in bundle use default
- writer.writeText("close:'X', ", null);
+ writer.writeText("close:'X'", null);
}
}else{
writer.writeText("apply:'Apply', today:'Today',
clean:'Clean', close:'X'", null);
}
- writer.writeText("};\n", null);
+ writer.writeText("}", null);
}
}
Show replies by date