Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 460 Rev 481
Line 6... Line 6...
6
import com.google.gwt.user.client.ui.FormPanel;
6
import com.google.gwt.user.client.ui.FormPanel;
7
import com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent;
7
import com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent;
8
import com.google.gwt.user.client.ui.FormPanel.SubmitCompleteHandler;
8
import com.google.gwt.user.client.ui.FormPanel.SubmitCompleteHandler;
9
import com.google.gwt.user.client.ui.HTML;
9
import com.google.gwt.user.client.ui.HTML;
10
import com.google.gwt.user.client.ui.HasAlignment;
10
import com.google.gwt.user.client.ui.HasAlignment;
-
 
11
import com.google.gwt.user.client.ui.Hidden;
11
import com.google.gwt.user.client.ui.VerticalPanel;
12
import com.google.gwt.user.client.ui.VerticalPanel;
12
import com.gwtext.client.core.EventObject;
13
import com.gwtext.client.core.EventObject;
13
import com.gwtext.client.widgets.Button;
14
import com.gwtext.client.widgets.Button;
14
import com.gwtext.client.widgets.Window;
15
import com.gwtext.client.widgets.Window;
15
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
16
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
Line 16... Line 17...
16
 
17
 
Line 17... Line 18...
17
public class FormulaireImportObservationVue {
18
public class FormulaireImportObservationVue {
-
 
19
	
-
 
20
	private ObservationMediateur oMediateur = null;
-
 
21
	private  Window nPan = null;
Line 18... Line 22...
18
	
22
	private Hidden identifiant = null;
19
	private ObservationMediateur oMediateur = null;
23
	
20
	
24
	
-
 
25
	public FormulaireImportObservationVue(ObservationMediateur om) {
-
 
26
	
-
 
27
		this.oMediateur = om;
-
 
28
 
Line 21... Line -...
21
	public FormulaireImportObservationVue(ObservationMediateur om) {
-
 
22
		
29
		nPan = new Window("Import d'observations");
23
		this.oMediateur = om;
30
		identifiant = new Hidden();
-
 
31
		identifiant.setName("identifiant");
24
		
32
		
25
		final Window nPan = new Window("Import d'observations");
33
		final FormPanel form = new FormPanel();
26
		final FormPanel form = new FormPanel();
34
		final Button boutonValidation = new Button("envoyer");
27
		final Button boutonValidation = new Button("envoyer");
35
		
Line 34... Line 42...
34
 
42
 
35
		FileUpload upload = new FileUpload();
43
		FileUpload upload = new FileUpload();
36
		upload.setName("upload");
44
		upload.setName("upload");
37
		holder.add(upload);
45
		holder.add(upload);
-
 
46
		holder.add(boutonValidation);
Line 38... Line 47...
38
		holder.add(boutonValidation);
47
		holder.add(identifiant);
Line 39... Line 48...
39
		
48
		
Line 57... Line 66...
57
		
66
		
Line 58... Line 67...
58
		form.addSubmitCompleteHandler(new SubmitCompleteHandler() {
67
		form.addSubmitCompleteHandler(new SubmitCompleteHandler() {
Line -... Line 68...
-
 
68
			
59
			
69
			public void onSubmitComplete(SubmitCompleteEvent event) {
-
 
70
				
60
			public void onSubmitComplete(SubmitCompleteEvent event) {
71
				
61
				
72
				nPan.close();
62
				nPan.close();
73
				com.google.gwt.user.client.Window.alert(""+event.getResults()+" observations créees");
Line -... Line 74...
-
 
74
				oMediateur.obtenirDernierePageObservation();
-
 
75
			}
-
 
76
		});
-
 
77
		
63
				oMediateur.obtenirDernierePageObservation();
78
		
64
			}
79
	}
-
 
80
	
-
 
81
	public void afficher() {
-
 
82
		nPan.show();
-
 
83
	}
-
 
84
	
-
 
85
	public void initialiserUtilisateur(String id) {
Line 65... Line 86...
65
		});
86
		identifiant.setValue(id);