]> git.mxchange.org Git - jcore-utils.git/blobdiff - src/org/mxchange/jcoreee/validator/bool/BaseBooleanValidator.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 / bool / BaseBooleanValidator.java
index f0d603fcd711679a1688f012861db0bab0cefa2f..122d0a026261e82a1f5c005ceb285e1effd4949c 100644 (file)
@@ -28,7 +28,7 @@ import org.mxchange.jcoreee.validator.BaseObjectValidator;
 
 /**
  * A general boolean value validator.
- *
+ * <p>
  * @author BalusC
  * @author Roland Haeder<roland@mxchange.org>
  */
@@ -50,7 +50,7 @@ public abstract class BaseBooleanValidator extends BaseObjectValidator implement
                // Get client id and init message + key
                String clientId = component.getClientId();
                FacesMessage facesMessage = null;
-               String requiredMessage = null;
+               String requiredMessage;
 
                // So far all fine, no check if the field is fine
                for (final String field : requiredFields) {
@@ -62,7 +62,7 @@ public abstract class BaseBooleanValidator extends BaseObjectValidator implement
                                // Compare value's type
                                if (!(value instanceof Boolean)) {
                                        // Generate message
-                                       requiredMessage = this.getMessageStringFromKey(String.format("ERROR_%s_IS_NOT_BOOLEAN", field.toUpperCase()));
+                                       requiredMessage = MessageFormat.format("Field {0} is not Boolean.", field); //NOI18N
 
                                        // Value is not right type
                                        facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, requiredMessage, requiredMessage); //NOI18N