Subversion Repositories eFlore/Archives.cel-v1

Rev

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

Rev 13 Rev 14
Line 16... Line 16...
16
package org.tela_botanica.client;
16
package org.tela_botanica.client;
Line 17... Line 17...
17
 
17
 
Line 18... Line 18...
18
import java.util.Date;
18
import java.util.Date;
-
 
19
 
19
 
20
import com.google.gwt.json.client.JSONArray;
20
import com.google.gwt.json.client.JSONArray;
21
import com.google.gwt.json.client.JSONNull;
21
import com.google.gwt.json.client.JSONParser;
22
import com.google.gwt.json.client.JSONParser;
22
import com.google.gwt.json.client.JSONString;
23
import com.google.gwt.json.client.JSONString;
-
 
24
import com.google.gwt.json.client.JSONValue;
23
import com.google.gwt.json.client.JSONValue;
25
import com.google.gwt.user.client.HTTPRequest;
-
 
26
import com.google.gwt.user.client.History;
24
import com.google.gwt.user.client.HTTPRequest;
27
import com.google.gwt.user.client.ResponseTextHandler;
25
import com.google.gwt.user.client.ResponseTextHandler;
28
import com.google.gwt.user.client.Window;
26
import com.google.gwt.user.client.ui.Button;
29
import com.google.gwt.user.client.ui.Button;
27
import com.google.gwt.user.client.ui.ChangeListener;
30
import com.google.gwt.user.client.ui.ChangeListener;
28
import com.google.gwt.user.client.ui.CheckBox;
31
import com.google.gwt.user.client.ui.CheckBox;
Line 81... Line 84...
81
   
84
   
Line 82... Line 85...
82
   
85
   
Line 83... Line 86...
83
   VerticalPanel outer = new VerticalPanel();
86
   VerticalPanel outer = new VerticalPanel();
Line 99... Line 102...
99
 
102
 
100
	nameAssistant = new NameAssistant(mediator);
103
	nameAssistant = new NameAssistant(mediator);
Line -... Line 104...
-
 
104
	locationAssistant = new LocationAssistant(mediator);
-
 
105
	
101
	locationAssistant = new LocationAssistant(mediator);
106
 
Line 102... Line 107...
102
	
107
	
103
 
108
	
104
	// Saisie Nom
109
	// Saisie Nom
Line 284... Line 289...
284
 
289
 
Line 285... Line 290...
285
	 inner.setWidth("100%");
290
	 inner.setWidth("100%");
286
 
291
 
287
	 outer.add(inner);
292
	 outer.add(inner);
Line 288... Line 293...
288
	 outer.setCellWidth(inner, "100%");
293
	 outer.setCellWidth(inner, "100%");
289
	 outer.setSpacing(20);
294
	 outer.setSpacing(10);
Line -... Line 295...
-
 
295
	 
-
 
296
	outer.setHorizontalAlignment(HorizontalPanel.ALIGN_CENTER);
-
 
297
    outer.add(buttonPanel);
-
 
298
 
-
 
299
 
-
 
300
    // Initialisation si provenance d'un lien
-
 
301
    
-
 
302
    if (History.getToken().length()>0) {
-
 
303
 
-
 
304
    	final String anum=History.getToken();
-
 
305
 
-
 
306
		HTTPRequest.asyncGet(serviceBaseUrl + "/Name/" + anum,
-
 
307
				new ResponseTextHandler() {
-
 
308
 
-
 
309
					public void onCompletion(String strcomplete) {
-
 
310
 
-
 
311
						JSONValue jsonValue = JSONParser.parse(strcomplete);
-
 
312
						JSONArray jsonArray;
-
 
313
 
-
 
314
						if ((jsonArray = jsonValue.isArray()) != null) {
-
 
315
		
-
 
316
								String aname = ((JSONString) jsonArray.get(0)).stringValue();
-
 
317
								
-
 
318
								// Nom  
-
 
319
							
-
 
320
								if (aname.compareTo("null")!=0) {
-
 
321
									nameAssistant.setText(((JSONString) jsonArray.get(0)).stringValue());
-
 
322
							
-
 
323
									// Numero nomenclatural 
-
 
324
							
-
 
325
									nameAssistant.setValue(anum);
-
 
326
									
-
 
327
								}
-
 
328
							
-
 
329
						}
-
 
330
					}
-
 
331
 
Line 290... Line 332...
290
	 
332
				});
Line 371... Line 413...
371
 
413
 
Line 372... Line 414...
372
 
414
 
373
							String astation=((JSONString) jsonArray .get(9)).stringValue();
415
							String astation=((JSONString) jsonArray .get(9)).stringValue();
374
							
416
							
375
//							Station 
417
//							Station 
376
							if (astation.compareTo("null")!=0) {
418
							if (astation.compareTo("000null")!=0) {
377
								complementLocation.setText(astation); 
419
								complementLocation.setText(astation); 
378
							}
420
							}
Line 397... Line 439...
397
			}
439
			}
398
		});
440
		});
Line 399... Line 441...
399
 
441
 
Line -... Line 442...
-
 
442
	}
-
 
443
 
-
 
444
	public void setUser(String user) {
Line 400... Line 445...
400
	}
445
		this.user = user;