示例#1
0
 public void destroy(Child child) {
   System.out.println("DESTROY");
   persist(
       PersistAction.DELETE, child, ResourceBundle.getBundle("/Bundle").getString("ChildDeleted"));
   if (!JsfUtil.isValidationFailed()) {
     // selected = null; // Remove selection
     items = null; // Invalidate list of items to trigger re-query.
   }
 }
示例#2
0
 //  public EventType prepareCreate() {
 //    created = new EventType();
 //    initializeEmbeddableKey();
 //    return created;
 //  }
 public Child create(Child newChild) {
   System.out.println("CREATE");
   Child ret =
       persist(
           PersistAction.CREATE,
           newChild,
           MessageFormat.format(
               ResourceBundle.getBundle("/Bundle").getString("ChildCreated"),
               newChild.getFirstname()));
   if (!JsfUtil.isValidationFailed()) {
     items = null; // Invalidate list of items to trigger re-query.
   }
   return ret;
 }