| Line 6... |
Line 6... |
| 6 |
import org.tela_botanica.client.modeles.objets.Configuration;
|
6 |
import org.tela_botanica.client.modeles.objets.Configuration;
|
| 7 |
import org.tela_botanica.client.modeles.objets.ImageCarnet;
|
7 |
import org.tela_botanica.client.modeles.objets.ImageCarnet;
|
| 8 |
import org.tela_botanica.client.modeles.objets.Utilisateur;
|
8 |
import org.tela_botanica.client.modeles.objets.Utilisateur;
|
| Line 9... |
Line 9... |
| 9 |
|
9 |
|
| 10 |
import com.google.gwt.http.client.Request;
|
10 |
import com.google.gwt.http.client.Request;
|
| 11 |
import com.google.gwt.http.client.RequestBuilder;
|
11 |
import org.tela_botanica.client.util.RequestBuilderWithCredentials;
|
| 12 |
import com.google.gwt.http.client.RequestCallback;
|
12 |
import com.google.gwt.http.client.RequestCallback;
|
| 13 |
import com.google.gwt.http.client.RequestException;
|
13 |
import com.google.gwt.http.client.RequestException;
|
| Line 14... |
Line 14... |
| 14 |
import com.google.gwt.http.client.Response;
|
14 |
import com.google.gwt.http.client.Response;
|
| Line 45... |
Line 45... |
| 45 |
for (int i = 0; i < champsModifiables.length; i++) {
|
45 |
for (int i = 0; i < champsModifiables.length; i++) {
|
| 46 |
postData += "&"+champsModifiables[i][0]+"="+champsModifiables[i][1];
|
46 |
postData += "&"+champsModifiables[i][0]+"="+champsModifiables[i][1];
|
| 47 |
}
|
47 |
}
|
| Line 48... |
Line 48... |
| 48 |
|
48 |
|
| 49 |
// et on envoie une requête asynchrone
|
49 |
// et on envoie une requête asynchrone
|
| 50 |
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, Configuration.getServiceBaseUrl()
|
50 |
RequestBuilderWithCredentials rb = new RequestBuilderWithCredentials(RequestBuilderWithCredentials.POST, Configuration.getServiceBaseUrl()
|
| Line 51... |
Line 51... |
| 51 |
+ "/inventoryImage/" + Utilisateur.getInstance().getIdentifiantUtilisateurConsulte()+"/"+ic.getId());
|
51 |
+ "/inventoryImage/" + Utilisateur.getInstance().getIdentifiantUtilisateurConsulte()+"/"+ic.getId());
|
| 52 |
|
52 |
|
| Line 91... |
Line 91... |
| 91 |
String motsCles = ic.getMotsCles();
|
91 |
String motsCles = ic.getMotsCles();
|
| 92 |
String id = ic.getId();
|
92 |
String id = ic.getId();
|
| 93 |
postData += "&id_image=" + id + "&id_mot_cle_utilisateur=" + motsCles;
|
93 |
postData += "&id_image=" + id + "&id_mot_cle_utilisateur=" + motsCles;
|
| Line 94... |
Line 94... |
| 94 |
|
94 |
|
| 95 |
// on envoie une requête asynchrone
|
95 |
// on envoie une requête asynchrone
|
| 96 |
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST,
|
96 |
RequestBuilderWithCredentials rb = new RequestBuilderWithCredentials(RequestBuilderWithCredentials.POST,
|
| 97 |
Configuration.getServiceBaseUrl()
|
97 |
Configuration.getServiceBaseUrl()
|
| Line 98... |
Line 98... |
| 98 |
+ "/inventoryKeyWordImageList/" +Utilisateur.getInstance().getIdentifiantUtilisateurConsulte()+ "/");
|
98 |
+ "/inventoryKeyWordImageList/" +Utilisateur.getInstance().getIdentifiantUtilisateurConsulte()+ "/");
|
| 99 |
|
99 |
|
| Line 141... |
Line 141... |
| 141 |
// comme une requête à part entière)
|
141 |
// comme une requête à part entière)
|
| 142 |
String postData = "";
|
142 |
String postData = "";
|
| 143 |
postData += "&action=DELETE";
|
143 |
postData += "&action=DELETE";
|
| Line 144... |
Line 144... |
| 144 |
|
144 |
|
| 145 |
// on envoie un post avec l'id de l'image à supprimer
|
145 |
// on envoie un post avec l'id de l'image à supprimer
|
| 146 |
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, Configuration.getServiceBaseUrl()
|
146 |
RequestBuilderWithCredentials rb = new RequestBuilderWithCredentials(RequestBuilderWithCredentials.POST, Configuration.getServiceBaseUrl()
|
| 147 |
+ "/inventoryImage/"
|
147 |
+ "/inventoryImage/"
|
| 148 |
+ iModele.getIdentifiant()
|
148 |
+ iModele.getIdentifiant()
|
| 149 |
+ "/"
|
149 |
+ "/"
|