Issue #40 corregida.

This commit is contained in:
Roberto Orden Erena
2019-12-28 13:23:00 +01:00
parent 308fa17eba
commit af0a2cf98c
3 changed files with 52 additions and 26 deletions

View File

@@ -100,10 +100,15 @@ public class QuestionsMBean extends ManagedBeanBase implements Serializable {
}
public void addNewQuestion() {
getRemoteManagerMedicalTest().askQuestion(userID, this.selected.getTitle(), this.selected.getMessage());
this.create();
this.loadQuestions();
this.addFacesMessage(FacesMessage.SEVERITY_INFO, "Datos guardados", "La pregunta se registrado correctamente en el sistema.");
String result = getRemoteManagerMedicalTest().askQuestion(userID, this.selected.getTitle(), this.selected.getMessage());
if(result == "ok") {
this.create();
this.loadQuestions();
this.addFacesMessage(FacesMessage.SEVERITY_INFO, "Datos guardados", "La pregunta se registrado correctamente en el sistema.");
} else {
this.addFacesMessage(FacesMessage.SEVERITY_ERROR, "Error", result);
}
}
public boolean isShowPanelDetail() {