Ejemplo n.º 1
0
 public boolean isRenderEndNominating() {
   eventId = getEventId();
   String login =
       FacesContext.getCurrentInstance().getExternalContext().getUserPrincipal().getName();
   if ((nominatingSessionBean.isStartedNominating(eventId) == true)
       && (votingSessionBean.isStartedVoting(eventId) == false)
       && (isAnyoneNominated() == true)
       && !nominatingSessionBean.isComToEndNominating(eventId, login)) {
     return true;
   } else {
     return false;
   }
 }
Ejemplo n.º 2
0
 public String deleteCandidate() {
   this.candidate = nominatingSessionBean.getCandidate(candidateLogin);
   this.eventId = getEventId();
   try {
     nominatingSessionBean.deleteCandidateFromEvent(candidate, eventId);
     FacesMessage m =
         new FacesMessage("Candidate " + candidate.getLogin() + " was successfully removed");
     FacesContext.getCurrentInstance().addMessage("nic", m);
   } catch (ControllerException ex) {
     Logger.getLogger(VotingManagedBean.class.getName()).log(Level.SEVERE, null, ex);
     return "";
   }
   return "";
 }
Ejemplo n.º 3
0
 public boolean isRenderedTableEndVot() {
   eventId = getEventId();
   if ((nominatingSessionBean.isStartedNominating(eventId) == false)
       && (votingSessionBean.isStartedVoting(eventId) == true)
       && (isAnyoneNominated() == true)) {
     return true;
   } else {
     return false;
   }
 }
Ejemplo n.º 4
0
 public Collection<Commissioner> getAgreedCom() {
   if (isRenderedTableEndNom()) {
     return nominatingSessionBean.getComToEndNominating(getEventId());
   } else if (isRenderedTableStarVot()) {
     return votingSessionBean.getComToStartVoting(getEventId());
   } else if (isRenderedTableEndVot()) {
     return votingSessionBean.getComToEndVoting(getEventId());
   }
   return null;
 }
Ejemplo n.º 5
0
 public Collection<Candidate> getCandidates() {
   return nominatingSessionBean.getCandidates(getEventId());
 }