Subversion Repositories eFlore/Archives.cel-v2

Rev

Rev 8 | Rev 13 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8 Rev 9
1
/**
1
/**
2
 David Delon david.delon@clapas.net 2007
2
 David Delon david.delon@clapas.net 2007
3
 
3
 
4
 */
4
 */
5
 
5
 
6
 
6
 
7
/*
7
/*
8
 * ListeObservationsVue.java  (Composite de Panel)
8
 * ListeObservationsVue.java  (Composite de Panel)
9
 *
9
 *
10
 * Cas d'utilisation :
10
 * Cas d'utilisation :
11
 * 
11
 * 
12
 * Affichage de releve 
12
 * Affichage de releve 
13
 *
13
 *
14
 * 1 : Recherche du nombre de releves associe au navigateur ou a l'utilisateur est connecte, en fonction des criteres de selection
14
 * 1 : Recherche du nombre de releves associe au navigateur ou a l'utilisateur est connecte, en fonction des criteres de selection
15
 * 2 : Recherche des releves correspondant au critere precedent
15
 * 2 : Recherche des releves correspondant au critere precedent
16
 * 3 : Affichage des releves avec positionnement sur le dernier releve
16
 * 3 : Affichage des releves avec positionnement sur le dernier releve
17
 * 
17
 * 
18
 * Selection de releve
18
 * Selection de releve
19
 * 
19
 * 
20
 * 1 : L'utilisateur selectionne un releve : lancement de l'affichage detaille pour le releve selectionne
20
 * 1 : L'utilisateur selectionne un releve : lancement de l'affichage detaille pour le releve selectionne
21
 * 
21
 * 
22
 * 
22
 * 
23
 * Pagination :
23
 * Pagination :
24
 * 
24
 * 
25
 * 1 : Avancement ou recul d'une page
25
 * 1 : Avancement ou recul d'une page
26
 *
26
 *
27
 *
27
 *
28
 * 
28
 * 
29
 *  Suppression d'une liste d'element 
29
 *  Suppression d'une liste d'element 
30
 */
30
 */
31
 
31
 
32
 
32
 
33
/* Actions declenchees :
33
/* Actions declenchees :
34
 * 
34
 * 
35
 * onInventoryItemSelected(numero d'ordre de la ligne selectionne) : selection d'une ligne
35
 * onInventoryItemSelected(numero d'ordre de la ligne selectionne) : selection d'une ligne
36
 * onInventoryItemUnselected(numero d'ordre de la ligne selectionne) : deselection d'une ligne
36
 * onInventoryItemUnselected(numero d'ordre de la ligne selectionne) : deselection d'une ligne
37
 * onInventoryUpdated(localite) : action suite a la modification, suppression, creation d'un element d'inventaire
37
 * onInventoryUpdated(localite) : action suite a la modification, suppression, creation d'un element d'inventaire
38
 * 
38
 * 
39
 */
39
 */
40
 
40
 
41
 
41
 
42
package org.tela_botanica.client.observation;
42
package org.tela_botanica.client.observation;
43
 
43
 
44
 
44
 
45
import org.tela_botanica.client.modeles.Observation;
45
import org.tela_botanica.client.modeles.Observation;
46
 
-
 
47
import net.mygwt.ui.client.Events;
-
 
48
import net.mygwt.ui.client.Style;
-
 
49
import net.mygwt.ui.client.event.BaseEvent;
-
 
50
import net.mygwt.ui.client.event.Listener;
-
 
51
import net.mygwt.ui.client.widget.ContentPanel;
-
 
52
import net.mygwt.ui.client.widget.layout.FillLayout;
-
 
53
import net.mygwt.ui.client.widget.table.Table;
-
 
54
import net.mygwt.ui.client.widget.table.TableColumn;
-
 
55
import net.mygwt.ui.client.widget.table.TableColumnModel;
-
 
56
import net.mygwt.ui.client.widget.table.TableItem;
46
 
57
 
47
 
58
import com.google.gwt.user.client.HTTPRequest;
48
import com.google.gwt.user.client.HTTPRequest;
59
import com.google.gwt.user.client.ResponseTextHandler;
49
import com.google.gwt.user.client.ResponseTextHandler;
60
import com.google.gwt.user.client.ui.Composite;
50
import com.google.gwt.user.client.ui.Composite;
61
import com.google.gwt.user.client.ui.DockPanel;
51
import com.google.gwt.user.client.ui.DockPanel;
62
import com.google.gwt.user.client.ui.HorizontalPanel;
52
import com.google.gwt.user.client.ui.HorizontalPanel;
63
import com.google.gwt.user.client.ui.Button;
53
import com.google.gwt.user.client.ui.Button;
64
import com.google.gwt.user.client.ui.Label;
54
import com.google.gwt.user.client.ui.Label;
65
import com.google.gwt.user.client.ui.Widget;
55
import com.google.gwt.user.client.ui.Widget;
66
import com.google.gwt.user.client.ui.ClickListener;
56
import com.google.gwt.user.client.ui.ClickListener;
67
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
57
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
68
import com.google.gwt.user.client.ui.HasVerticalAlignment;
58
import com.google.gwt.user.client.ui.HasVerticalAlignment;
69
 
59
 
70
 
60
 
