super.preValidate(context, component, value, requiredFileds, false);
// Cast value
- Long number = (Long) value;
+ Long userId = (Long) value;
// Define variable
Boolean ifUserExists = false;
// Is a map entry there?
- if (this.cachedStatus.containsKey(number)) {
+ if (this.cachedStatus.containsKey(userId)) {
// Get from cache
- ifUserExists = this.cachedStatus.get(number);
+ ifUserExists = this.cachedStatus.get(userId);
} else {
// Get status
- ifUserExists = this.userBean.ifUserIdExists(number);
+ ifUserExists = this.userBean.ifUserIdExists(userId);
// Add to cache
- this.cachedStatus.put(number, ifUserExists);
+ this.cachedStatus.put(userId, ifUserExists);
}
// Is the address book id valid?
if (!ifUserExists) {
// Is not valid
- throw new ValidatorException(new FacesMessage(MessageFormat.format("No user found with id {0}. Please check your link.", number))); //NOI18N
+ throw new ValidatorException(new FacesMessage(MessageFormat.format("No user found with id {0}. Please check your link.", userId))); //NOI18N
}
// Trace message