Corrección de error en el alta de usuarios y formato de la pantalla de
login de usuarios.
This commit is contained in:
@@ -184,15 +184,15 @@ public class RegisterUserMBean extends ProfileMBeanBase implements Serializable
|
||||
this.nif = nif;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void addNewUser() {
|
||||
public String addNewUser() {
|
||||
int error = 0;
|
||||
|
||||
if (this.isFamilyDoctor() && this.primaryHealthCareCenter == null) {
|
||||
@@ -213,28 +213,33 @@ public class RegisterUserMBean extends ProfileMBeanBase implements Serializable
|
||||
switch (UserType.valueOf(this.userType)) {
|
||||
case PATIENT:
|
||||
PatientTO pat = this.remoteManager.registerPatient(id, nif, name, surname, password, email);
|
||||
this.id = pat.getId();
|
||||
|
||||
break;
|
||||
case FAMILY_DOCTOR:
|
||||
FamilyDoctorTO fd = this.remoteManager.registerFamilyDoctor1(id, nif, name, surname, password, email, this.primaryHealthCareCenter);
|
||||
this.id = fd.getId();
|
||||
|
||||
break;
|
||||
case SPECIALIST_DOCTOR:
|
||||
SpecialistDoctorTO sd = this.remoteManager.registerSpecialistDoctor(id, nif, name, surname, password, email, this.medicalSpecialty);
|
||||
this.id = sd.getId();
|
||||
|
||||
break;
|
||||
case ADMINISTRADOR:
|
||||
throw new NotSupportedException("No se soporta el registro directo de administradores.");
|
||||
}
|
||||
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_INFO, "Alta realizada",
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_INFO, "Registro realizado",
|
||||
"El usuario " + name + " " + surname + " se ha registrado correctamente. Por favor, comprueba su correo electrónico para verificar su cuenta.");
|
||||
|
||||
return "RegisterUserResult";
|
||||
} catch (Exception e) {
|
||||
this.manageException(e);
|
||||
}
|
||||
}
|
||||
|
||||
// FacesContext.getCurrentInstance().addMessage(null, msg);
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getPasswordRepeat() {
|
||||
|
||||
Reference in New Issue
Block a user