Author: nbelaevski
Date: 2008-05-15 14:06:24 -0400 (Thu, 15 May 2008)
New Revision: 8606
Modified:
trunk/ui/datascroller/src/main/java/org/richfaces/component/DataScrollerViewPhaseListener.java
Log:
http://jira.jboss.com/jira/browse/RF-3349
Modified:
trunk/ui/datascroller/src/main/java/org/richfaces/component/DataScrollerViewPhaseListener.java
===================================================================
---
trunk/ui/datascroller/src/main/java/org/richfaces/component/DataScrollerViewPhaseListener.java 2008-05-15
18:06:20 UTC (rev 8605)
+++
trunk/ui/datascroller/src/main/java/org/richfaces/component/DataScrollerViewPhaseListener.java 2008-05-15
18:06:24 UTC (rev 8606)
@@ -21,7 +21,6 @@
package org.richfaces.component;
-import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -39,6 +38,7 @@
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;
+import org.ajax4jsf.Messages;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.richfaces.component.util.MessageUtil;
@@ -57,8 +57,6 @@
*/
private static final long serialVersionUID = -3614288642745891577L;
- private static final String DIFFERENT_PAGE_EXPRS = "Datascroller components
attached to component: {0} have different values of 'page' attribute :
{1}!";
-
private static final Log log = LogFactory.getLog(DataScrollerViewPhaseListener.class);
private static final class ComponentConnections {
@@ -184,8 +182,11 @@
builder.append(scrollerItr.hasNext() ? ",\n" : "]");
}
- Object dataLabel = MessageUtil.getLabel(facesContext, data);
- log.error(MessageFormat.format(DIFFERENT_PAGE_EXPRS, dataLabel, builder));
+ String formattedMessage =
Messages.getMessage(Messages.DATASCROLLER_PAGES_DIFFERENT,
+ new Object[] {MessageUtil.getLabel(facesContext, data), builder});
+
+
+ log.error(formattedMessage);
}
}