Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 989 Rev 1293
Line 2... Line 2...
2
 
2
 
3
import org.tela_botanica.client.image.ImageModele;
3
import org.tela_botanica.client.image.ImageModele;
4
import org.tela_botanica.client.interfaces.Rafraichissable;
4
import org.tela_botanica.client.interfaces.Rafraichissable;
5
import org.tela_botanica.client.modeles.objets.Configuration;
5
import org.tela_botanica.client.modeles.objets.Configuration;
6
import org.tela_botanica.client.modeles.objets.ListeDate;
-
 
Line 7... Line -...
7
import org.tela_botanica.client.observation.ObservationModele;
-
 
8
 
6
import org.tela_botanica.client.modeles.objets.ListeDate;
9
import com.google.gwt.core.client.GWT;
7
 
10
import com.google.gwt.http.client.Request;
8
import com.google.gwt.http.client.Request;
11
import com.google.gwt.http.client.RequestBuilder;
9
import com.google.gwt.http.client.RequestBuilder;
12
import com.google.gwt.http.client.RequestCallback;
10
import com.google.gwt.http.client.RequestCallback;
13
import com.google.gwt.http.client.RequestException;
-
 
14
import com.google.gwt.http.client.Response;
11
import com.google.gwt.http.client.RequestException;
15
import com.google.gwt.http.client.URL;
12
import com.google.gwt.http.client.Response;
16
import com.google.gwt.json.client.JSONArray;
-
 
17
import com.google.gwt.json.client.JSONParser;
13
import com.google.gwt.json.client.JSONArray;
18
import com.google.gwt.json.client.JSONString;
-
 
Line 19... Line 14...
19
import com.google.gwt.json.client.JSONValue;
14
import com.google.gwt.json.client.JSONParser;
Line 20... Line 15...
20
import com.google.gwt.user.client.Window;
15
import com.google.gwt.json.client.JSONValue;
21
 
16
 
Line 54... Line 49...
54
	
49
	
Line 55... Line 50...
55
		try {
50
		try {
Line -... Line 51...
-
 
51
			
56
			
52
			rb.sendRequest(null, new RequestCallback() {
57
			rb.sendRequest(null, new RequestCallback() {
53
 
58
 
-
 
59
				public void onError(final Request request, final Throwable exception) {
54
				@Override
Line -... Line 55...
-
 
55
				public void onError(final Request request, final Throwable exception) {
60
					// TODO Auto-generated method stub
56
					// TODO Auto-generated method stub				
61
					
57
				}
Line 62... Line 58...
62
				}
58
 
63
 
-
 
64
				public void onResponseReceived(final Request request,
59
				@Override
65
						final Response response) {
-
 
66
					
60
				public void onResponseReceived(final Request request,
67
					final ListeDate lDateObs;
-
 
Line 68... Line 61...
68
										
61
						final Response response) {
69
					final JSONValue responseValue = JSONParser.parse(response.getText());
-
 
70
					
-
 
71
					JSONArray reponse = responseValue.isArray();
62
					
72
 
-
 
73
		
-
 
74
					// si c'est un tableau
-
 
75
					if ((reponse) != null) {
-
 
76
						
-
 
77
						lDateObs = new ListeDate(reponse);
-
 
78
						
63
					final ListeDate lDateObs;								
79
					} else {
64
					final JSONValue responseValue = JSONParser.parse(response.getText());		
80
						
65
					JSONArray reponse = responseValue.isArray();
81
						lDateObs = new ListeDate(0);
66