12,6 → 12,7 |
import org.tela_botanica.client.util.UtilDAO; |
|
import com.extjs.gxt.ui.client.Registry; |
import com.extjs.gxt.ui.client.widget.Info; |
import com.google.gwt.core.client.GWT; |
import com.google.gwt.json.client.JSONArray; |
import com.google.gwt.json.client.JSONObject; |
117,12 → 118,21 |
|
private void traiterReponse(JSONValue reponseValeur, String type) { |
Information info = new Information(type); |
String message = ""; |
String idsNonSuppr = ""; |
|
// Si la requête est un succès, réception d'une chaîne |
if (reponseValeur.isString() != null) { |
info.setDonnee(reponseValeur.isString().stringValue()); |
if (type.equals("suppression_projet") && reponseValeur.isArray() != null) { |
JSONArray tableauInfo = reponseValeur.isArray(); |
idsNonSuppr = tableauInfo.get(0).isString().stringValue(); |
|
} else if (reponseValeur.isString() != null) { |
message = reponseValeur.isString().stringValue(); |
} else { |
info.setDeboguage("La réponse n'est pas une chaine JSON."); |
} |
info.setDonnee(0, message); |
info.setDonnee(1, idsNonSuppr); |
vueARafraichir.rafraichir(info); |
} |
} |