コード例 #1
0
 private void performDestroy() {
   try {
     getFacade().remove(current);
     JsfUtil.addSuccessMessage(
         ResourceBundle.getBundle("/Bundle").getString("CourseInformationDeleted"));
   } catch (Exception e) {
     JsfUtil.addErrorMessage(
         e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
   }
 }
コード例 #2
0
 public String create() {
   try {
     getFacade().create(current);
     JsfUtil.addSuccessMessage(
         ResourceBundle.getBundle("/Bundle").getString("CourseInformationCreated"));
     return prepareCreate();
   } catch (Exception e) {
     JsfUtil.addErrorMessage(
         e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
     return null;
   }
 }
コード例 #3
0
 public SelectItem[] getItemsAvailableSelectOne() {
   return JsfUtil.getSelectItems(ejbFacade.findAll(), true);
 }
コード例 #4
0
 public SelectItem[] getItemsAvailableSelectMany() {
   return JsfUtil.getSelectItems(ejbFacade.findAll(), false);
 }