public String destroy(Sessionf f) { current = (Inscription) getItems().getRowData(); selectedItemIndex = pagination.getPageFirstItem() + getItems().getRowIndex(); performDestroy(); current.setSession(f); System.out.println("//////////////////////////////////////" + f.getInscriptions()); f.setInscriptions(getFacade().listInscrit(f)); System.out.println("+++++++lllllllllllllllllllllllllllllll" + f.getInscriptions()); recreatePagination(); recreateModel(); return "ListInscription"; }
public String create() { try { current.setSession(sessionf); getFacade().create(current); JsfUtil.addSuccessMessage( ResourceBundle.getBundle("/Bundle").getString("InscriptionCreated")); current = new Inscription(); selectedItemIndex = -1; return "Create"; } catch (Exception e) { JsfUtil.addErrorMessage( e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured")); return null; } }