コード例 #1
0
 private void performDestroy() {
   try {
     getFacade().remove(current);
     JsfUtil.addSuccessMessage(
         ResourceBundle.getBundle("/Bundle").getString("FilmCategoryDeleted"));
   } catch (Exception e) {
     JsfUtil.addErrorMessage(
         e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
   }
 }
コード例 #2
0
 public String create() {
   try {
     current.getFilmCategoryPK().setCategoryId(current.getCategory().getCategoryId());
     current.getFilmCategoryPK().setFilmId(current.getFilm().getFilmId());
     getFacade().create(current);
     JsfUtil.addSuccessMessage(
         ResourceBundle.getBundle("/Bundle").getString("FilmCategoryCreated"));
     return prepareCreate();
   } catch (Exception e) {
     JsfUtil.addErrorMessage(
         e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
     return null;
   }
 }