// Init message and key
FacesMessage facesMessage = null;
- String errKey = "error.unknown_id"; //NOI18N
+ String errKey = "ERROR_UNKNOWN_ID"; //NOI18N
// Get client id
final String clientId = component.getClientId();
errKey = String.format("ERROR_%s_IS_NULL", field.toUpperCase()); //NOI18N
// Value it null
- facesMessage = new FacesMessage(getMessageStringFromKey(errKey));
+ facesMessage = new FacesMessage(this.getMessageStringFromKey(errKey));
}
// Abort here
// Valid field?
if (!isValidField) {
// Invalid field
- facesMessage = new FacesMessage(MessageFormat.format(errKey, clientId));
+ facesMessage = new FacesMessage(MessageFormat.format(this.getMessageStringFromKey(errKey), clientId));
}
// Debug message
// Value is empty
errKey = String.format("ERROR_%s_IS_NOT_STRING", field.toUpperCase()); //NOI18N
- facesMessage = new FacesMessage(getMessageStringFromKey(errKey));
+ facesMessage = new FacesMessage(this.getMessageStringFromKey(errKey));
}
// Cast to string
// Value is empty
errKey = String.format("ERROR_%s_IS_EMPTY", field.toUpperCase()); //NOI18N
- facesMessage = new FacesMessage(getMessageStringFromKey(errKey));
+ facesMessage = new FacesMessage(this.getMessageStringFromKey(errKey));
}
}
}
--- /dev/null
+# Copyright (C) 2015 Roland Haeder
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ERROR_AMOUNT_IS_NULL=Die Bestellmenge ist nicht gesetzt.
+ERROR_AMOUNT_IS_NOT_LONG=Die eingegebene Menge ist keine Zahl.
--- /dev/null
+# Copyright (C) 2015 Roland Haeder
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ERROR_AMOUNT_IS_NULL=Order amount is not set.
+ERROR_AMOUNT_IS_NOT_LONG=The entered amount is not a number.