]> git.mxchange.org Git - jcore-utils.git/blobdiff - src/org/mxchange/jcoreee/validator/number/BaseLongValidator.java
Let's get rid of this class. It was maybe a good idea, but it required a lot work...
[jcore-utils.git] / src / org / mxchange / jcoreee / validator / number / BaseLongValidator.java
index 8d543aaebe4adc31e144a3f85c0127c14c472308..9406d523c9416da43084fd5681ac243fcdac50b2 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.jcoreee.validator.number;
 
+import java.text.MessageFormat;
 import javax.faces.application.FacesMessage;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -58,7 +59,7 @@ public abstract class BaseLongValidator extends BaseObjectValidator implements V
                                // Compare value's type
                                if (!(value instanceof Long)) {
                                        // Generate message
-                                       requiredMessage = this.getMessageFromKey(String.format("ERROR_%s_IS_NOT_LONG", field.toUpperCase()));
+                                       requiredMessage = MessageFormat.format("Field {0} is not Long.", field); //NOI18N
 
                                        // Value is not right type
                                        facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, requiredMessage, requiredMessage); //NOI18N
@@ -71,7 +72,7 @@ public abstract class BaseLongValidator extends BaseObjectValidator implements V
                                // Is the number below zero?
                                if (num < 0) {
                                        // Generate message
-                                       requiredMessage = this.getMessageFromKey(String.format("ERROR_%s_IS_BELOW_ZERO", field.toUpperCase()));
+                                       requiredMessage = MessageFormat.format("Value {0} for field {1} is below zero.", num, field); //NOI18N
 
                                        // Abort processing here
                                        facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, requiredMessage, requiredMessage);