@Override public String getAsString(FacesContext facesContext, UIComponent component, Object object) { if (object == null) { return null; } if (object instanceof Inscription) { Inscription o = (Inscription) object; return getStringKey(o.getId()); } else { throw new IllegalArgumentException( "object " + object + " is of type " + object.getClass().getName() + "; expected type: " + Inscription.class.getName()); } }
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; } }
public String editView(Inscription i) { current = i; indice = current.getSession().getInscriptions().indexOf(i); return "Edit"; }
public List<Employe> getRmployeFromService() { return ejbFacade.findServiceOfEmploye(current.getService()); }