// Is it set?
if (null == this.getBundle()) {
// Set it now
- setBundle(ResourceBundle.getBundle("org.mxchange.localization.messages", context.getViewRoot().getLocale()));
+ setBundle(ResourceBundle.getBundle("org.mxchange.localization.bundle", context.getViewRoot().getLocale()));
}
}
*/
protected void preValidate (final FacesContext context, final UIComponent component, final Object value, final String[] requiredFields) throws ValidatorException {
// Trace message
- this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2},fields={3} - CALLED!", context, component, value, Arrays.toString(requiredFields)));
+ this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2},requiredFields={3} - CALLED!", context, component, value, Arrays.toString(requiredFields))); //NOI18N
// Set resource bundle
this.initResourceBundle(context);
// Init message and key
FacesMessage facesMessage = null;
- String errKey = "error.unknown_id";
+ String errKey = "error.unknown_id"; //NOI18N
// Get client id
String clientId = component.getClientId();
for (final String field : requiredFields) {
// Get logger
- this.getLogger().debug(MessageFormat.format("field={0},clientId={1}", field, clientId));
+ this.getLogger().debug(MessageFormat.format("field={0},clientId={1}", field, clientId)); //NOI18N
// Is it the same?
if (clientId.endsWith(field)) {
// Is it null?
if (null == value) {
- errKey = String.format("error.%s.is_null", field);
+ errKey = String.format("error.%s.is_null", field); //NOI18N
// Value it null
facesMessage = new FacesMessage(this.getMessageStringFromKey(errKey));
-
- // Abort here?
}
+
+ // Abort here
+ break;
}
}
// Debug message
- this.getLogger().debug("isValidField=" + isValidField);
+ this.getLogger().debug(MessageFormat.format("isValidField={0}", isValidField)); //NOI18N
// Valid field?
if (!isValidField) {
}
// Debug message
- this.getLogger().debug(MessageFormat.format("facesMessage={0}", facesMessage));
+ this.getLogger().debug(MessageFormat.format("facesMessage={0}", facesMessage)); //NOI18N
// Is it not null?
if (null != facesMessage) {
}
// Trace message
- this.getLogger().trace("EXIT!");
+ this.getLogger().trace("EXIT!"); //NOI18N
}
}