[ http://jira.jboss.com/jira/browse/RF-2482?page=all ]
Aleksej Yanul closed RF-2482. ----------------------------- > calendar bundle is not used if message-bundle is not set > -------------------------------------------------------- > > Key: RF-2482 > URL: http://jira.jboss.com/jira/browse/RF-2482 > Project: RichFaces > Issue Type: Bug > Affects Versions: 3.1.4 > Reporter: Grigory Mischenko > Assigned To: Aleksej Yanul > Priority: Minor > Fix For: 3.2.0, 3.2.1 > > > if message-bundle is not set in faces-config.xml, Calendar don't use > org.richfaces.renderkit.calendar. > The bug is in CalendarRendererBase.writeStringsFromBundle. CALENDAR_BUNDLE > should be used if varibal "lable" is not null. At present code > CALENDAR_BUNDLE is used if message bundle exists and it don't cantain lable. > Wrong code: > public void writeStringsFromBundle(ResourceBundle bundle1, > ResourceBundle bundle2, String name, > ResponseWriter writer) throws IOException { > > String label = null; > try { > if(null != bundle1){ > label = bundle1.getString("RICH_CALENDAR_" + > name.toUpperCase() + "_LABEL"); > } > > } catch (MissingResourceException e) { > // Current key wasn't found in application bundle, use > CALENDAR_BUNDLE > try { > > if(null != bundle2){ > label = > bundle2.getString("RICH_CALENDAR_" + name.toUpperCase() + "_LABEL"); > } > } catch (MissingResourceException exc) { > // Current key wasn't found, use default, > ignore this exception. > } > } > writeStringFoundInBundle(name, label, writer); > > > } > Right code: > public void writeStringsFromBundle(ResourceBundle bundle1, > ResourceBundle bundle2, String name, > ResponseWriter writer) throws IOException { > > String label = null; > try { > if(null != bundle1){ > label = bundle1.getString("RICH_CALENDAR_" + > name.toUpperCase() + "_LABEL"); > } > > } catch (MissingResourceException e) { > } > if(null == label) { > // Current key wasn't found in application bundle, use > CALENDAR_BUNDLE > try { > > if(null != bundle2){ > label = > bundle2.getString("RICH_CALENDAR_" + name.toUpperCase() + "_LABEL"); > } > } catch (MissingResourceException exc) { > // Current key wasn't found, use default, > ignore this exception. > } > } > writeStringFoundInBundle(name, label, writer); > > > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ richfaces-issues mailing list [email protected] https://lists.jboss.org/mailman/listinfo/richfaces-issues
