Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 2568 Rev 2602
Line 12... Line 12...
12
 
12
 
13
import org.tela_botanica.client.modeles.objets.ChampEtendu;
13
import org.tela_botanica.client.modeles.objets.ChampEtendu;
Line 14... Line 14...
14
import org.tela_botanica.client.modeles.objets.Observation;
14
import org.tela_botanica.client.modeles.objets.Observation;
-
 
15
 
15
 
16
import com.google.gwt.dom.client.Element;
16
import com.google.gwt.dom.client.Element;
17
import com.google.gwt.http.client.Response;
-
 
18
import com.google.gwt.json.client.JSONArray;
17
import com.google.gwt.json.client.JSONArray;
19
import com.google.gwt.json.client.JSONObject;
-
 
20
import com.google.gwt.json.client.JSONParser;
18
import com.google.gwt.json.client.JSONObject;
21
import com.google.gwt.json.client.JSONString;
19
import com.google.gwt.json.client.JSONString;
22
import com.google.gwt.json.client.JSONValue;
Line 20... Line 23...
20
import com.google.gwt.user.client.DOM;
23
import com.google.gwt.user.client.DOM;
Line 436... Line 439...
436
	}
439
	}
Line 437... Line 440...
437
 
440
 
438
	public static void curseurParDefaut() {
441
	public static void curseurParDefaut() {
439
		RootPanel.getBodyElement().getStyle().setProperty("cursor", "default");
442
		RootPanel.getBodyElement().getStyle().setProperty("cursor", "default");
-
 
443
	}
-
 
444
	
-
 
445
	public static Map<String, String> parserRetourReferentielPerso(Response response) {
-
 
446
		final Map<String, String> referentielData = new HashMap<String, String>();
-
 
447
		final JSONValue responseValue = JSONParser.parse(response.getText());
-
 
448
		
-
 
449
		JSONArray reponse = null;
-
 
450
 
-
 
451
		// si c'est un tableau
-
 
452
		if ((reponse = responseValue.isArray()) != null) {
-
 
453
			
-
 
454
			JSONString elementsRef;
-
 
455
			final int taillemax = reponse.size();
-
 
456
			
-
 
457
			for (int i = 0; i < taillemax; i++) {
-
 
458
				if ((elementsRef = reponse.get(i).isString()) != null) {
-
 
459
					
-
 
460
					String valeur = elementsRef.stringValue();
-
 
461
					referentielData.put(i+"", valeur);
-
 
462
							
-
 
463
				}	
-
 
464
			}
-
 
465
		}
-
 
466
		return referentielData;
440
	}
467
	}