Subversion Repositories eFlore/Applications.cel

Rev

Rev 107 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
12 david 1
package org.tela_botanica.client.vues;
2
 
3
 
46 david 4
import java.util.Iterator;
5
 
6
import org.tela_botanica.client.modeles.ListeObservation;
7
import org.tela_botanica.client.modeles.Observation;
12 david 8
import org.tela_botanica.client.observation.ObservationMediateur;
59 david 9
import org.tela_botanica.client.interfaces.ListePaginable;
12 david 10
import org.tela_botanica.client.interfaces.Rafraichissable;
11
import org.tela_botanica.client.interfaces.VueListable;
128 aurelien 12
import com.gwtext.client.core.EventCallback;
41 jpm 13
import com.gwtext.client.core.EventObject;
12 david 14
import com.gwtext.client.core.Ext;
15
import com.gwtext.client.core.ExtElement;
101 jpm 16
import com.gwtext.client.core.Function;
46 david 17
import com.gwtext.client.data.ArrayReader;
12 david 18
import com.gwtext.client.data.FieldDef;
46 david 19
import com.gwtext.client.data.MemoryProxy;
12 david 20
import com.gwtext.client.data.Record;
21
import com.gwtext.client.data.RecordDef;
22
import com.gwtext.client.data.Store;
23
import com.gwtext.client.data.StringFieldDef;
128 aurelien 24
import com.gwtext.client.widgets.Button;
12 david 25
import com.gwtext.client.widgets.Component;
101 jpm 26
import com.gwtext.client.widgets.Tool;
128 aurelien 27
import com.gwtext.client.widgets.Toolbar;
28
import com.gwtext.client.widgets.ToolbarButton;
29
import com.gwtext.client.widgets.ToolbarTextItem;
30
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
31
import com.gwtext.client.widgets.event.PanelListenerAdapter;
41 jpm 32
import com.gwtext.client.widgets.grid.CellMetadata;
12 david 33
import com.gwtext.client.widgets.grid.ColumnConfig;
34
import com.gwtext.client.widgets.grid.ColumnModel;
35
import com.gwtext.client.widgets.grid.GridPanel;
41 jpm 36
import com.gwtext.client.widgets.grid.Renderer;
37
import com.gwtext.client.widgets.grid.event.GridRowListenerAdapter;
12 david 38
 
39
/**
40
 * Liste d'observation composée de ligne d'observation
41
 * l'interface rafraichissable et l'interface vueListable
42
 *
43
 * @author David Delon 2008
44
 */
