Subversion Repositories eFlore/Applications.coel

Rev

Rev 1054 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1054 Rev 1080
Line 10... Line 10...
10
import org.tela_botanica.client.modeles.Information;
10
import org.tela_botanica.client.modeles.Information;
11
import org.tela_botanica.client.modeles.structure.StructureListe;
11
import org.tela_botanica.client.modeles.structure.StructureListe;
12
import org.tela_botanica.client.util.UtilDAO;
12
import org.tela_botanica.client.util.UtilDAO;
Line 13... Line 13...
13
 
13
 
-
 
14
import com.extjs.gxt.ui.client.Registry;
14
import com.extjs.gxt.ui.client.Registry;
15
import com.extjs.gxt.ui.client.widget.Info;
15
import com.google.gwt.core.client.GWT;
16
import com.google.gwt.core.client.GWT;
16
import com.google.gwt.json.client.JSONArray;
17
import com.google.gwt.json.client.JSONArray;
17
import com.google.gwt.json.client.JSONObject;
18
import com.google.gwt.json.client.JSONObject;
Line 115... Line 116...
115
		});
116
		});
116
	}
117
	}
Line 117... Line 118...
117
	
118
	
118
	private void traiterReponse(JSONValue reponseValeur, String type) {
119
	private void traiterReponse(JSONValue reponseValeur, String type) {
-
 
120
		Information info = new Information(type);
-
 
121
		String message = "";
-
 
122
		String idsNonSuppr = "";
119
		Information info = new Information(type);
123
		
-
 
124
		// Si la requête est un succès, réception d'une chaîne
-
 
125
		if (type.equals("suppression_projet") && reponseValeur.isArray() != null)	{
-
 
126
			JSONArray tableauInfo = reponseValeur.isArray();
-
 
127
			idsNonSuppr = tableauInfo.get(0).isString().stringValue();
120
		// Si la requête est un succès, réception d'une chaîne
128
			
121
		if (reponseValeur.isString() != null) {
129
		} else if (reponseValeur.isString() != null) {
122
			info.setDonnee(reponseValeur.isString().stringValue());
130
			message = reponseValeur.isString().stringValue();
123
		} else {
131
		} else {
124
			info.setDeboguage("La réponse n'est pas une chaine JSON.");
132
			info.setDeboguage("La réponse n'est pas une chaine JSON.");
-
 
133
		}
-
 
134
		info.setDonnee(0, message);
125
		}
135
		info.setDonnee(1, idsNonSuppr);
126
		vueARafraichir.rafraichir(info);
136
		vueARafraichir.rafraichir(info);
127
	}
137
	}
128
}
138
}