public String modify() throws ServiceException {

    mission = missions.getRowData();
    System.out.println("Id mission " + mission.getId());
    missionService.findById(mission.getId());
    System.out.println("Nom mission " + mission.getNom());

    return "create";
  }
  public String remove() throws Exception {
    try {
      mission = missions.getRowData();
      missionService.removeById(mission.getId());
    } catch (Exception e) {
      FacesMessage m =
          new FacesMessage(
              FacesMessage.SEVERITY_ERROR, e.getLocalizedMessage(), "Remove unsuccessful");
      facesContext.addMessage(null, m);
    }

    return initListMission();
  }
 public String register() throws Exception {
   try {
     missionService.register(getMission());
     FacesMessage m =
         new FacesMessage(FacesMessage.SEVERITY_INFO, "Registered!", "Registration successful");
     facesContext.addMessage(null, m);
     init();
   } catch (Exception e) {
     FacesMessage m =
         new FacesMessage(
             FacesMessage.SEVERITY_ERROR, e.getLocalizedMessage(), "Registration unsuccessful");
     facesContext.addMessage(null, m);
   }
   return initListMission();
 }
 // Permet d'initialiser la liste qui sera utiliser dans les datatables de primefaces
 public String initListMission() throws Exception {
   missions = new ListDataModel<Mission>();
   missions.setWrappedData(missionService.findAll());
   return "/mission/list";
 }