45
public class ListeObservationVue extends GridPanel implements Rafraichissable,
59 david 46
		VueListable, ListePaginable {
12 david 47
 
48
	/**
49
	 * Le médiateur associé à la vue
50
	 */
51
	private ObservationMediateur	observationMediateur		= null;
52
 
53
 
54
	/**
55
	 * Config de colonne
56
	 */
57
	private ColumnConfig	etatObservation;
58
	/**
59
	 * Config de colonne
60
	 */
61
	private ColumnConfig	nomSaisiObservation;
62
	/**
63
	 * Config de colonne
64
	 */
65
	private ColumnConfig	nomRetenuObservation;
66
	/**
67
	 * Config de colonne
68
	 */
69
	private ColumnConfig	lieuObservation;
70
	/**
71
	 * Config de colonne
72
	 */
73
	private ColumnConfig	dateObservation;
74
	/**
75
	 * Config de colonne
76
	 */
77
	private ColumnConfig	ordreObservation;
78
	/**
79
	 * Modele de colonnes
80
	 */
81
	private ColumnModel		modeleColonnes;
82
 
82 david 83
 
12 david 84
	/**
85
	 * Store qui contient les données à afficher
86
	 */
87
	private Store			st				= null;
88
 
89
 
90
	/**
91
	 * Barre de pagination
92
	 */
59 david 93
	private BarrePaginationVue bt = null ;
12 david 94
 
95
	/**
46 david 96
	 * Numéro de page en cours
97
	 */
98
	private int pageEncours = 0 ;
99
	/**
100
	 * Nombre de pages totales
101
	 */
102
	private int pageMax = 1 ;
103
	/**
104
	 * Taille de page (par défaut 20)
105
	 */
106
	private int taillePage = 20 ;
107
	/**
108
	 * Nombre d'éléments total correspondant à la requete
109
	 */
110
	private int nbElements = 0 ;
111
 
82 david 112
	private ListeObservation cacheListeObservation = null;
46 david 113
 
101 jpm 114
	private Tool exporterObservations = null ;
115
 
46 david 116
	/**
12 david 117
	 * Constructeur sans arguments (privé car ne doit pas être utilisé)
118
	 */
59 david 119
	@SuppressWarnings("unused")
12 david 120
	private ListeObservationVue()
121
	{
122
		super() ;
123
	}
124
 
125
	/**
126
	 * Constructeur avec argument
127
	 * @param im le médiateur à associer
128
	 */
129
	public ListeObservationVue(ObservationMediateur obs) {
130
 
131
		this.observationMediateur = obs;
132
 
133
		setHeader(true);
53 david 134
 
12 david 135
 
136
		// on place la barre de pagination
59 david 137
		bt = new BarrePaginationVue(this);
138
		bt.setLabelElement("Observations");
139
		bt.setTaillePageParDefaut(20);
128 aurelien 140
		bt.setIntervallesPages(new String[] {"400","200",  "100" , "50" , "20", "10"}) ;
141
		this.setTopToolbar(bt) ;
94 jpm 142
 
128 aurelien 143
		Toolbar barreActions = new Toolbar();
144
		ToolbarButton transmettre = new ToolbarButton("Transmettre");
145
		transmettre.addListener(new ButtonListenerAdapter() {
146
			public void onClick(Button b, EventObject e) {
147
				observationMediateur.transmettreObservations();
148
			}
149
		});
150
		ToolbarButton supprimer = new ToolbarButton("Supprimer");
151
		supprimer.addListener(new ButtonListenerAdapter() {
152
			public void onClick(Button b, EventObject e) {
153
				observationMediateur.supprimerObservations();
154
			}
155
		});
156
 
157
 
158
		ToolbarTextItem exporter = new ToolbarTextItem("<a href=\"#\" id=\"lienExport\"> Exporter </a>");
159
 
160
		barreActions.addButton(transmettre);
161
		barreActions.addSpacer();
162
		barreActions.addButton(supprimer);
163
		barreActions.addSpacer();
164
		barreActions.addItem(exporter);
165
 
166
 
167
		this.setBottomToolbar(barreActions);
168
 
101 jpm 169
		exporterObservations = new Tool(Tool.PIN, new Function() {
170
 
171
			public void execute() {
172
				observationMediateur.exporterObservations() ;
173
			}
174
 
175
		}, "Exporter des observations") ;
176
 
177
		this.addTool(exporterObservations) ;
178
 
94 jpm 179
		this.setTitle("Observations") ;
12 david 180
 
181
		// on construit le modèle de colonnes
182
 
183
		// Le store suivant est ensuite remplacé par le store contenant les données obtenus depuis le serveur (cf rafraichir)
184
 
41 jpm 185
		Renderer colRend = new Renderer() {
186
 
187
			public String render(Object value, CellMetadata cellMetadata,
188
					Record record, int rowIndex, int colNum, Store store) {
189
 
190
				if(value == null || value.equals("null") || value.equals("000null") || value.equals("0000-00-00 00:00:00")) {
191
 
192
					return "" ;
193
				}
194
				else
195
				{
196
 
197
				}
198
 
199
				return value.toString() ;
200
			}
201
 
202
		} ;
12 david 203
 
128 aurelien 204
		etatObservation = new ColumnConfig("Transmis", "etat_observation", 20, true, new Renderer() {
41 jpm 205
 
206
			public String render(Object value, CellMetadata cellMetadata,
207
					Record record, int rowIndex, int colNum, Store store) {
208
				if(value.equals("1"))
209
				{
128 aurelien 210
					return "<img src=\"tela.png\"/></img>" ;
41 jpm 211
				}
212
				else
213
				{
214
					return "" ;
215
				}
216
			}
217
 
218
		});
219
		nomSaisiObservation = new ColumnConfig("Nom saisi", "nomSaisi_observation", 200, true, colRend);
220
		nomRetenuObservation = new ColumnConfig("Nom retenu", "nomRetenu_observation", 200, true, colRend);
221
		lieuObservation = new ColumnConfig("Lieu", "lieu_observation", 200, true, colRend);
42 jpm 222
		dateObservation = new ColumnConfig("Date", "date_observation", 120, true, colRend);
41 jpm 223
		ordreObservation = new ColumnConfig("Ordre", "ordre_observation", 50, true, colRend);
42 jpm 224
 
12 david 225
 
226
		// on associe le modèle de colonnes
227
 
228
		ColumnConfig[] cm = {etatObservation, nomSaisiObservation, nomRetenuObservation, lieuObservation, dateObservation, ordreObservation};
229
 
230
		modeleColonnes = new ColumnModel(cm);
231
 
232
		this.setColumnModel(modeleColonnes);
233
 
234
		this.setAutoScroll(true);
235
		this.setEnableColumnResize(true);
236
 
46 david 237
		//temp dd viewport desactive ajout de ces 2 lignes
53 david 238
	//	this.setAutoWidth(true);
46 david 239
		// temp
240
 
12 david 241
		// creation du store
52 david 242
 
12 david 243
		FieldDef defEtatObservation = new StringFieldDef("etat_observation");
244
		FieldDef defNomSaisiObservation = new StringFieldDef("nomSaisi_observation");
245
		FieldDef defNomRetenuObservation = new StringFieldDef("nomRetenu_observation");
246
		FieldDef defLieuObservation = new StringFieldDef("lieu_observation");
247
		FieldDef defDateObservation = new StringFieldDef("date_observation");
248
		FieldDef defOrdreObservation = new StringFieldDef("ordre_observation");
249
 
250
 
251
		FieldDef[] defTab = { defEtatObservation, defNomSaisiObservation, defNomRetenuObservation,
252
				defLieuObservation, defDateObservation, defOrdreObservation };
253
 
254
		RecordDef rd = new RecordDef(defTab);
255
		st = new Store(rd);
256
 
257
		// on associe le store
258
 
259
		this.setStore(st);
260
		this.getView().setAutoFill(true);
42 jpm 261
		this.getView().setForceFit(true) ;
12 david 262
 
263
		// on crée un masque de chargement qui s'affichera lors des mises à jour
264
		this.setLoadMask("Chargement");
265
 
266
		// on ajoute les listeners
267
		ajouterListeners();
268
 
269
 
270
	}
271
 
272
 
273
	/**
274
	 * Ajoute les listeners pour la gestion des évènements
275
	 */
276
	private void ajouterListeners() {
41 jpm 277
 
278
		this.addGridRowListener(new GridRowListenerAdapter() {
12 david 279
 
280
			// gestion du clic sur une ligne
41 jpm 281
			public void onRowClick(GridPanel grid, int rowIndex,
282
					EventObject e) {
12 david 283
				// on notifie le médiateur et on lui passe le nuémro de ligne
71 jpm 284
				Record rd = getSelectionModel().getSelected();
285
				String ordreObservation = rd.getAsString("ordre_observation") ;
82 david 286
				observationMediateur.onClicListeObservation(rowIndex,ordreObservation);
41 jpm 287
 
12 david 288
			}
41 jpm 289
 
12 david 290
			// gestion du clic droit
291
			public void onRowContextMenu(GridPanel grid, int rowIndex,
292
					EventObject e) {
293
				// on stoppe l'évenement pour empecher le navigateur d'afficher son propre menu
294
				e.stopEvent() ;
295
				// on notifie le médiateur en lui passant l'évenement
54 david 296
				observationMediateur.montrerContextMenu(e);
12 david 297
			}
298
 
299
			// gestion du double clic
300
			public void onRowDblClick(GridPanel grid, int rowIndex,
301
					EventObject e) {
302
				// on notifie le médiateur en lui passant le numéro de ligne
54 david 303
				observationMediateur.doubleClicListeObservation(rowIndex);
12 david 304
			}
41 jpm 305
 
12 david 306
		});
307
 
128 aurelien 308
		this.addListener(new PanelListenerAdapter() {
309
			public void onRender(Component c) {
310
 
311
				ExtElement lienExport = Ext.get("lienExport") ;
312
				lienExport.addListener("click", new EventCallback() {
12 david 313
 
128 aurelien 314
					public void execute(EventObject e) {
315
 
316
						observationMediateur.exporterObservations();
317
					}
318
 
319
				});
12 david 320
			}
128 aurelien 321
		});
12 david 322
	}
323
 
324
	/**
325
	 * Méthode héritée de l'interface VueListable
326
	 * Sélectionne les observations  dans la liste suivant les identifiants donnés en paramètres
327
	 */
328
 
329
	public String[] getIdSelectionnees() {
330
 
331
		Record[] selection = this.getSelectionModel().getSelections();
332
		int taille = selection.length;
333
		String id_selection[] = new String[taille];
334
 
335
		for (int i = 0; i < selection.length; i++) {
336
 
337
			id_selection[i] = selection[i].getAsString("ordre_observation");
338
		}
339
 
340
		return id_selection;
341
	}
342
 
343
 
344
 
345
	/**
346
	 * Sélectionne des enregistrements donné
347
	 * @param sel un tableau d'enregistrement à selectionner
348
	 */
349
	public void selectionnerEnregistrements(Record[] sel) {
350
 
351
			getSelectionModel().clearSelections();
352
			getSelectionModel().selectRecords(sel);
353
 
354
	}
355
 
356
	/**
357
	 * Accesseur pour la toolbar de pagination
358
	 * @return la toolbar de pagination
359
	 */
360
 
59 david 361
	public BarrePaginationVue getToolBarVue()
12 david 362
	{
363
		return bt ;
364
	}
365
 
366
 
367
	/**
368
	 * Recherche l'élement actuellement affiché et affiche son message de chargement
369
	 */
370
	public void masquerChargement()
371
	{
372
			ExtElement masked = Ext.get(getId()) ;
373
 
52 david 374
 
12 david 375
			if (masked!=null) {
376
				masked.mask("Chargement") ;
377
			}
378
 
379
	}
380
 
381
	/**
382
	 * Recherche l'élement actuellement affiché et retire son message de chargement si l'était affiché
383
	 */
384
	public void demasquerChargement()
385
	{
386
			ExtElement masked = Ext.get(getId()) ;
387
 
52 david 388
 
12 david 389
			if (masked!=null) {
390
 
391
				if(masked.isMasked())
392
				{
393
					masked.unmask() ;
394
				}
395
			}
396
	}
397
 
398
 
54 david 399
 
46 david 400
	/**
401
	 * Méthode héritée de l'interface rafraichissable
402
	 * @param nouvelleDonnees les nouvelles données
403
	 * @param repandreRafraichissement le booleen de notification du rafraichissement
404
	 */
405
 
12 david 406
 
46 david 407
 
408
	public void rafraichir(Object nouvelleDonnees, boolean repandreRafraichissement) {
409
 
410
 
411
 
412
 
413
//		 si l'on a reçu une liste d'observation
414
		if(nouvelleDonnees instanceof ListeObservation)
415
		{
416
 
417
				ListeObservation data = (ListeObservation) nouvelleDonnees ;
54 david 418
				Object[][] observationData = new Object[data.size()][7];
46 david 419
				int i = 0 ;
420
 
421
				if(data.size() == 0)
422
				{
423
					pageEncours = 0 ;
424
				}
425
 
54 david 426
				// on la parse et on récupère les informations qui nous interessent
46 david 427
				for (Iterator it = data.keySet().iterator(); it.hasNext();)
428
				{
429
 
430
					Observation obs=(Observation) data.get(it.next());
431
 
432
					observationData[i][0]= obs.getTransmis();
433
					observationData[i][1]= obs.getNomSaisi();
434
					observationData[i][2]= obs.getNomRetenu();
435
					observationData[i][3]= obs.getLieudit();
436
					observationData[i][4]= obs.getDate();
437
					observationData[i][5]= obs.getNumeroOrdre();
54 david 438
					observationData[i][6]= obs.getNumeroNomenclaturalSaisi();
46 david 439
 
440
 
441
					i++ ;
442
				}
443
 
444
				// creation du store qui les contient
445
 
446
				FieldDef defEtatObservation = new StringFieldDef("etat_observation");
447
				FieldDef defNomSaisiObservation = new StringFieldDef("nomSaisi_observation");
448
				FieldDef defNomRetenuObservation = new StringFieldDef("nomRetenu_observation");
449
				FieldDef defLieuObservation = new StringFieldDef("lieu_observation");
450
				FieldDef defDateObservation = new StringFieldDef("date_observation");
451
				FieldDef defOrdreObservation = new StringFieldDef("ordre_observation");
452
 
54 david 453
				// Non affiches :
454
				FieldDef defNumeroNomenclaturalSaisiObservation = new StringFieldDef("numeroNomenclaturalSaisi_observation");
455
 
456
 
46 david 457
				// on associe le store
458
 
459
				FieldDef[] defTab = { defEtatObservation, defNomSaisiObservation, defNomRetenuObservation,
54 david 460
						defLieuObservation, defDateObservation, defOrdreObservation, defNumeroNomenclaturalSaisiObservation };
46 david 461
 
462
				RecordDef rd = new RecordDef(defTab);
463
 
464
				final MemoryProxy dataProxy = new MemoryProxy(observationData);
465
				final ArrayReader reader = new ArrayReader(rd);
466
 
467
				final Store observationStore = new Store(dataProxy, reader);
468
 
469
 
470
				st = observationStore ;
471
				st.load() ;
472
 
473
 
474
				// et on reconfigure et rafraichit la vue
475
				this.reconfigure(st, this.getColumnModel());
476
 
477
				demasquerChargement();
478
 
82 david 479
			    cacheListeObservation=data;
480
 
481
				observationMediateur.onRafraichissementListeObservations();
46 david 482
 
82 david 483
 
46 david 484
		}
485
 
486
 
487
		// Si on reçoit un tableau d'entiers
488
		// c'est un tableau d'un seul entier qui est le nombre d'observation correspondant aux critères
489
		if(nouvelleDonnees instanceof int[])
490
		{
491
			int[] pages = (int[])nouvelleDonnees ;
492
 
493
			// on calcule le nombre de pages nécessaires et on les met à jour dans le modèle
494
			pageMax  = calculerNbPages(pages[0]) ;
495
			nbElements = pages[0] ;
496
 
52 david 497
 
46 david 498
			// et on notifie de le mediateur du changement des valeurs
51 david 499
			changerPageMaxEtCourante(pageMax,pageEncours,taillePage,pages[0]) ;
46 david 500
 
54 david 501
			masquerChargement();
82 david 502
			observationMediateur.obtenirListeObservation(this);
46 david 503
		}
504
 
505
 
82 david 506
//		 si l'on a reçu une Observation
46 david 507
 
508
		if(nouvelleDonnees instanceof Observation) {
79 david 509
 
510
			Observation obs= (Observation) nouvelleDonnees;
511
			if (obs.getNumeroOrdre()==null) { // Nouvelle observation
52 david 512
			// On affiche la dernière page
513
 
514
			pageEncours = pageMax ;
54 david 515
			masquerChargement();
516
 
46 david 517
			observationMediateur.obtenirNombreObservation();
518
 
79 david 519
			}
520
			else { // Modification d'une observation
521
 
82 david 522
 
523
				masquerChargement();
524
 
94 jpm 525
				observationMediateur.obtenirNombreObservation();
82 david 526
 
79 david 527
			}
107 aurelien 528
		}
74 david 529
 
107 aurelien 530
		// Si on a effectué une suppression
531
		if(nouvelleDonnees instanceof String)
532
		{
533
			String str = (String)nouvelleDonnees ;
534
			observationMediateur.obtenirNombreObservation() ;
535
		}
536
 
46 david 537
	}
51 david 538
 
539
 
540
	// GESTION DE LA PAGINATION
46 david 541
 
542
 
82 david 543
	public ListeObservation getCacheListeObservation() {
544
		return cacheListeObservation;
545
	}
546
 
46 david 547
	/**
548
	 * Calcule le nombre de pages nécessaires pour afficher un nombre d'élements donnés en fonction de la taille de page
549
	 * en cours
550
	 * @param nbElements le nombre d'élements total
551
	 * @return le nombre de pages
552
	 */
553
	public int calculerNbPages(int nbElements)
554
	{
555
		// A cause de la betise de java pour les conversion implicite on fait quelques conversions manuellement
556
		// pour eviter qu'il arrondisse mal la division
557
		// nombre de pages = (nombre d'element / taille de la page) arrondie à l'entier superieur
558
 
559
		double nPage = (1.0*nbElements)/(1.0*taillePage) ;
560
		double nPageRound = Math.ceil(nPage) ;
561
		Double nPageInt = new Double(nPageRound) ;
562
 
563
		// on convertit en entier
564
		return nPageInt.intValue() ;
565
	}
566
 
567
 
568
	/**
569
	 * Recalcule la page en cours lors du changement du nombre d'élements
570
	 * @param nbElements le nombre d'élements total
571
	 * @return la nouvelle page encours
572
	 */
573
	public int calculerPageCourante(int nbElements)
574
	{
575
		// on calcule le nombre de page
576
		int nouvelNbPages = calculerNbPages(nbElements) ;
577
		// la nouvelle page en cours
578
		double nPageCourante = (1.0*pageEncours)/(1.0*pageMax) * (1.0*nouvelNbPages) ;
579
 
580
		// on arrondit au supérieur
581
		double nPageRound = Math.ceil(nPageCourante) ;
582
		Double nPageInt = new Double(nPageRound) ;
583
 
584
		// on convertit en entier
585
		return Math.abs(nPageInt.intValue()) ;
586
	}
587
 
588
 
589
	/**
590
	 * Appelle le modèle pour lui demander les données d'une page à afficher
591
	 * @param pageCourante le numéro de page à affciher
592
	 */
593
	public void changerNumeroPage(int pageCourante) {
594
 
595
 
596
 
597
		pageEncours = pageCourante ;
598
 
54 david 599
		masquerChargement();
600
 
46 david 601
		// On lance le chargerment des observations
602
		observationMediateur.obtenirNombreObservation();
603
 
604
		getToolBarVue().changerPageCourante(pageCourante);
605
 
606
	}
607
 
608
 
609
	/**
610
	 * Appelle le modèle pour qu'il change la taille de page utilisée
611
	 * @param nouvelleTaillePage la nouvelle taille de page
612
	 */
613
 
614
	public void changerTaillePage(int nouvelleTaillePage)
615
	{
616
 
617
		taillePage = nouvelleTaillePage ;
618
		pageEncours = calculerPageCourante(nbElements) ;
619
 
54 david 620
		masquerChargement();
621
 
61 jpm 622
		// 	On lance le chargement des observations
46 david 623
		observationMediateur.obtenirNombreObservation();
624
 
625
 
626
		// et on met à jour la taille de page dans les barres d'outils
627
		getToolBarVue().selectionnerTaillePage(nouvelleTaillePage);
628
 
629
 
630
	}
631
 
632
 
51 david 633
	/**
634
	 * Met à jour les barre d'outils avec des nouvelles valeurs
635
	 * @param pageMax le nombre de pages
636
	 * @param pageEncours la page en cours
637
	 * @param taillePage la taille de page
638
	 * @param nbElement le nombre d'élements par page
639
	 */
640
	public void changerPageMaxEtCourante(int pageMax, int pageEncours, int taillePage, int nbElement)
641
	{
642
 
643
		int[] pages = {pageMax,pageEncours, taillePage, nbElement} ;
644
		getToolBarVue().rafraichir(pages, false) ;
645
 
646
	}
46 david 647
 
61 jpm 648
	/**
649
	 * Renvoie la taille de page en cours d'utilisation
650
	 * @return la taille de page
651
	 */
46 david 652
	public int getTaillePage() {
653
 
654
		return taillePage;
655
	}
61 jpm 656
 
657
	/**
658
	 * Renvoie le numéro de la page encours (attention on commence à 0)
659
	 * @return le numéro de la page en cours
660
	 */
46 david 661
	public int getPageEncours() {
662
 
663
		return pageEncours;
664
	}
665
 
94 jpm 666
	public void afficherFiltres(String nLieu, String nDate)
667
	{
668
 
669
		String titre = "Observations " ;
670
 
671
		if(!nLieu.equals(""))
672
		{
673
			titre += "  -  Lieu : "+nLieu ;
674
 
675
		}
676
 
677
		if(!nDate .equals(""))
678
		{
679
			titre += "  -  Date : "+nDate ;
680
		}
681
 
682
		this.setTitle(titre) ;
683
	}
46 david 684
 
104 jpm 685
	public void raz() {
686
 
687
 
688
		// creation du store qui les contient
689
 
690
		FieldDef defEtatObservation = new StringFieldDef("etat_observation");
691
		FieldDef defNomSaisiObservation = new StringFieldDef("nomSaisi_observation");
692
		FieldDef defNomRetenuObservation = new StringFieldDef("nomRetenu_observation");
693
		FieldDef defLieuObservation = new StringFieldDef("lieu_observation");
694
		FieldDef defDateObservation = new StringFieldDef("date_observation");
695
		FieldDef defOrdreObservation = new StringFieldDef("ordre_observation");
696
 
697
		// Non affiches :
698
		FieldDef defNumeroNomenclaturalSaisiObservation = new StringFieldDef("numeroNomenclaturalSaisi_observation");
699
 
700
		FieldDef[] defTab = { defEtatObservation, defNomSaisiObservation, defNomRetenuObservation,
701
				defLieuObservation, defDateObservation, defOrdreObservation };
702
 
703
		RecordDef rd = new RecordDef(defTab);
704
		st = new Store(rd);
705
 
706
		// on associe le store
707
 
708
		this.setStore(st);
709
 
710
	}
711
 
12 david 712
}