private PathValidator copy(PathValidator pathValidator) { PathValidator result = new PathValidator(); result.setIndex(pathValidator.getIndex()); result.setOnError(pathValidator.getOnError()); result.setValidatorIds(pathValidator.getValidatorIds()); result.setValidatorExpression(pathValidator.getValidatorExpression()); return result; } }
public List<String> getValidatorIdList() { List<String> result = new ArrayList<String>(); if (hasValidators()) { String[] ids = validatorIds.split(" "); Collections.addAll(result, ids); } return result; }
PathValidator pathValidator = new PathValidator(); pathValidator.setIndex(validationAnnotation.index()); pathValidator.setOnError(validationAnnotation.onError()); pathValidator.setValidatorIds(join(validationAnnotation.validatorIds(), " ")); pathValidator.setValidatorExpression(new ConstantExpression(validationAnnotation.validator()));
PathValidator currentPathValidator = new PathValidator(); String currentValidatorId = ""; try for (String id : pv.getValidatorIdList()) validator.validate(context, new NullComponent(), coerced); if (pv.getValidatorExpression() != null) elUtils.invokeMethod(context, pv.getValidatorExpression().getELExpression(), new Class<?>[] { FacesContext.class, UIComponent.class, Object.class }, new Object[] { context, new NullComponent(), coerced }); + "] on mappingId [" + mapping.getId() + "] to type in location [" + currentParameter.getExpression() + "]"); handleValidationFailure(context, message, currentPathValidator.getOnError()); handleValidationFailure(context, e.getFacesMessage(), currentPathValidator.getOnError()); + "] on mappingId [" + mapping.getId() + "] parameter [" + currentParameter.getExpression() + "] at position [" + currentParameter.getPosition() + "]"); handleValidationFailure(context, message, currentPathValidator.getOnError());
/** * Return a list of validators that belong to the given parameter. */ public List<PathValidator> getValidatorsForPathParam(final PathParameter param) { List<PathValidator> result = new ArrayList<PathValidator>(); for (PathValidator pv : pathValidators) { if (pv.getIndex() == param.getPosition()) { result.add(pv); } } return result; }
private void mergeValidators(UrlMapping parent, UrlMapping child) { List<PathValidator> result = new ArrayList<PathValidator>(); List<PathValidator> validators = new ArrayList<PathValidator>(); validators.addAll(parent.getPathValidators()); validators.addAll(child.getPathValidators()); int i = 0; for (PathValidator pv : validators) { PathValidator temp = copy(pv); temp.setIndex(i++); result.add(temp); } child.setPathValidators(result); }
PathValidator pathValidator = new PathValidator(); pathValidator.setIndex(validationAnnotation.index()); pathValidator.setOnError(validationAnnotation.onError()); pathValidator.setValidatorIds(join(validationAnnotation.validatorIds(), " ")); pathValidator.setValidatorExpression(new ConstantExpression(validationAnnotation.validator()));
PathValidator currentPathValidator = new PathValidator(); String currentValidatorId = ""; try for (String id : pv.getValidatorIdList()) validator.validate(context, new NullComponent(), coerced); if (pv.getValidatorExpression() != null) elUtils.invokeMethod(context, pv.getValidatorExpression().getELExpression(), new Class<?>[] { FacesContext.class, UIComponent.class, Object.class }, new Object[] { context, new NullComponent(), coerced }); + "] on mappingId [" + mapping.getId() + "] to type in location [" + currentParameter.getExpression() + "]"); handleValidationFailure(context, message, currentPathValidator.getOnError()); handleValidationFailure(context, e.getFacesMessage(), currentPathValidator.getOnError()); + "] on mappingId [" + mapping.getId() + "] parameter [" + currentParameter.getExpression() + "] at position [" + currentParameter.getPosition() + "]"); handleValidationFailure(context, message, currentPathValidator.getOnError());
/** * Return a list of validators that belong to the given parameter. */ public List<PathValidator> getValidatorsForPathParam(final PathParameter param) { List<PathValidator> result = new ArrayList<PathValidator>(); for (PathValidator pv : pathValidators) { if (pv.getIndex() == param.getPosition()) { result.add(pv); } } return result; }
private void mergeValidators(UrlMapping parent, UrlMapping child) { List<PathValidator> result = new ArrayList<PathValidator>(); List<PathValidator> validators = new ArrayList<PathValidator>(); validators.addAll(parent.getPathValidators()); validators.addAll(child.getPathValidators()); int i = 0; for (PathValidator pv : validators) { PathValidator temp = copy(pv); temp.setIndex(i++); result.add(temp); } child.setPathValidators(result); }
private PathValidator copy(PathValidator pathValidator) { PathValidator result = new PathValidator(); result.setIndex(pathValidator.getIndex()); result.setOnError(pathValidator.getOnError()); result.setValidatorIds(pathValidator.getValidatorIds()); result.setValidatorExpression(pathValidator.getValidatorExpression()); return result; } }
PathValidator pathValidator = new PathValidator(); pathValidator.setIndex(validationAnnotation.index()); pathValidator.setOnError(validationAnnotation.onError()); pathValidator.setValidatorIds(join(validationAnnotation.validatorIds(), " ")); pathValidator.setValidatorExpression(new ConstantExpression(validationAnnotation.validator()));
PathValidator currentPathValidator = new PathValidator(); String currentValidatorId = ""; try for (String id : pv.getValidatorIdList()) validator.validate(context, new NullComponent(), coerced); if (pv.getValidatorExpression() != null) elUtils.invokeMethod(context, pv.getValidatorExpression().getELExpression(), new Class<?>[] { FacesContext.class, UIComponent.class, Object.class }, new Object[] { context, new NullComponent(), coerced }); + "] on mappingId [" + mapping.getId() + "] to type in location [" + currentParameter.getExpression() + "]"); handleValidationFailure(context, message, currentPathValidator.getOnError()); handleValidationFailure(context, e.getFacesMessage(), currentPathValidator.getOnError()); + "] on mappingId [" + mapping.getId() + "] parameter [" + currentParameter.getExpression() + "] at position [" + currentParameter.getPosition() + "]"); handleValidationFailure(context, message, currentPathValidator.getOnError());
public List<String> getValidatorIdList() { List<String> result = new ArrayList<String>(); if (hasValidators()) { String[] ids = validatorIds.split(" "); Collections.addAll(result, ids); } return result; }
/** * Return a list of validators that belong to the given parameter. */ public List<PathValidator> getValidatorsForPathParam(final PathParameter param) { List<PathValidator> result = new ArrayList<PathValidator>(); for (PathValidator pv : pathValidators) { if (pv.getIndex() == param.getPosition()) { result.add(pv); } } return result; }
private void mergeValidators(UrlMapping parent, UrlMapping child) { List<PathValidator> result = new ArrayList<PathValidator>(); List<PathValidator> validators = new ArrayList<PathValidator>(); validators.addAll(parent.getPathValidators()); validators.addAll(child.getPathValidators()); int i = 0; for (PathValidator pv : validators) { PathValidator temp = copy(pv); temp.setIndex(i++); result.add(temp); } child.setPathValidators(result); }
private PathValidator copy(PathValidator pathValidator) { PathValidator result = new PathValidator(); result.setIndex(pathValidator.getIndex()); result.setOnError(pathValidator.getOnError()); result.setValidatorIds(pathValidator.getValidatorIds()); result.setValidatorExpression(pathValidator.getValidatorExpression()); return result; } }
PathValidator pathValidator = new PathValidator(); pathValidator.setIndex(validationAnnotation.index()); pathValidator.setOnError(validationAnnotation.onError()); pathValidator.setValidatorIds(join(validationAnnotation.validatorIds(), " ")); pathValidator.setValidatorExpression(new ConstantExpression(validationAnnotation.validator()));
PathValidator currentPathValidator = new PathValidator(); String currentValidatorId = ""; try for (String id : pv.getValidatorIdList()) validator.validate(context, new NullComponent(), coerced); if (pv.getValidatorExpression() != null) elUtils.invokeMethod(context, pv.getValidatorExpression().getELExpression(), new Class<?>[] { FacesContext.class, UIComponent.class, Object.class }, new Object[] { context, new NullComponent(), coerced }); + "] on mappingId [" + mapping.getId() + "] to type in location [" + currentParameter.getExpression() + "]"); handleValidationFailure(context, message, currentPathValidator.getOnError()); handleValidationFailure(context, e.getFacesMessage(), currentPathValidator.getOnError()); + "] on mappingId [" + mapping.getId() + "] parameter [" + currentParameter.getExpression() + "] at position [" + currentParameter.getPosition() + "]"); handleValidationFailure(context, message, currentPathValidator.getOnError());
public List<String> getValidatorIdList() { List<String> result = new ArrayList<String>(); if (hasValidators()) { String[] ids = validatorIds.split(" "); Collections.addAll(result, ids); } return result; }