[isidorus-cvs] r960 - branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus
lgiessmann at common-lisp.net
lgiessmann at common-lisp.net
Thu Sep 22 11:51:02 UTC 2011
Author: lgiessmann
Date: Thu Sep 22 04:51:01 2011
New Revision: 960
Log:
gdl-frontend: Widgets: fixed a bug when deleting an Environment without any Hash-Objects bound to it
Modified:
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/HashObjectPsiContainer.java
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/HashObjectPsiContainer.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/HashObjectPsiContainer.java Thu Sep 22 04:41:54 2011 (r959)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/HashObjectPsiContainer.java Thu Sep 22 04:51:01 2011 (r960)
@@ -142,7 +142,19 @@
} else {
HashObjectPsiContainer.this.gdlWebPage.createLoadScreenPanel("Wating for Completing a Delete Request", "deleting all associated Hash-Object topics of the Environment Topic " + TmHelper.getAnyIdOfTopic(this.environmentTopic) + " from " + HashObjectPsiContainer.this.DELETE_URL);
DeleteAllHashObjectsRequest reqCallback = new DeleteAllHashObjectsRequest(HashObjectPsiContainer.this.psiCheckBoxes, this.environmentTopic);
- for (CheckBox cbx : HashObjectPsiContainer.this.psiCheckBoxes) HashObjectPsiContainer.this.deleteHashObject(cbx.getText(), reqCallback);
+ if(HashObjectPsiContainer.this.psiCheckBoxes.size() == 0){
+ JSONObject delObj = HashObjectPsiContainer.this.createObjectToBeDeleted(this.environmentTopic.getSubjectIdentifiers().get(0).getReference());
+ String url = URL.encode(HashObjectPsiContainer.this.DELETE_URL);
+ RequestBuilder builder = new RequestBuilder(RequestBuilder.DELETE, url);
+ builder.setHeader("Content-type", "application/json");
+ try{
+ builder.sendRequest(delObj.toString(), new EnvironemntDeleteRequest(delObj, this.environmentTopic));
+ }catch(RequestException e){
+ Window.alert("delete operation of the object " + delObj + " failed, because: (" + e.getClass() + ")\n" + e.getMessage());
+ }
+ } else {
+ for (CheckBox cbx : HashObjectPsiContainer.this.psiCheckBoxes) HashObjectPsiContainer.this.deleteHashObject(cbx.getText(), reqCallback);
+ }
}
}
}
More information about the Isidorus-cvs
mailing list