예제 #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());
   }
 }
예제 #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);
  }
예제 #3
0
 /** @param interviewGuide */
 public void showPanel(InterviewEntity interviewGuide) {
   selectedInterviewEntity = interviewGuide;
   lstInterviewQuestionEntity =
       interviewQuestionFacade.getInterviewQuestionEntityByInterview(
           selectedInterviewEntity.getInterviewId());
   panelGroup.setRendered(true);
   panelInterviewQuestions.setRendered(false);
 }
예제 #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());
   }
 }