71
public class ListeObservationsVue extends Composite implements Listener
61
public class ListeObservationsVue extends Composite
72
		 {
62
		 {
73
 
63
 
74
	// Debut Barre de navigation
64
	// Debut Barre de navigation
75
 
65
 
76
	private class NavBar extends Composite implements ClickListener {
66
	private class NavBar extends Composite implements ClickListener {
77
 
67
 
78
		
68
		
79
		public final DockPanel bar = new DockPanel();
69
		public final DockPanel bar = new DockPanel();
80
		
70
		
81
 
71
 
82
		public final Button gotoFirst = new Button("<<", this);
72
		public final Button gotoFirst = new Button("<<", this);
83
		public final Button gotoNext = new Button(">", this);
73
		public final Button gotoNext = new Button(">", this);
84
		public final Button gotoPrev = new Button("<", this);
74
		public final Button gotoPrev = new Button("<", this);
85
		public final Button gotoEnd = new Button(">>", this);
75
		public final Button gotoEnd = new Button(">>", this);
86
		public final Label status = new Label();
76
		public final Label status = new Label();
87
		
77
		
88
 
78
 
89
		public NavBar() {
79
		public NavBar() {
90
			
80
			
91
			initWidget(bar);
81
			initWidget(bar);
92
			
82
			
93
			status.setWordWrap(false);
83
			status.setWordWrap(false);
94
 
84
 
95
			HorizontalPanel buttons = new HorizontalPanel();
85
			HorizontalPanel buttons = new HorizontalPanel();
96
			
86
			
97
			buttons.add(status);
87
			buttons.add(status);
98
			buttons.setCellHorizontalAlignment(status, HasHorizontalAlignment.ALIGN_RIGHT);
88
			buttons.setCellHorizontalAlignment(status, HasHorizontalAlignment.ALIGN_RIGHT);
99
			buttons.setCellVerticalAlignment(status, HasVerticalAlignment.ALIGN_MIDDLE);
89
			buttons.setCellVerticalAlignment(status, HasVerticalAlignment.ALIGN_MIDDLE);
100
 
90
 
101
 
91
 
102
			buttons.add(gotoFirst);
92
			buttons.add(gotoFirst);
103
			buttons.add(gotoPrev);
93
			buttons.add(gotoPrev);
104
			buttons.add(gotoNext);
94
			buttons.add(gotoNext);
105
			buttons.add(gotoEnd);
95
			buttons.add(gotoEnd);
106
			
96
			
107
			bar.add(buttons, DockPanel.EAST);
97
			bar.add(buttons, DockPanel.EAST);
108
 
98
 
109
			
99
			
110
		}
100
		}
111
		
101
		
112
 
102
 
113
		public void onClick(Widget sender) {
103
		public void onClick(Widget sender) {
114
			if (sender == gotoNext) {
104
			if (sender == gotoNext) {
115
				// Move forward a page.
105
				// Move forward a page.
116
				startIndex += VISIBLE_TAXON_COUNT;
106
				startIndex += VISIBLE_TAXON_COUNT;
117
				if (startIndex >= count)
107
				if (startIndex >= count)
118
					startIndex -= VISIBLE_TAXON_COUNT;
108
					startIndex -= VISIBLE_TAXON_COUNT;
119
			} else {
109
			} else {
120
				if (sender == gotoPrev) {
110
				if (sender == gotoPrev) {
121
					// Move back a page.
111
					// Move back a page.
122
					startIndex -= VISIBLE_TAXON_COUNT;
112
					startIndex -= VISIBLE_TAXON_COUNT;
123
					if (startIndex < 0)
113
					if (startIndex < 0)
124
						startIndex = 0;
114
						startIndex = 0;
125
				} else {
115
				} else {
126
					if (sender == gotoEnd) {
116
					if (sender == gotoEnd) {
127
						gotoEnd();
117
						gotoEnd();
128
					} else {
118
					} else {
129
						if (sender == gotoFirst) {
119
						if (sender == gotoFirst) {
130
							startIndex = 0;
120
							startIndex = 0;
131
						}
121
						}
132
					}
122
					}
133
				}
123
				}
134
			}
124
			}
135
			getListeObservation();
125
			getListeObservation();
136
		}
126
		}
137
 
127
 
138
	}
128
	}
139
 
129
 
140
	// Fin Barre de navigation
130
	// Fin Barre de navigation
141
 
131
 
142
	// Conteneur (header et table sont dans panel)
132
	// Conteneur (header et table sont dans panel)
143
	private ContentPanel panel =null;
133
//	private ContentPanel panel =null;
144
	private Table table = null;
134
//	private Table table = null;
145
	
135
	
146
	// Services 
136
	// Services 
147
	private String serviceBaseUrl = null;
137
	private String serviceBaseUrl = null;
148
	private String user;
138
	private String user;
149
	private ObservationMediateur observationMediateur = null;
139
	private ObservationMediateur observationMediateur = null;
150
 
140
 
151
	// Navigation
141
	// Navigation
152
	private int startIndex = 0;
142
	private int startIndex = 0;
153
	private int count = 0;
143
	private int count = 0;
154
	private static final int VISIBLE_TAXON_COUNT = 15;
144
	private static final int VISIBLE_TAXON_COUNT = 15;
155
	private NavBar navBar=null;
145
	private NavBar navBar=null;
156
 
146
 
157
	// Filtre par defaut :
147
	// Filtre par defaut :
158
	
148
	
159
	private String identifiantLocalite = "all";
149
	private String identifiantLocalite = "all";
160
	private String localite = "all";
150
	private String localite = "all";
161
	private String annee = "all";
151
	private String annee = "all";
162
	private String mois = "all";
152
	private String mois = "all";
163
	private String jour = "all";
153
	private String jour = "all";
164
	private String rechercheLibre = "all";
154
	private String rechercheLibre = "all";
165
	private String lieudit = "all";
155
	private String lieudit = "all";
166
	private String ordre= null;
156
	private String ordre= null;
167
	
157
	
168
	
158
	
169
 
159
 
170
 
160
 
171
	public ListeObservationsVue(ObservationMediateur observationMediateur) {
161
	public ListeObservationsVue(ObservationMediateur observationMediateur) {
172
		
162
		
173
		
163
		
174
		// Traitement contexte utilisateur et service
164
		// Traitement contexte utilisateur et service
175
 
165
 
176
		this.observationMediateur=observationMediateur;
166
		this.observationMediateur=observationMediateur;
177
 
167
 
178
	    
168
	    
179
	    panel= new ContentPanel(Style.HEADER);
169
	//    panel= new ContentPanel(Style.HEADER);
180
	    panel.setLayout(new FillLayout());
170
	  //  panel.setLayout(new FillLayout());
181
	    
171
	    
182
	    
172
	    
183
	    // Barre navigation integree au header 
173
	    // Barre navigation integree au header 
184
	    
174
	    
185
		navBar = new NavBar();
175
		navBar = new NavBar();
186
		panel.getHeader().addWidget(navBar);
176
	//	panel.getHeader().addWidget(navBar);
187
 
177
 
188
		
178
		
189
		//  Contenu :
179
		//  Contenu :
190
		
180
		
191
		
181
		
192
		//  Colonnes :
182
		//  Colonnes :
193
		
183
		
194
		TableColumn[] columns = new TableColumn[6]; 
184
//		TableColumn[] columns = new TableColumn[6]; 
195
		
185
		
196
		// TODO : renderer date, alignement etc
186
		// TODO : renderer date, alignement etc
197
		
187
	/*	
198
		columns[0] = new TableColumn("etat","Aransmis", 50);  
188
		columns[0] = new TableColumn("etat","Aransmis", 50);  
199
 
189
 
200
		columns[1] = new TableColumn("nom","Nom saisi", 250);  
190
		columns[1] = new TableColumn("nom","Nom saisi", 250);  
201
		
191
		
202
		columns[2] = new TableColumn("nomr","Nom retenu", 250);  
192
		columns[2] = new TableColumn("nomr","Nom retenu", 250);  
203
 
193
 
204
		columns[3] = new TableColumn("lieu","Lieu", 350);  
194
		columns[3] = new TableColumn("lieu","Lieu", 350);  
205
 
195
 
206
		columns[4] = new TableColumn("date","Date", 75);  
196
		columns[4] = new TableColumn("date","Date", 75);  
207
 
197
 
208
		columns[5] = new TableColumn("ordre","Ordre", 50);  
198
		columns[5] = new TableColumn("ordre","Ordre", 50);  
209
		
199
		
210
	
200
	
211
		TableColumnModel cm = new TableColumnModel(columns);  
201
		TableColumnModel cm = new TableColumnModel(columns);  
212
		
202
		
213
		// Table : 
203
		// Table : 
214
		
204
		
215
		table = new Table(Style.MULTI | Style.HORIZONTAL, cm);  
205
		table = new Table(Style.MULTI | Style.HORIZONTAL, cm);  
216
		table.setBorders(false);  
206
		table.setBorders(false);  
217
		
207
		
218
		
208
		
219
		panel.add(table);
209
		panel.add(table);
220
		
210
		
221
		
211
		
222
 
212
 
223
		// Selection d'une ligne 
213
		// Selection d'une ligne 
224
		table.addListener(Events.RowClick, new Listener() {
214
		table.addListener(Events.RowClick, new Listener() {
225
 
215
 
226
		      public void handleEvent(BaseEvent be) {
216
		      public void handleEvent(BaseEvent be) {
227
		        TableItem item=(TableItem) be.item;
217
		        TableItem item=(TableItem) be.item;
228
		        if (item!=null) {
218
		        if (item!=null) {
229
		        	if (ordre==null) { // Affichage de la ligne selectionne
219
		        	if (ordre==null) { // Affichage de la ligne selectionne
230
		        		ordre= (String) item.getValue(5);
220
		        		ordre= (String) item.getValue(5);
231
	//	        		observationMediateur.onInventoryItemSelected(ordre);
221
	//	        		observationMediateur.onInventoryItemSelected(ordre);
232
		        	}
222
		        	}
233
		        	else { 
223
		        	else { 
234
		        		// Si une ligne etait deja selectionne 
224
		        		// Si une ligne etait deja selectionne 
235
		        		if (ordre.compareTo((String) item.getValue(5))==0) { // C'est la meme, on la deselectionne
225
		        		if (ordre.compareTo((String) item.getValue(5))==0) { // C'est la meme, on la deselectionne
236
		        			ordre=null;
226
		        			ordre=null;
237
		        			table.deselect(be.rowIndex);
227
		        			table.deselect(be.rowIndex);
238
		//        			observationMediateur.onInventoryItemUnselected();
228
		//        			observationMediateur.onInventoryItemUnselected();
239
		        		}
229
		        		}
240
		        		else {
230
		        		else {
241
			        		ordre= (String) item.getValue(5); // C'est une autre, on la selectionne
231
			        		ordre= (String) item.getValue(5); // C'est une autre, on la selectionne
242
//		        			observationMediateur.onInventoryItemSelected(ordre);
232
//		        			observationMediateur.onInventoryItemSelected(ordre);
243
		        		}
233
		        		}
244
		        		
234
		        		
245
		        	}
235
		        	}
246
		        }
236
		        }
247
		      }
237
		      }
248
		});
238
		});
249
		
239
		*/
250
	
240
	
251
	 initWidget(panel);
241
	// initWidget(panel);
252
 
242
 
253
 
243
 
254
	}
244
	}
255
	
245
	
256
	
246
	
257
	/**
247
	/**
258
	 * Suppression d'un ensemble d'element de la liste d'inventaire, on garde ici car s'applique a plusieurs elements
248
	 * Suppression d'un ensemble d'element de la liste d'inventaire, on garde ici car s'applique a plusieurs elements
259
	 * 
249
	 * 
260
	 */
250
	 */
261
 
251
 
262
	public void deleteElement() {
252
	public void deleteElement() {
263
 
253
/*
264
		setStatusDisabled();
254
		setStatusDisabled();
265
		TableItem[] selection=table.getSelection();
255
		TableItem[] selection=table.getSelection();
266
 
256
 
267
		StringBuffer ids=new StringBuffer();
257
		StringBuffer ids=new StringBuffer();
268
		for (int i = 0; i < selection.length; i++) {
258
		for (int i = 0; i < selection.length; i++) {
269
			ids.append((String)(((TableItem) selection[i]).getValue(5)));
259
			ids.append((String)(((TableItem) selection[i]).getValue(5)));
270
			if (i<(selection.length-1)) ids.append(",");
260
			if (i<(selection.length-1)) ids.append(",");
271
		} 
261
		} 
272
		
262
		
273
		if (ids.length()>0) {
263
		if (ids.length()>0) {
274
			
264
			
275
			HTTPRequest.asyncPost(serviceBaseUrl + "/Inventory/" + user
265
			HTTPRequest.asyncPost(serviceBaseUrl + "/Inventory/" + user
276
							+ "/" + ids.toString(), "action=DELETE",
266
							+ "/" + ids.toString(), "action=DELETE",
277
							
267
							
278
							new ResponseTextHandler() {
268
							new ResponseTextHandler() {
279
								public void onCompletion(String str) {
269
								public void onCompletion(String str) {
280
	//										observationMediateur.onInventoryUpdated(identifiantLocalite,"all","all");
270
	//										observationMediateur.onInventoryUpdated(identifiantLocalite,"all","all");
281
		//									observationMediateur.getEntryView().clear();
271
		//									observationMediateur.getEntryView().clear();
282
								}
272
								}
283
							});
273
							});
284
		}
274
		}
285
	
275
	
286
		setStatusEnabled();
276
		setStatusEnabled();
287
 
277
*/
288
	}
278
	}
289
	
279
	
290
	
280
	
291
	
281
	
292
	
282
	
293
	/**
283
	/**
294
	 * Transmission de releve a Tela, on garde ici car s'applique a plusieurs elements
284
	 * Transmission de releve a Tela, on garde ici car s'applique a plusieurs elements
295
	 */
285
	 */
296
 
286
 
297
	
287
	
298
	public void transmitElement() {
288
	public void transmitElement() {
299
	
289
	
300
		setStatusDisabled();
290
		setStatusDisabled();
301
		
291
		
302
		TableItem[] selection=table.getSelection();
292
/*		TableItem[] selection=table.getSelection();
303
 
293
 
304
		StringBuffer ids=new StringBuffer();
294
		StringBuffer ids=new StringBuffer();
305
		for (int i = 0; i < selection.length; i++) {
295
		for (int i = 0; i < selection.length; i++) {
306
			ids.append((String)(((TableItem) selection[i]).getValue(5)));
296
			ids.append((String)(((TableItem) selection[i]).getValue(5)));
307
			if (i<(selection.length-1)) ids.append(",");
297
			if (i<(selection.length-1)) ids.append(",");
308
		} 
298
		} 
309
		
299
	
310
		if (ids.length()>0) {
300
		if (ids.length()>0) {
311
		
301
		
312
			HTTPRequest.asyncPost(serviceBaseUrl + "/InventoryTransmit/" + user
302
			HTTPRequest.asyncPost(serviceBaseUrl + "/InventoryTransmit/" + user
313
							+ "/" + ids.toString(), "transmission=1",
303
							+ "/" + ids.toString(), "transmission=1",
314
							
304
							
315
							new ResponseTextHandler() {
305
							new ResponseTextHandler() {
316
								public void onCompletion(String str) {
306
								public void onCompletion(String str) {
317
											getListeObservation(); // Pour affichage logo 
307
											getListeObservation(); // Pour affichage logo 
318
								}
308
								}
319
							});
309
							});
320
		}
310
		}
321
	
311
	
322
		setStatusEnabled();
312
		setStatusEnabled();
323
 
313
 
324
		
314
		*/
325
	}
315
	}
326
	
316
	
327
	
317
	
328
	/**
318
	/**
329
	 * Recherche nombre d'enregistrement pour l'utilisateur et la localite en cours
319
	 * Recherche nombre d'enregistrement pour l'utilisateur et la localite en cours
330
	 * 
320
	 * 
331
	 */
321
	 */
332
	
322
	
333
	public void initialiser() {
323
	public void initialiser() {
334
		
324
		
335
		setStatusDisabled();
325
		setStatusDisabled();
336
 
326
 
337
		observationMediateur.addListener(ObservationMediateur.NOMBRE_OBSERVATION,this);
327
	//	observationMediateur.addListener(ObservationMediateur.NOMBRE_OBSERVATION,this);
338
		observationMediateur.getNombreObservation(identifiantLocalite,localite,annee, mois, jour ,lieudit,rechercheLibre); // Retour dans handlevent() NOMBRE_OBSERVATION
328
		observationMediateur.getNombreObservation(identifiantLocalite,localite,annee, mois, jour ,lieudit,rechercheLibre); // Retour dans handlevent() NOMBRE_OBSERVATION
339
 
329
 
340
		
330
		
341
	}
331
	}
342
	
332
	
343
	/**
333
	/**
344
	 * Mise a jour de l'affichage, a partir des donnaes d'inventaire deja
334
	 * Mise a jour de l'affichage, a partir des donnaes d'inventaire deja
345
	 * saisies. La valeur de this.startIndex permet de determiner quelles
335
	 * saisies. La valeur de this.startIndex permet de determiner quelles
346
	 * donnaes seront affichees
336
	 * donnaes seront affichees
347
	 * 
337
	 * 
348
	 */
338
	 */
349
 
339
 
350
	public void getListeObservation() {
340
	public void getListeObservation() {
351
 
341
 
352
		observationMediateur.addListener(ObservationMediateur.LISTE_OBSERVATION,this);
342
	//	observationMediateur.addListener(ObservationMediateur.LISTE_OBSERVATION,this);
353
		observationMediateur.getListeObservation(identifiantLocalite,localite,annee, mois, jour ,lieudit,rechercheLibre, startIndex, VISIBLE_TAXON_COUNT); // Retour dans handlevent() LISTE_OBSERVATION
343
		observationMediateur.getListeObservation(identifiantLocalite,localite,annee, mois, jour ,lieudit,rechercheLibre, startIndex, VISIBLE_TAXON_COUNT); // Retour dans handlevent() LISTE_OBSERVATION
354
		
344
		
355
	}
345
	}
356
	
346
	
357
	public void afficherListeObservation() {
347
	public void afficherListeObservation() {
358
 
348
 
359
		Observation[] listeObservation =observationMediateur.getObservation().getListeObservation();
349
		Observation[] listeObservation =observationMediateur.getObservation().getListeObservation();
360
		
350
		
361
		for (int i=0;i<listeObservation.length;i++) {
351
		for (int i=0;i<listeObservation.length;i++) {
362
		
352
		
363
			Object[] values = new Object[6];
353
			Object[] values = new Object[6];
364
			values[0]="0";
354
			values[0]="0";
365
			values[2]="2";
355
			values[2]="2";
366
			values[3]="3";
356
			values[3]="3";
367
			values[4]="4";
357
			values[4]="4";
368
			values[5]="5";
358
			values[5]="5";
369
			values[1]=listeObservation[i].getNomSaisi();
359
			values[1]=listeObservation[i].getNomSaisi();
370
			
360
			
371
    		table.add(new TableItem(values));
361
    	//	table.add(new TableItem(values));
372
			
362
			
373
		}
363
		}
374
		
364
		
375
//      Ligne d'information 
365
//      Ligne d'information 
376
 
366
 
377
		// Toutes date par defaut
367
		// Toutes date par defaut
378
/*		
368
/*		
379
 
369
 
380
		HTTPRequest.asyncGet(serviceBaseUrl + "/InventoryItemList/" + user + "/" + identifiantLocalite + "/" + URL.encodeComponent(localite) +"/" + annee  + "/"  + mois  + "/"  + jour   + "/" + URL.encodeComponent(rechercheLibre) + "/" + URL.encodeComponent(lieudit) + "/"
370
		HTTPRequest.asyncGet(serviceBaseUrl + "/InventoryItemList/" + user + "/" + identifiantLocalite + "/" + URL.encodeComponent(localite) +"/" + annee  + "/"  + mois  + "/"  + jour   + "/" + URL.encodeComponent(rechercheLibre) + "/" + URL.encodeComponent(lieudit) + "/"
381
				+ startIndex + "/" + VISIBLE_TAXON_COUNT,
371
				+ startIndex + "/" + VISIBLE_TAXON_COUNT,
382
 
372
 
383
		new ResponseTextHandler() {
373
		new ResponseTextHandler() {
384
 
374
 
385
			public void onCompletion(String str) {
375
			public void onCompletion(String str) {
386
 
376
 
387
				JSONValue jsonValue = JSONParser.parse(str);
377
				JSONValue jsonValue = JSONParser.parse(str);
388
				JSONArray jsonArray;
378
				JSONArray jsonArray;
389
				JSONArray jsonArrayNested;
379
				JSONArray jsonArrayNested;
390
				
380
				
391
				int i=0;
381
				int i=0;
392
 
382
 
393
				if ((jsonArray = jsonValue.isArray()) != null) {
383
				if ((jsonArray = jsonValue.isArray()) != null) {
394
					
384
					
395
					StringBuffer lieu=null;
385
					StringBuffer lieu=null;
396
 
386
 
397
					int arraySize = jsonArray.size();
387
					int arraySize = jsonArray.size();
398
					
388
					
399
					for (i = 0; i < arraySize; ++i) {
389
					for (i = 0; i < arraySize; ++i) {
400
						if ((jsonArrayNested = jsonArray.get(i).isArray()) != null) {
390
						if ((jsonArrayNested = jsonArray.get(i).isArray()) != null) {
401
							
391
							
402
 
392
 
403
							Object[] values = new Object[6];
393
							Object[] values = new Object[6];
404
							
394
							
405
													
395
													
406
							// Statut Observation transmise ?
396
							// Statut Observation transmise ?
407
							
397
							
408
							String atransmit=((JSONString) jsonArrayNested .get(13)).stringValue();
398
							String atransmit=((JSONString) jsonArrayNested .get(13)).stringValue();
409
							
399
							
410
							if (atransmit.compareTo("1")==0) {
400
							if (atransmit.compareTo("1")==0) {
411
								values[0] = new Image("tela.gif");
401
								values[0] = new Image("tela.gif");
412
							}
402
							}
413
							else {
403
							else {
414
								values[0] = new HTML("&nbsp;");
404
								values[0] = new HTML("&nbsp;");
415
							}
405
							}
416
							
406
							
417
						
407
						
418
							// Nom saisi
408
							// Nom saisi
419
							
409
							
420
							values[1] = new HTML("<b>"+Util.toCelString(((JSONString) jsonArrayNested .get(0)).toString())+"</b>");
410
							values[1] = new HTML("<b>"+Util.toCelString(((JSONString) jsonArrayNested .get(0)).toString())+"</b>");
421
							
411
							
422
							
412
							
423
 
413
 
424
							// Nom retenu
414
							// Nom retenu
425
							String aname=Util.toCelString(((JSONString) jsonArrayNested .get(2)).toString());
415
							String aname=Util.toCelString(((JSONString) jsonArrayNested .get(2)).toString());
426
							
416
							
427
							if (aname.compareTo("null")==0) {
417
							if (aname.compareTo("null")==0) {
428
								values[2] = new HTML("&nbsp;");
418
								values[2] = new HTML("&nbsp;");
429
							}
419
							}
430
							else {
420
							else {
431
								values[2] = new HTML(aname);
421
								values[2] = new HTML(aname);
432
							}
422
							}
433
							/*
423
							/*
434
							 
424
							 
435
							 /*
425
							 /*
436
							// Num nomenclatural
426
							// Num nomenclatural
437
							String ann=((JSONString) jsonArrayNested .get(3)).stringValue();
427
							String ann=((JSONString) jsonArrayNested .get(3)).stringValue();
438
							
428
							
439
							if (ann.compareTo("0")!=0) {
429
							if (ann.compareTo("0")!=0) {
440
								observationText.append(""+ann+"-");
430
								observationText.append(""+ann+"-");
441
							}
431
							}
442
							else {
432
							else {
443
								observationText.append("0-");
433
								observationText.append("0-");
444
							}
434
							}
445
							
435
							
446
							
436
							
447
							// Num Taxonomique
437
							// Num Taxonomique
448
							
438
							
449
							String ant=((JSONString) jsonArrayNested .get(4)).stringValue();
439
							String ant=((JSONString) jsonArrayNested .get(4)).stringValue();
450
							
440
							
451
							if (ant.compareTo("0")!=0) {
441
							if (ant.compareTo("0")!=0) {
452
								observationText.append(ant+", ");
442
								observationText.append(ant+", ");
453
							}
443
							}
454
							else {
444
							else {
455
								observationText.append("0, ");
445
								observationText.append("0, ");
456
							}
446
							}
457
							
447
							
458
							// Famille
448
							// Famille
459
							
449
							
460
							
450
							
461
							String afamily=Util.toCelString(((JSONString) jsonArrayNested .get(5)).toString());
451
							String afamily=Util.toCelString(((JSONString) jsonArrayNested .get(5)).toString());
462
							
452
							
463
							if (afamily.compareTo("null")==0) {
453
							if (afamily.compareTo("null")==0) {
464
								//
454
								//
465
							}
455
							}
466
							else {
456
							else {
467
								observationText.append(afamily+", ");
457
								observationText.append(afamily+", ");
468
							}
458
							}
469
							*/
459
							*/
470
		/*
460
		/*
471
		
461
		
472
//							Localisation - Lieu
462
//							Localisation - Lieu
473
 
463
 
474
							lieu=new StringBuffer();
464
							lieu=new StringBuffer();
475
 
465
 
476
							String aloc=Util.toCelString(((JSONString) jsonArrayNested .get(6)).toString());
466
							String aloc=Util.toCelString(((JSONString) jsonArrayNested .get(6)).toString());
477
								
467
								
478
								if (aloc.compareTo("000null")==0) {
468
								if (aloc.compareTo("000null")==0) {
479
									if (lieu.length()==0) {
469
									if (lieu.length()==0) {
480
										lieu.append("Commune absente");
470
										lieu.append("Commune absente");
481
									}
471
									}
482
									else {
472
									else {
483
										lieu.append("commune absente");
473
										lieu.append("commune absente");
484
									}
474
									}
485
								}
475
								}
486
								else {
476
								else {
487
									if (lieu.length()==0) {
477
									if (lieu.length()==0) {
488
										lieu.append("Commune de "+aloc);
478
										lieu.append("Commune de "+aloc);
489
									}
479
									}
490
									else {
480
									else {
491
										lieu.append("commune de "+aloc);
481
										lieu.append("commune de "+aloc);
492
									}
482
									}
493
										
483
										
494
								}
484
								}
495
							
485
							
496
								
486
								
497
								String alieudit=Util.toCelString(((JSONString) jsonArrayNested .get(9)).toString());
487
								String alieudit=Util.toCelString(((JSONString) jsonArrayNested .get(9)).toString());
498
							
488
							
499
//								Localisation - Lieu dit
489
//								Localisation - Lieu dit
500
								
490
								
501
								if (alieudit.compareTo("000null")!=0) {
491
								if (alieudit.compareTo("000null")!=0) {
502
									lieu.append(", "+alieudit);
492
									lieu.append(", "+alieudit);
503
								}
493
								}
504
								
494
								
505
								
495
								
506
//								Station -
496
//								Station -
507
								
497
								
508
								String astation=Util.toCelString(((JSONString) jsonArrayNested .get(10)).toString());
498
								String astation=Util.toCelString(((JSONString) jsonArrayNested .get(10)).toString());
509
 
499
 
510
								
500
								
511
								if (astation.compareTo("000null")!=0) {
501
								if (astation.compareTo("000null")!=0) {
512
									lieu.append(", "+astation);
502
									lieu.append(", "+astation);
513
								}
503
								}
514
 
504
 
515
								
505
								
516
//								Milieu
506
//								Milieu
517
								
507
								
518
								String amilieu=Util.toCelString(((JSONString) jsonArrayNested .get(11)).toString());
508
								String amilieu=Util.toCelString(((JSONString) jsonArrayNested .get(11)).toString());
519
 
509
 
520
								
510
								
521
								if (amilieu.compareTo("000null")!=0) {
511
								if (amilieu.compareTo("000null")!=0) {
522
									lieu.append(", "+amilieu);
512
									lieu.append(", "+amilieu);
523
								}								
513
								}								
524
							
514
							
525
								String acomment=Util.toCelString(((JSONString) jsonArrayNested .get(12)).toString());
515
								String acomment=Util.toCelString(((JSONString) jsonArrayNested .get(12)).toString());
526
//								Commentaire
516
//								Commentaire
527
								
517
								
528
								if (acomment.compareTo("null")!=0) {
518
								if (acomment.compareTo("null")!=0) {
529
									lieu.append(", "+acomment);
519
									lieu.append(", "+acomment);
530
								}
520
								}
531
 
521
 
532
								
522
								
533
								if (lieu.toString().compareTo("")==0) {
523
								if (lieu.toString().compareTo("")==0) {
534
									values[3] = new HTML("&nbsp;");
524
									values[3] = new HTML("&nbsp;");
535
								}
525
								}
536
								else {
526
								else {
537
									values[3] = new HTML(lieu.toString());
527
									values[3] = new HTML(lieu.toString());
538
								}
528
								}
539
 
529
 
540
								
530
								
541
								String adate=((JSONString) jsonArrayNested .get(8)).stringValue();
531
								String adate=((JSONString) jsonArrayNested .get(8)).stringValue();
542
								
532
								
543
//								Date 
533
//								Date 
544
								if (adate.compareTo("0000-00-00 00:00:00")!=0) {
534
								if (adate.compareTo("0000-00-00 00:00:00")!=0) {
545
									values[4]=new HTML("<b>"+adate+"</b>"); 
535
									values[4]=new HTML("<b>"+adate+"</b>"); 
546
								}
536
								}
547
								else { 
537
								else { 
548
									values[4] = new HTML("&nbsp;");
538
									values[4] = new HTML("&nbsp;");
549
								}
539
								}
550
									
540
									
551
 
541
 
552
							
542
							
553
							String aordre=((JSONString) jsonArrayNested.get(7)).stringValue();
543
							String aordre=((JSONString) jsonArrayNested.get(7)).stringValue();
554
						
544
						
555
							// Numero d'ordre (cache)
545
							// Numero d'ordre (cache)
556
							
546
							
557
							values[5] = aordre;
547
							values[5] = aordre;
558
							
548
							
559
							
549
							
560
						
550
						
561
							
551
							
562
					    	if (i>=table.getItemCount()) {
552
					    	if (i>=table.getItemCount()) {
563
					    		TableItem item = new TableItem(values);
553
					    		TableItem item = new TableItem(values);
564
					    		table.add(item);
554
					    		table.add(item);
565
							}
555
							}
566
							else {
556
							else {
567
								TableItem item=table.getItem(i);
557
								TableItem item=table.getItem(i);
568
								item.setValue(0,values[0]);
558
								item.setValue(0,values[0]);
569
								item.setValue(1,values[1]);
559
								item.setValue(1,values[1]);
570
								item.setValue(2,values[2]);
560
								item.setValue(2,values[2]);
571
								item.setValue(3,values[3]);
561
								item.setValue(3,values[3]);
572
								item.setValue(4,values[4]);
562
								item.setValue(4,values[4]);
573
								item.setValue(5,values[5]);
563
								item.setValue(5,values[5]);
574
							}
564
							}
575
					    	
565
					    	
576
					    	// Spagetti
566
					    	// Spagetti
577
							if (ordre!=null) {
567
							if (ordre!=null) {
578
								if (aordre.compareTo(ordre)==0) {
568
								if (aordre.compareTo(ordre)==0) {
579
									table.select(i);
569
									table.select(i);
580
								}
570
								}
581
								else {
571
								else {
582
									table.deselect(i);
572
									table.deselect(i);
583
								}
573
								}
584
							}
574
							}
585
							
575
							
586
						}
576
						}
587
 
577
 
588
					}
578
					}
589
				}
579
				}
590
 
580
 
591
				// Suppression fin ancien affichage
581
				// Suppression fin ancien affichage
592
				if (i<table.getItemCount()) {
582
				if (i<table.getItemCount()) {
593
					 for (int j = table.getItemCount() -1 ; j >= i; j--) {
583
					 for (int j = table.getItemCount() -1 ; j >= i; j--) {
594
						 TableItem item=table.getItem(j);
584
						 TableItem item=table.getItem(j);
595
						 table.remove(item);
585
						 table.remove(item);
596
					 }
586
					 }
597
				}
587
				}
598
				
588
				
599
				setStatusEnabled();
589
				setStatusEnabled();
600
				
590
				
601
				
591
				
602
			}
592
			}
603
		});
593
		});
604
				*/
594
				*/
605
		
595
		
606
 
596
 
607
	}
597
	}
608
 
598
 
609
 
599
 
610
	/**
600
	/**
611
	 * Affichage message d'attente et desactivation navigation
601
	 * Affichage message d'attente et desactivation navigation
612
	 * 
602
	 * 
613
	 * @param
603
	 * @param
614
	 * @return void
604
	 * @return void
615
	 */
605
	 */
616
 
606
 
617
	private void setStatusDisabled() {
607
	private void setStatusDisabled() {
618
 
608
 
619
		navBar.gotoFirst.setEnabled(false);
609
		navBar.gotoFirst.setEnabled(false);
620
		navBar.gotoPrev.setEnabled(false);
610
		navBar.gotoPrev.setEnabled(false);
621
		navBar.gotoNext.setEnabled(false);
611
		navBar.gotoNext.setEnabled(false);
622
		navBar.gotoEnd.setEnabled(false);
612
		navBar.gotoEnd.setEnabled(false);
623
 
613
 
624
		navBar.status.setText("Patientez ...");
614
		navBar.status.setText("Patientez ...");
625
	}
615
	}
626
 
616
 
627
	/**
617
	/**
628
	 * Affichage numero de page et gestion de la navigation
618
	 * Affichage numero de page et gestion de la navigation
629
	 * 
619
	 * 
630
	 */
620
	 */
631
 
621
 
632
	private void setStatusEnabled() {
622
	private void setStatusEnabled() {
633
 
623
 
634
		// Il y a forcemment un disabled avant d'arriver ici
624
		// Il y a forcemment un disabled avant d'arriver ici
635
 
625
 
636
		if (count > 0) {
626
		if (count > 0) {
637
 
627
 
638
			if (startIndex >= VISIBLE_TAXON_COUNT) { // Au dela de la
628
			if (startIndex >= VISIBLE_TAXON_COUNT) { // Au dela de la
639
														// premiere page
629
														// premiere page
640
				navBar.gotoPrev.setEnabled(true);
630
				navBar.gotoPrev.setEnabled(true);
641
				navBar.gotoFirst.setEnabled(true);
631
				navBar.gotoFirst.setEnabled(true);
642
				if (startIndex < (count - VISIBLE_TAXON_COUNT)) { // Pas la
632
				if (startIndex < (count - VISIBLE_TAXON_COUNT)) { // Pas la
643
																	// derniere
633
																	// derniere
644
																	// page
634
																	// page
645
					navBar.gotoNext.setEnabled(true);
635
					navBar.gotoNext.setEnabled(true);
646
					navBar.gotoEnd.setEnabled(true);
636
					navBar.gotoEnd.setEnabled(true);
647
					navBar.status.setText((startIndex + 1) + " - "
637
					navBar.status.setText((startIndex + 1) + " - "
648
							+ (startIndex + VISIBLE_TAXON_COUNT) + " sur " + count );
638
							+ (startIndex + VISIBLE_TAXON_COUNT) + " sur " + count );
649
				} else { // Derniere page
639
				} else { // Derniere page
650
					navBar.status.setText((startIndex + 1) + " - " + count + " sur " + count );
640
					navBar.status.setText((startIndex + 1) + " - " + count + " sur " + count );
651
				}
641
				}
652
			} else { // Premiere page
642
			} else { // Premiere page
653
				if (count > VISIBLE_TAXON_COUNT) { // Des pages derrieres
643
				if (count > VISIBLE_TAXON_COUNT) { // Des pages derrieres
654
					navBar.gotoNext.setEnabled(true);
644
					navBar.gotoNext.setEnabled(true);
655
					navBar.gotoEnd.setEnabled(true);
645
					navBar.gotoEnd.setEnabled(true);
656
					navBar.status.setText((startIndex + 1) + " - "
646
					navBar.status.setText((startIndex + 1) + " - "
657
							+ (startIndex + VISIBLE_TAXON_COUNT) + " sur " + count);
647
							+ (startIndex + VISIBLE_TAXON_COUNT) + " sur " + count);
658
				} else {
648
				} else {
659
					navBar.status.setText((startIndex + 1) + " - " + count + " sur " + count);
649
					navBar.status.setText((startIndex + 1) + " - " + count + " sur " + count);
660
				}
650
				}
661
			}
651
			}
662
		}
652
		}
663
 
653
 
664
		else { // Pas d'inventaire, pas de navigation
654
		else { // Pas d'inventaire, pas de navigation
665
			navBar.status.setText("0 - 0 sur 0");
655
			navBar.status.setText("0 - 0 sur 0");
666
		}
656
		}
667
	}
657
	}
668
 
658
 
669
	/*
659
	/*
670
	 * Positionnement index de parcours (this.startIndex) pour affichage de la
660
	 * Positionnement index de parcours (this.startIndex) pour affichage de la
671
	 * derniere page
661
	 * derniere page
672
	 * 
662
	 * 
673
	 * @param
663
	 * @param
674
	 * @return void
664
	 * @return void
675
	 */
665
	 */
676
 
666
 
677
	private void gotoEnd() {
667
	private void gotoEnd() {
678
 
668
 
679
		if ((count == 0) || (count % VISIBLE_TAXON_COUNT) > 0) {
669
		if ((count == 0) || (count % VISIBLE_TAXON_COUNT) > 0) {
680
			startIndex = count - (count % VISIBLE_TAXON_COUNT);
670
			startIndex = count - (count % VISIBLE_TAXON_COUNT);
681
		} else {
671
		} else {
682
			startIndex = count - VISIBLE_TAXON_COUNT;
672
			startIndex = count - VISIBLE_TAXON_COUNT;
683
		}
673
		}
684
 
674
 
685
	}
675
	}
686
 
676
 
687
	/*
677
	/*
688
	 * Recherche en cours
678
	 * Recherche en cours
689
	 * 
679
	 * 
690
	 */
680
	 */
691
	
681
	
692
	public void setRechercheLibre(String search) {
682
	public void setRechercheLibre(String search) {
693
		this.rechercheLibre = search;
683
		this.rechercheLibre = search;
694
	}
684
	}
695
 
685
 
696
 
686
 
697
	
687
	
698
	/*
688
	/*
699
	 * Departement en cours 
689
	 * Departement en cours 
700
	 * 
690
	 * 
701
	 */
691
	 */
702
	
692
	
703
	public void setIdLocation(String id_location) {
693
	public void setIdLocation(String id_location) {
704
		this.identifiantLocalite = id_location;
694
		this.identifiantLocalite = id_location;
705
	}
695
	}
706
 
696
 
707
 
697
 
708
	
698
	
709
	/*
699
	/*
710
	 * Localite en cours 
700
	 * Localite en cours 
711
	 * 
701
	 * 
712
	 */
702
	 */
713
	
703
	
714
	public void setLocalite(String location) {
704
	public void setLocalite(String location) {
715
		this.localite = location;
705
		this.localite = location;
716
	}
706
	}
717
 
707
 
718
 
708
 
719
	
709
	
720
	/*
710
	/*
721
	 * Lieudit en cours 
711
	 * Lieudit en cours 
722
	 * 
712
	 * 
723
	 */
713
	 */
724
 
714
 
725
	public void setLieudit(String lieudit) {
715
	public void setLieudit(String lieudit) {
726
		this.lieudit = lieudit;
716
		this.lieudit = lieudit;
727
	}
717
	}
728
 
718
 
729
	
719
	
730
	
720
	
731
	/*
721
	/*
732
	 * Date en cours 
722
	 * Date en cours 
733
	 * 
723
	 * 
734
	 */
724
	 */
735
	
725
	
736
 
726
 
737
	public void setAnnee(String year) {
727
	public void setAnnee(String year) {
738
		this.annee = year;
728
		this.annee = year;
739
	}
729
	}
740
 
730
 
741
 
731
 
742
	public void setMois(String month) {
732
	public void setMois(String month) {
743
		this.mois = month;
733
		this.mois = month;
744
	}
734
	}
745
 
735
 
746
	public void setJour(String day) {
736
	public void setJour(String day) {
747
		this.jour = day;
737
		this.jour = day;
748
	}
738
	}
749
 
739
 
750
	
740
	
751
	/*
741
	/*
752
	 * Utilisateur en cours 
742
	 * Utilisateur en cours 
753
	 * 
743
	 * 
754
	 */
744
	 */
755
	
745
	
756
 
746
 
757
	
747
	
758
	public void setUser(String user) {
748
	public void setUser(String user) {
759
		this.user = user;
749
		this.user = user;
760
	}
750
	}
761
 
751
 
762
 
752
 
763
	public void displayFilter() {
753
	public void displayFilter() {
764
		
754
		
765
		
755
		
766
	
756
	
767
	// Mise a jour boutton export feuille de calcul
757
	// Mise a jour boutton export feuille de calcul
768
 
758
 
769
		/*
759
		/*
770
	observationMediateur.getActionView().getExportButton().setHTML("<a href=\""+observationMediateur.getServiceBaseUrl()+"/InventoryExport/" 
760
	observationMediateur.getActionView().getExportButton().setHTML("<a href=\""+observationMediateur.getServiceBaseUrl()+"/InventoryExport/" 
771
			+  user + "/"
761
			+  user + "/"
772
			+ URL.encodeComponent(identifiantLocalite) + "/"
762
			+ URL.encodeComponent(identifiantLocalite) + "/"
773
			+ URL.encodeComponent(localite) + "/"
763
			+ URL.encodeComponent(localite) + "/"
774
			+ URL.encodeComponent(lieudit)+ "/"
764
			+ URL.encodeComponent(lieudit)+ "/"
775
			+ annee + "/"
765
			+ annee + "/"
776
			+ mois  + "/"
766
			+ mois  + "/"
777
			+ jour 
767
			+ jour 
778
			+ "\">"+"Export&nbsp;tableur</a>");
768
			+ "\">"+"Export&nbsp;tableur</a>");
779
 
769
 
780
	*/
770
	*/
781
	// Mise a jour ligne de selection 
771
	// Mise a jour ligne de selection 
782
	
772
	
783
	
773
	
784
	
774
	
785
	String dep;
775
	String dep;
786
	if (identifiantLocalite.compareTo("all")==0) {
776
	if (identifiantLocalite.compareTo("all")==0) {
787
		dep="Tous d&eacute;partements";
777
		dep="Tous d&eacute;partements";
788
	}
778
	}
789
	else {
779
	else {
790
		if (identifiantLocalite.compareTo("000null")==0) {
780
		if (identifiantLocalite.compareTo("000null")==0) {
791
			dep="D&eacute;partements non renseign&eacute;es ";
781
			dep="D&eacute;partements non renseign&eacute;es ";
792
		}
782
		}
793
		else {
783
		else {
794
		dep="Département "+identifiantLocalite;
784
		dep="Département "+identifiantLocalite;
795
		}
785
		}
796
	}
786
	}
797
	
787
	
798
	
788
	
799
	
789
	
800
	String com;
790
	String com;
801
	if (localite.compareTo("all")==0) {
791
	if (localite.compareTo("all")==0) {
802
		com=", toutes communes";
792
		com=", toutes communes";
803
	}
793
	}
804
	else {
794
	else {
805
		if (localite.compareTo("000null")==0) {
795
		if (localite.compareTo("000null")==0) {
806
			com=", communes non renseign&eacute;es";
796
			com=", communes non renseign&eacute;es";
807
		}
797
		}
808
		else {
798
		else {
809
		com=", commune de "+localite;
799
		com=", commune de "+localite;
810
		}
800
		}
811
	}
801
	}
812
 
802
 
813
	
803
	
814
	
804
	
815
	String lieu;
805
	String lieu;
816
	
806
	
817
	if (lieudit.compareTo("all")==0) {
807
	if (lieudit.compareTo("all")==0) {
818
		lieu=", tous lieux dits";
808
		lieu=", tous lieux dits";
819
	}
809
	}
820
	else {
810
	else {
821
		if (lieudit.compareTo("000null")==0) {
811
		if (lieudit.compareTo("000null")==0) {
822
			lieu=", lieu-dit non renseign&eacute;es";
812
			lieu=", lieu-dit non renseign&eacute;es";
823
		}
813
		}
824
		else {
814
		else {
825
			lieu=", lieu-dit "+ lieudit;
815
			lieu=", lieu-dit "+ lieudit;
826
		}
816
		}
827
	}
817
	}
828
	
818
	
829
	String dat;
819
	String dat;
830
	
820
	
831
	if ((annee.compareTo("all")==0) && (mois.compareTo("all")==0) && (jour.compareTo("all")==0)) {
821
	if ((annee.compareTo("all")==0) && (mois.compareTo("all")==0) && (jour.compareTo("all")==0)) {
832
		dat=", toutes periodes";
822
		dat=", toutes periodes";
833
	}
823
	}
834
	
824
	
835
	else {
825
	else {
836
	
826
	
837
    	String yea="";
827
    	String yea="";
838
       	String da="";
828
       	String da="";
839
       	String mont="";
829
       	String mont="";
840
       	
830
       	
841
    	if (annee.compareTo("all")==0) {
831
    	if (annee.compareTo("all")==0) {
842
    		yea=", toutes ann&eacute;es";
832
    		yea=", toutes ann&eacute;es";
843
    	}
833
    	}
844
    	else {
834
    	else {
845
    		if (annee.compareTo("0")==0) {
835
    		if (annee.compareTo("0")==0) {
846
    			yea=", periode non renseign&eacute;e";
836
    			yea=", periode non renseign&eacute;e";
847
    		}
837
    		}
848
    		else {
838
    		else {
849
    			yea=", "+ annee;
839
    			yea=", "+ annee;
850
    
840
    
851
            	if (mois.compareTo("all")==0) {
841
            	if (mois.compareTo("all")==0) {
852
            		mont=", tous mois";
842
            		mont=", tous mois";
853
            	}
843
            	}
854
            	else {
844
            	else {
855
            			mont="/"+ mois;
845
            			mont="/"+ mois;
856
            	}
846
            	}
857
            
847
            
858
            
848
            
859
            	if (jour.compareTo("all")==0) {
849
            	if (jour.compareTo("all")==0) {
860
            		da=", tous jours";
850
            		da=", tous jours";
861
            	}
851
            	}
862
            	else {
852
            	else {
863
            			da="/"+ jour;
853
            			da="/"+ jour;
864
            	}
854
            	}
865
    		}
855
    		}
866
    	}
856
    	}
867
            	
857
            	
868
        dat=yea + mont + da;
858
        dat=yea + mont + da;
869
    	
859
    	
870
	}
860
	}
871
 
861
 
872
	
862
	
873
	panel.getHeader().setText(dep + com + lieu + dat);
863
	//panel.getHeader().setText(dep + com + lieu + dat);
874
 
864
 
875
 
865
 
876
	
866
	
877
}
867
}
878
 
868
 
879
 
869
 
880
 
870
 
881
	/// EVENEMENTS 
871
	/// EVENEMENTS 
882
	
872
	
883
/**
873
/**
884
 * Evenements
874
 * Evenements
885
 * 
875
 * 
886
 */	
876
 */	
887
	
877
	/*
888
	public void handleEvent(BaseEvent be) {
878
	public void handleEvent(BaseEvent be) {
889
		switch (be.type) {
879
		switch (be.type) {
890
			case ObservationMediateur.NOMBRE_OBSERVATION:
880
			case ObservationMediateur.NOMBRE_OBSERVATION:
891
				gotoEnd();
881
				gotoEnd();
892
				getListeObservation();	
882
				getListeObservation();	
893
				break;
883
				break;
894
			case ObservationMediateur.LISTE_OBSERVATION:
884
			case ObservationMediateur.LISTE_OBSERVATION:
895
				afficherListeObservation();
885
				afficherListeObservation();
896
				break;
886
				break;
897
		}
887
		}
898
	}
888
	}
899
 
889
*/
900
 
890
 
901
 
891
 
902
}
892
}
903
 
