Exemplo n.º 1
0
 /** Edit question of a select Interview Question */
 public void editQuestion() {
   try {
     interviewQuestionFacade.editInterviewQuestionEntity(selectedInterviewQuestionEntity);
   } catch (InterviewQuestionNameAlreadyExistsException
       | MustIntroduceInterviewQuestionException ex) {
     Logger.getLogger(GuideWebManagem.class.getName()).log(Level.SEVERE, null, ex);
     JSFUtil.addErrorMessage(ex.getMessage());
     lstInterviewQuestionEntity =
         interviewQuestionFacade.getInterviewQuestionEntityByInterview(
             selectedInterviewEntity.getInterviewId());
   }
 }
Exemplo n.º 2
0
  /**
   * Reorder number of interview Questions in an interview guide
   *
   * @param event
   */
  public void onRowReorder(ReorderEvent event) {

    for (int i = 0; i < lstInterviewQuestionEntity.size(); i++) {
      lstInterviewQuestionEntity.get(i).setQuestionNumber(i + 1);
      interviewQuestionFacade.edit(lstInterviewQuestionEntity.get(i));
    }
    lstInterviewQuestionEntity =
        interviewQuestionFacade.getInterviewQuestionEntityByInterview(
            selectedInterviewEntity.getInterviewId());

    FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, "Row Moved with succes", null);
    FacesContext.getCurrentInstance().addMessage(null, msg);
  }
Exemplo n.º 3
0
 /** @param interviewGuide */
 public void showPanel(InterviewEntity interviewGuide) {
   selectedInterviewEntity = interviewGuide;
   lstInterviewQuestionEntity =
       interviewQuestionFacade.getInterviewQuestionEntityByInterview(
           selectedInterviewEntity.getInterviewId());
   panelGroup.setRendered(true);
   panelInterviewQuestions.setRendered(false);
 }
Exemplo n.º 4
0
 /** Create Interview Questions to a selected Interview Guide */
 public void createQuestionsForGuide() {
   try {
     InterviewQuestionEntity interviewQuestion =
         interviewQuestionFacade.createQuestionForGuide(
             questionName, selectedInterviewEntity, answerType);
     lstInterviewQuestionEntity =
         interviewQuestionFacade.getInterviewQuestionEntityByInterview(
             selectedInterviewEntity.getInterviewId());
     interviewEntityFacade.mergeQuestionsInGuide(selectedInterviewEntity, interviewQuestion);
   } catch (EJBException ex) {
     Logger.getLogger(ApplicationWebManagem.class.getName()).log(Level.SEVERE, null, ex);
   } catch (InterviewQuestionNameAlreadyExistsException
       | MustIntroduceInterviewQuestionException ex) {
     Logger.getLogger(GuideWebManagem.class.getName()).log(Level.SEVERE, null, ex);
     JSFUtil.addErrorMessage(ex.getMessage());
   }
 }