* @param context FacesContext instance\r
* @param component UIComponent instance\r
* @param value Value to check\r
- * @param fields Array of valid field names (ending with)\r
+ * @param requiredFields Array of required field names (ending with)\r
* @throws ValidatorException If something more horrible went wrong\r
*/\r
- protected void preValidate (final FacesContext context, final UIComponent component, final Object value, final String[] fields) throws ValidatorException {\r
+ protected void preValidate (final FacesContext context, final UIComponent component, final Object value, final String[] requiredFields) throws ValidatorException {\r
// Trace message\r
- this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2},fields={3} - CALLED!", context, component, value, Arrays.toString(fields)));\r
+ this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2},fields={3} - CALLED!", context, component, value, Arrays.toString(requiredFields)));\r
\r
// Set resource bundle\r
this.initResourceBundle(context);\r
// Default is no field is valid\r
boolean isValidField = false;\r
\r
- for (final String field : fields) {\r
+ for (final String field : requiredFields) {\r
// Get logger\r
this.getLogger().debug(MessageFormat.format("field={0},clientId={1}", field, clientId));\r
\r
* @param context FacesContext instance\r
* @param component UIComponent instance\r
* @param value Value to check\r
- * @param fields Array of valid field names (ending with)\r
+ * @param requiredFields Array of required field names (ending with)\r
* @throws ValidatorException If something more horrible went wrong\r
*/\r
@Override\r
- protected void preValidate (final FacesContext context, final UIComponent component, final Object value, final String[] fields) throws ValidatorException {\r
+ protected void preValidate (final FacesContext context, final UIComponent component, final Object value, final String[] requiredFields) throws ValidatorException {\r
// Trace message\r
- this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2},fields={3} - CALLED!", context, component, value, Arrays.toString(fields)));\r
+ this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2},fields={3} - CALLED!", context, component, value, Arrays.toString(requiredFields)));\r
\r
// Pre-validate (e.g. on null)\r
- super.preValidate(context, component, value, fields);\r
+ super.preValidate(context, component, value, requiredFields);\r
\r
// Get client id and init message + key\r
String clientId = component.getClientId();\r
String errKey;\r
\r
// So far all fine!\r
- for (final String field : fields) {\r
+ for (final String field : requiredFields) {\r
// Debug message\r
this.getLogger().debug(MessageFormat.format("field={0},clientId={1}", field, clientId));\r
\r
// Trace message\r
this.getLogger().trace(MessageFormat.format("context={0},component={1},value={2} - CALLED!", context, component, value));\r
\r
- // All accepted fields\r
- String[] fields = {"firstName", "familyName"};\r
+ // All accepted, required fields\r
+ String[] requiredFileds = {"firstName", "familyName"};\r
\r
// Pre-validation (e.g. not null, not a string, empty string ...)\r
- super.preValidate(context, component, value, fields);\r
+ super.preValidate(context, component, value, requiredFileds);\r
\r
// Trace message\r
this.getLogger().trace("EXIT!");\r