Subversion Repositories eFlore/Applications.cel

Rev

Rev 2432 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2432 Rev 2437
Line 194... Line 194...
194
			rb.sendRequest(null, new RequestCallback() {
194
			rb.sendRequest(null, new RequestCallback() {
Line 195... Line 195...
195
 
195
 
196
				@Override
196
				@Override
197
				public void onResponseReceived(final Request request,
197
				public void onResponseReceived(final Request request,
-
 
198
						final Response response) {
-
 
199
					try {
198
						final Response response) {
200
						
199
					final JSONValue responseValue = JSONParser.parse(response.getText());
201
						final JSONValue responseValue = JSONParser.parse(response.getText());
200
					
202
						
201
					String description = "";
203
						String description = "";
202
					
204
						
203
					JSONObject reponse = responseValue.isObject();
205
						JSONObject reponse = responseValue.isObject();
204
					if(reponse != null && reponse.get("texte") != null && reponse.get("texte").isString() != null) {
206
						if(reponse != null && reponse.get("texte") != null && reponse.get("texte").isString() != null) {
-
 
207
							description = reponse.get("texte").isString().stringValue();
-
 
208
						}
-
 
209
						
-
 
210
						cacheDescription.put(champ, description);
-
 
211
						callback.onSuccess(description);
-
 
212
					} catch(Exception exception) {
205
						description = reponse.get("texte").isString().stringValue();
213
						this.onError(request, exception);
206
					}
-
 
207
					
-
 
208
					cacheDescription.put(champ, description);
-
 
209
					callback.onSuccess(description);
214
					}
Line 210... Line 215...
210
				}
215
				}
211
 
216
 
212
				@Override
217
				@Override
213
				public void onError(Request request, Throwable exception) {
218
				public void onError(Request request, Throwable exception) {
214
					cacheDescription.put(champ, "");
219
					cacheDescription.put(champ, "");
215
					callback.onFailure("");
-
 
216
				}	
220
					callback.onFailure("");
Line 217... Line 221...
217
				
221
				}
218
			});
222
			});
219
			
223