893
 
904
/* +--Fin du code ---------------------------------------------------------------------------------------+
894
/* +--Fin du code ---------------------------------------------------------------------------------------+
905
* $Log$
895
* $Log$
-
 
896
* Revision 1.1  2008-06-09 14:19:37  ddelon
-
 
897
* Initialisation observation
-
 
898
*
906
* Revision 1.3  2008-04-28 13:10:43  ddelon
899
* Revision 1.3  2008-04-28 13:10:43  ddelon
907
* Integration MyGwt
900
* Integration MyGwt
908
*
901
*
909
* Revision 1.2  2008-01-30 08:55:40  ddelon
902
* Revision 1.2  2008-01-30 08:55:40  ddelon
910
* fin mise en place mygwt
903
* fin mise en place mygwt
911
*
904
*
912
* Revision 1.1  2008-01-02 21:26:04  ddelon
905
* Revision 1.1  2008-01-02 21:26:04  ddelon
913
* mise en place mygwt
906
* mise en place mygwt
914
*
907
*
915
* Revision 1.8  2007-12-22 14:48:53  ddelon
908
* Revision 1.8  2007-12-22 14:48:53  ddelon
916
* Documentation et refactorisation
909
* Documentation et refactorisation
917
*
910
*
918
* Revision 1.7  2007-09-17 19:25:34  ddelon
911
* Revision 1.7  2007-09-17 19:25:34  ddelon
919
* Documentation
912
* Documentation
920
*
913
*
921
*/
914
*/