Comprobación visual con botón de nif válido y/o duplicado (inputGroup)

This commit is contained in:
Marcos Garcia Nuñez
2019-12-17 23:43:41 +01:00
parent 96a2c3dcf6
commit b61c57d290
5 changed files with 87 additions and 25 deletions

View File

@@ -129,8 +129,13 @@ public class RegisterUserMBean extends ManagedBeanBase implements Serializable {
}
public void hadleNIFValueChange() {
if (ValidationUtils.checkIfNifAlreadyRegistered(this.getRemoteManagerCommon(), this.userType, this.nif, null) == true)
boolean isDupe = false;
if (ValidationUtils.checkIfNifAlreadyRegistered(this.getRemoteManagerCommon(), this.userType, this.nif, null) == true) {
isDupe = true;
this.addFacesMessage("frmRegisterUser:nif", FacesMessage.SEVERITY_WARN, "NIF duplicado", "El nif indicado pertenece a otro usuario previamente registrado");
}
PrimeFaces.current().ajax().addCallbackParam("NIFisDupe", isDupe);
}
public boolean isPatient() {

View File

@@ -173,8 +173,13 @@ public class UpdateProfileMBean extends ManagedBeanBase implements Serializable
}
public void hadleNIFValueChange() {
if (ValidationUtils.checkIfNifAlreadyRegistered(this.getRemoteManagerCommon(), this.userType, this.nif, this.id) == true)
boolean isDupe = false;
if (ValidationUtils.checkIfNifAlreadyRegistered(this.getRemoteManagerCommon(), this.userType, this.nif, this.id) == true) {
isDupe = true;
this.addFacesMessage("frmUpdateProfile:nif", FacesMessage.SEVERITY_WARN, "NIF duplicado", "El nif indicado pertenece a otro usuario previamente registrado");
}
PrimeFaces.current().ajax().addCallbackParam("NIFisDupe", isDupe);
}
public List<FamilyDoctorTO> getFamilyDoctorList() {