[richfaces-svn-commits] JBoss Rich Faces SVN: r11462 - trunk/ui/pickList/src/main/java/org/richfaces/renderkit.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Mon Dec 1 11:52:22 EST 2008
Author: dmorozov
Date: 2008-12-01 11:52:22 -0500 (Mon, 01 Dec 2008)
New Revision: 11462
Modified:
trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
Log:
add log message if can't find bundle properties files
Modified: trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
===================================================================
--- trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2008-12-01 16:49:40 UTC (rev 11461)
+++ trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2008-12-01 16:52:22 UTC (rev 11462)
@@ -53,6 +53,8 @@
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.util.SelectUtils;
import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.richfaces.component.UIPickList;
import org.richfaces.component.util.HtmlUtil;
import org.richfaces.utils.PickListUtils;
@@ -60,6 +62,7 @@
public class PickListRenderer extends HeaderResourcesRendererBase {
private static final String HIDDEN_SUFFIX = "valueKeeper";
+ private static Log logger = LogFactory.getLog(PickListRenderer.class);
protected static final OrderingComponentRendererBase.ControlsHelper[] SHUTTLE_HELPERS = PickListControlsHelper.HELPERS;
protected final static String SHOW_LABELS_ATTRIBUTE_NAME = "showButtonsLabel";
private static final String MESSAGE_BUNDLE_NAME = PickListRenderer.class.getPackage().getName() + ".pickList";
@@ -378,25 +381,33 @@
locale = Locale.getDefault();
}
- try {
- if( null != (userBundleName = context.getApplication().getMessageBundle())) {
- bundle = ResourceBundle.getBundle(userBundleName,locale, getCurrentLoader(userBundleName));
- if (bundle != null) {
- label = bundle.getString(propertyId);
- }
- }
- } catch (MissingResourceException e) {
- }
-
- if(label == null && bundleName != null) {
- try {
- bundle = ResourceBundle.getBundle(bundleName ,locale, getCurrentLoader(bundleName));
- if (bundle != null) {
- label = bundle.getString(propertyId);
- }
- } catch (MissingResourceException e) {
- }
- }
+ if(locale != null) {
+ try {
+ if( null != (userBundleName = context.getApplication().getMessageBundle())) {
+ bundle = ResourceBundle.getBundle(userBundleName,locale, getCurrentLoader(userBundleName));
+ if (bundle != null) {
+ label = bundle.getString(propertyId);
+ }
+ }
+ } catch (MissingResourceException e) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Can't find bundle properties file " + userBundleName + " " + locale.getLanguage() + " " + locale.getCountry()) ;
+ }
+ }
+ if(label == null && bundleName != null) {
+ try {
+ bundle = ResourceBundle.getBundle(bundleName ,locale, getCurrentLoader(bundleName));
+ if (bundle != null) {
+ label = bundle.getString(propertyId);
+ }
+ } catch (MissingResourceException e) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Can't find bundle properties file " + bundleName + " " + locale.getLanguage() + " " + locale.getCountry()) ;
+ }
+
+ }
+ }
+ }
return label;
}
More information about the richfaces-svn-commits
mailing list