Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 25 Rev 39
Line 5... Line 5...
5
import java.util.Iterator;
5
import java.util.Iterator;
Line 6... Line 6...
6
 
6
 
7
import org.tela_botanica.client.interfaces.Rafraichissable;
7
import org.tela_botanica.client.interfaces.Rafraichissable;
8
import org.tela_botanica.client.modeles.ListeReferentielCommune;
8
import org.tela_botanica.client.modeles.ListeReferentielCommune;
-
 
9
import org.tela_botanica.client.modeles.ListeReferentielNom;
9
import org.tela_botanica.client.modeles.ListeReferentielNom;
10
import org.tela_botanica.client.modeles.Observation;
10
import org.tela_botanica.client.modeles.ReferentielCommune;
11
import org.tela_botanica.client.modeles.ReferentielCommune;
11
import org.tela_botanica.client.modeles.ReferentielNom;
12
import org.tela_botanica.client.modeles.ReferentielNom;
Line -... Line 13...
-
 
13
import org.tela_botanica.client.observation.ObservationMediateur;
12
import org.tela_botanica.client.observation.ObservationMediateur;
14
 
13
 
15
 
14
 
16
import com.google.gwt.user.client.Window;
15
import com.gwtext.client.core.EventCallback;
17
import com.gwtext.client.core.EventCallback;
16
import com.gwtext.client.core.EventObject;
18
import com.gwtext.client.core.EventObject;
Line 54... Line 56...
54
	private TextField lieudit = null;
56
	private TextField lieudit = null;
55
	private TextField station = null;
57
	private TextField station = null;
56
	private TextField milieu = null;
58
	private TextField milieu = null;
57
	private TextField comment = null;
59
	private TextField comment = null;
58
	private ComboBox  commune = null;
60
	private ComboBox  commune = null;
-
 
61
	private String departement = null;
59
	private ComboBox  espece = null;
62
	private ComboBox  espece = null;
-
 
63
	private String numeroNom = null;
Line 60... Line 64...
60
 
64
 
61
	private Button boutonOK = new Button("Ok");
65
	private Button boutonOK = new Button("Ok");
Line 62... Line 66...
62
	private Button boutonAnnuler = new Button("Annuler");
66
	private Button boutonAnnuler = new Button("Annuler");
Line 250... Line 254...
250
		// Listener completion communne 
254
		// Listener completion communne 
Line 251... Line 255...
251
		
255
		
252
		   commune.addListener(new ComboBoxListenerAdapter() {  
256
		   commune.addListener(new ComboBoxListenerAdapter() {  
253
	             public void onSelect(ComboBox comboBox, Record record, int index) {  
257
	             public void onSelect(ComboBox comboBox, Record record, int index) {  
-
 
258
	                 commune.setValue(record.getAsString("commune"));
254
	                 commune.setValue(record.getAsString("commune"));
259
	                 departement=record.getAsString("departement");
255
	                 selectionCommune=true;
260
	                 selectionCommune=true;
256
	             }  
261
	             }  
Line 319... Line 324...
319
 
324
 
320
			
325
			
321
			espece.addListener(new ComboBoxListenerAdapter() {  
326
			espece.addListener(new ComboBoxListenerAdapter() {  
-
 
327
	             public void onSelect(ComboBox comboBox, Record record, int index) {  
322
	             public void onSelect(ComboBox comboBox, Record record, int index) {  
328
	            	 espece.setValue(record.getAsString("nom"));
323
	            	 espece.setValue(record.getAsString("nom"));
329
	            	 numeroNom=record.getAsString("numeroNom");
324
	                 selectionEspece=true;
330
	                 selectionEspece=true;
Line 385... Line 391...
385
		    
391
		    
-
 
392
 
386
 
393
		  
-
 
394
 
387
		  
395
		boutonOK.addListener(new ButtonListenerAdapter() {
-
 
396
			
388
 
397
			public void onClick(Button button, EventObject e) {
-
 
398
				
Line 389... Line 399...
389
		boutonOK.addListener(new ButtonListenerAdapter() {
399
				ajouterObservation();
Line 390... Line 400...
390
			public void onClick(Button button, EventObject e) {
400
				
391
			//observationMediateur.ajouterObservation(this);
401
			}
Line 536... Line 546...
536
	  observationMediateur.obtenirListeReferentielNom(this,esp);
546
	  observationMediateur.obtenirListeReferentielNom(this,esp);
Line 537... Line 547...
537
	 
547
	 
Line -... Line 548...
-
 
548
	}
538
	}
549
   
-
 
550
 
-
 
551
	public void ajouterObservation() {
539
   
552
 
-
 
553
 
-
 
554
		Observation obs=new Observation(espece.getText(),numeroNom,commune.getText(),departement,lieudit.getText(),station.getText(),milieu.getText(), comment.getText(),date.getText());
Line 540... Line 555...
540
 
555