Skip to content

Instantly share code, notes, and snippets.

@jlafourc
Created April 17, 2012 12:37
Show Gist options
  • Save jlafourc/2405712 to your computer and use it in GitHub Desktop.
Save jlafourc/2405712 to your computer and use it in GitHub Desktop.
   public WOActionResults onEntrepriseSupprimer() {
       EOEditingContext edForGroupe = editingContext();
       if (getRepartStructure() == null) {
           return null;
       }
       try {
           if (getRepartStructure() != null) {
               edForGroupe.deleteObject(getRepartStructure());
               edForGroupe.saveChanges();
//                setEditRepartStructure(null);
               setRepartStructure(null);
               setIsEditing(Boolean.FALSE);
           }
       } catch (NSValidation.ValidationException e) {
           e.printStackTrace();
           setErreurSaisieMessage(e.getMessage());
       } catch (Exception e) {
//            edForGroupe.revert();
           e.printStackTrace();
           setErreurSaisieMessage(e.getMessage());
       }
       lesRepartStructures();
       return null;
   }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment