Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1417 Rev 1468
1
package org.tela_botanica.client.vues.structure;
1
package org.tela_botanica.client.vues.structure;
2
 
2
 
3
import java.util.ArrayList;
3
import java.util.ArrayList;
4
import java.util.Date;
4
import java.util.Date;
5
import java.util.Iterator;
5
import java.util.Iterator;
6
import java.util.List;
6
import java.util.List;
7
 
7
 
8
import org.tela_botanica.client.ComposantClass;
8
import org.tela_botanica.client.ComposantClass;
9
import org.tela_botanica.client.Mediateur;
9
import org.tela_botanica.client.Mediateur;
10
import org.tela_botanica.client.RegistreId;
10
import org.tela_botanica.client.RegistreId;
11
import org.tela_botanica.client.composants.ChampComboBoxRechercheTempsReelPaginable;
11
import org.tela_botanica.client.composants.ChampComboBoxRechercheTempsReelPaginable;
-
 
12
import org.tela_botanica.client.composants.GrillePaginable;
12
import org.tela_botanica.client.composants.InfoLogger;
13
import org.tela_botanica.client.composants.InfoLogger;
-
 
14
import org.tela_botanica.client.composants.pagination.ProxyCollectionAPersonne;
13
import org.tela_botanica.client.composants.pagination.ProxyPersonnes;
15
import org.tela_botanica.client.composants.pagination.ProxyPersonnes;
14
import org.tela_botanica.client.composants.pagination.ProxyProjets;
16
import org.tela_botanica.client.composants.pagination.ProxyProjets;
-
 
17
import org.tela_botanica.client.composants.pagination.ProxyStructureAPersonne;
15
import org.tela_botanica.client.composants.pagination.ProxyValeur;
18
import org.tela_botanica.client.composants.pagination.ProxyValeur;
16
import org.tela_botanica.client.images.Images;
19
import org.tela_botanica.client.images.Images;
17
import org.tela_botanica.client.interfaces.Rafraichissable;
20
import org.tela_botanica.client.interfaces.Rafraichissable;
18
import org.tela_botanica.client.modeles.Information;
21
import org.tela_botanica.client.modeles.Information;
19
import org.tela_botanica.client.modeles.InterneValeur;
22
import org.tela_botanica.client.modeles.InterneValeur;
20
import org.tela_botanica.client.modeles.InterneValeurListe;
23
import org.tela_botanica.client.modeles.InterneValeurListe;
21
import org.tela_botanica.client.modeles.MenuApplicationId;
24
import org.tela_botanica.client.modeles.MenuApplicationId;
22
import org.tela_botanica.client.modeles.Valeur;
25
import org.tela_botanica.client.modeles.Valeur;
23
import org.tela_botanica.client.modeles.ValeurListe;
26
import org.tela_botanica.client.modeles.ValeurListe;
24
import org.tela_botanica.client.modeles.aDonnee;
27
import org.tela_botanica.client.modeles.aDonnee;
25
import org.tela_botanica.client.modeles.collection.CollectionAPersonne;
28
import org.tela_botanica.client.modeles.collection.CollectionAPersonne;
26
import org.tela_botanica.client.modeles.personne.Personne;
29
import org.tela_botanica.client.modeles.personne.Personne;
27
import org.tela_botanica.client.modeles.personne.PersonneListe;
30
import org.tela_botanica.client.modeles.personne.PersonneListe;
28
import org.tela_botanica.client.modeles.projet.Projet;
31
import org.tela_botanica.client.modeles.projet.Projet;
29
import org.tela_botanica.client.modeles.projet.ProjetListe;
32
import org.tela_botanica.client.modeles.projet.ProjetListe;
30
import org.tela_botanica.client.modeles.structure.Structure;
33
import org.tela_botanica.client.modeles.structure.Structure;
31
import org.tela_botanica.client.modeles.structure.StructureAPersonne;
34
import org.tela_botanica.client.modeles.structure.StructureAPersonne;
32
import org.tela_botanica.client.modeles.structure.StructureAPersonneListe;
35
import org.tela_botanica.client.modeles.structure.StructureAPersonneListe;
33
import org.tela_botanica.client.modeles.structure.StructureConservation;
36
import org.tela_botanica.client.modeles.structure.StructureConservation;
34
import org.tela_botanica.client.modeles.structure.StructureValorisation;
37
import org.tela_botanica.client.modeles.structure.StructureValorisation;
35
import org.tela_botanica.client.synchronisation.Sequenceur;
38
import org.tela_botanica.client.synchronisation.Sequenceur;
36
import org.tela_botanica.client.util.Debug;
39
import org.tela_botanica.client.util.Debug;
37
import org.tela_botanica.client.util.Pattern;
40
import org.tela_botanica.client.util.Pattern;
38
import org.tela_botanica.client.util.UtilArray;
41
import org.tela_botanica.client.util.UtilArray;
39
import org.tela_botanica.client.util.UtilString;
42
import org.tela_botanica.client.util.UtilString;
40
import org.tela_botanica.client.vues.Formulaire;
43
import org.tela_botanica.client.vues.Formulaire;
41
 
44
 
42
import com.extjs.gxt.ui.client.Style.Scroll;
45
import com.extjs.gxt.ui.client.Style.Scroll;
43
import com.extjs.gxt.ui.client.data.ModelData;
46
import com.extjs.gxt.ui.client.data.ModelData;
44
import com.extjs.gxt.ui.client.data.ModelType;
47
import com.extjs.gxt.ui.client.data.ModelType;
45
import com.extjs.gxt.ui.client.event.Events;
48
import com.extjs.gxt.ui.client.event.Events;
46
import com.extjs.gxt.ui.client.Registry;
49
import com.extjs.gxt.ui.client.Registry;
47
import com.extjs.gxt.ui.client.event.BaseEvent;
50
import com.extjs.gxt.ui.client.event.BaseEvent;
48
import com.extjs.gxt.ui.client.event.ButtonEvent;
51
import com.extjs.gxt.ui.client.event.ButtonEvent;
49
import com.extjs.gxt.ui.client.event.ComponentEvent;
52
import com.extjs.gxt.ui.client.event.ComponentEvent;
50
import com.extjs.gxt.ui.client.event.EventType;
53
import com.extjs.gxt.ui.client.event.EventType;
51
import com.extjs.gxt.ui.client.event.KeyListener;
54
import com.extjs.gxt.ui.client.event.KeyListener;
52
import com.extjs.gxt.ui.client.event.Listener;
55
import com.extjs.gxt.ui.client.event.Listener;
53
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
56
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
54
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
57
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
55
import com.extjs.gxt.ui.client.event.SelectionListener;
58
import com.extjs.gxt.ui.client.event.SelectionListener;
56
import com.extjs.gxt.ui.client.store.ListStore;
59
import com.extjs.gxt.ui.client.store.ListStore;
57
import com.extjs.gxt.ui.client.store.Record;
60
import com.extjs.gxt.ui.client.store.Record;
58
import com.extjs.gxt.ui.client.store.Store;
61
import com.extjs.gxt.ui.client.store.Store;
59
import com.extjs.gxt.ui.client.store.StoreEvent;
62
import com.extjs.gxt.ui.client.store.StoreEvent;
60
import com.extjs.gxt.ui.client.widget.Component;
63
import com.extjs.gxt.ui.client.widget.Component;
61
import com.extjs.gxt.ui.client.widget.ContentPanel;
64
import com.extjs.gxt.ui.client.widget.ContentPanel;
62
import com.extjs.gxt.ui.client.widget.Html;
65
import com.extjs.gxt.ui.client.widget.Html;
63
import com.extjs.gxt.ui.client.widget.Info;
66
import com.extjs.gxt.ui.client.widget.Info;
64
import com.extjs.gxt.ui.client.widget.LayoutContainer;
67
import com.extjs.gxt.ui.client.widget.LayoutContainer;
65
import com.extjs.gxt.ui.client.widget.MessageBox;
68
import com.extjs.gxt.ui.client.widget.MessageBox;
66
import com.extjs.gxt.ui.client.widget.TabItem;
69
import com.extjs.gxt.ui.client.widget.TabItem;
67
import com.extjs.gxt.ui.client.widget.TabPanel;
70
import com.extjs.gxt.ui.client.widget.TabPanel;
68
import com.extjs.gxt.ui.client.widget.button.Button;
71
import com.extjs.gxt.ui.client.widget.button.Button;
69
import com.extjs.gxt.ui.client.widget.form.CheckBox;
72
import com.extjs.gxt.ui.client.widget.form.CheckBox;
70
import com.extjs.gxt.ui.client.widget.form.CheckBoxGroup;
73
import com.extjs.gxt.ui.client.widget.form.CheckBoxGroup;
71
import com.extjs.gxt.ui.client.widget.form.ComboBox;
74
import com.extjs.gxt.ui.client.widget.form.ComboBox;
72
import com.extjs.gxt.ui.client.widget.form.DateField;
75
import com.extjs.gxt.ui.client.widget.form.DateField;
73
import com.extjs.gxt.ui.client.widget.form.Field;
76
import com.extjs.gxt.ui.client.widget.form.Field;
74
import com.extjs.gxt.ui.client.widget.form.FieldSet;
77
import com.extjs.gxt.ui.client.widget.form.FieldSet;
75
import com.extjs.gxt.ui.client.widget.form.HiddenField;
78
import com.extjs.gxt.ui.client.widget.form.HiddenField;
76
import com.extjs.gxt.ui.client.widget.form.LabelField;
79
import com.extjs.gxt.ui.client.widget.form.LabelField;
77
import com.extjs.gxt.ui.client.widget.form.NumberField;
80
import com.extjs.gxt.ui.client.widget.form.NumberField;
78
import com.extjs.gxt.ui.client.widget.form.Radio;
81
import com.extjs.gxt.ui.client.widget.form.Radio;
79
import com.extjs.gxt.ui.client.widget.form.RadioGroup;
82
import com.extjs.gxt.ui.client.widget.form.RadioGroup;
80
import com.extjs.gxt.ui.client.widget.form.TextArea;
83
import com.extjs.gxt.ui.client.widget.form.TextArea;
81
import com.extjs.gxt.ui.client.widget.form.TextField;
84
import com.extjs.gxt.ui.client.widget.form.TextField;
82
import com.extjs.gxt.ui.client.widget.form.Validator;
85
import com.extjs.gxt.ui.client.widget.form.Validator;
83
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
86
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
84
import com.extjs.gxt.ui.client.widget.form.FormPanel.LabelAlign;
87
import com.extjs.gxt.ui.client.widget.form.FormPanel.LabelAlign;
85
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
88
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
86
import com.extjs.gxt.ui.client.widget.grid.CheckColumnConfig;
89
import com.extjs.gxt.ui.client.widget.grid.CheckColumnConfig;
87
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
90
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
88
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
91
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
89
import com.extjs.gxt.ui.client.widget.grid.EditorGrid;
92
import com.extjs.gxt.ui.client.widget.grid.EditorGrid;
90
import com.extjs.gxt.ui.client.widget.grid.GridSelectionModel;
93
import com.extjs.gxt.ui.client.widget.grid.GridSelectionModel;
-
 
94
import com.extjs.gxt.ui.client.widget.grid.HeaderGroupConfig;
91
import com.extjs.gxt.ui.client.widget.grid.RowNumberer;
95
import com.extjs.gxt.ui.client.widget.grid.RowNumberer;
92
import com.extjs.gxt.ui.client.widget.layout.ColumnData;
96
import com.extjs.gxt.ui.client.widget.layout.ColumnData;
93
import com.extjs.gxt.ui.client.widget.layout.ColumnLayout;
97
import com.extjs.gxt.ui.client.widget.layout.ColumnLayout;
94
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
98
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
95
import com.extjs.gxt.ui.client.widget.layout.FormData;
99
import com.extjs.gxt.ui.client.widget.layout.FormData;
96
import com.extjs.gxt.ui.client.widget.tips.ToolTipConfig;
100
import com.extjs.gxt.ui.client.widget.tips.ToolTipConfig;
97
import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
101
import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
98
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
102
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
99
import com.google.gwt.core.client.GWT;
103
import com.google.gwt.core.client.GWT;
100
import com.google.gwt.i18n.client.DateTimeFormat;
104
import com.google.gwt.i18n.client.DateTimeFormat;
101
import com.google.gwt.i18n.client.NumberFormat;
105
import com.google.gwt.i18n.client.NumberFormat;
102
import com.google.gwt.user.client.Window;
106
import com.google.gwt.user.client.Window;
103
 
107
 
104
public class StructureForm extends Formulaire implements Rafraichissable {
108
public class StructureForm extends Formulaire implements Rafraichissable {
105
	
109
	
106
	private static int decompteRafraichissementPersonnel = 0;
110
	private static int decompteRafraichissementPersonnel = 0;
107
	
111
	
108
	private TabPanel onglets = null;
112
	private TabPanel onglets = null;
109
	private TabItem identificationOnglet = null;
113
	private TabItem identificationOnglet = null;
110
	private TabItem personnelOnglet = null;
114
	private TabItem personnelOnglet = null;
111
	private TabItem conservationOnglet = null;
115
	private TabItem conservationOnglet = null;
112
	private TabItem valorisationOnglet = null;
116
	private TabItem valorisationOnglet = null;
113
 
117
 
114
	private HiddenField<String> idStructureChp = null;
118
	private HiddenField<String> idStructureChp = null;
115
	
119
	
116
	// Onglet IDENTIFICATION
120
	// Onglet IDENTIFICATION
117
	private Structure identification = null;
121
	private Structure identification = null;
118
	private ListStore<Valeur> magazinLstpr = null;
122
	private ListStore<Valeur> magazinLstpr = null;
119
	private ComboBox<Valeur> comboLstpr = null;
123
	private ComboBox<Valeur> comboLstpr = null;
120
	private ListStore<Valeur> magazinLstpu = null;
124
	private ListStore<Valeur> magazinLstpu = null;
121
	private ComboBox<Valeur> comboLstpu = null;
125
	private ComboBox<Valeur> comboLstpu = null;
122
	private ListStore<Valeur> magazinLiStatut = null;
126
	private ListStore<Valeur> magazinLiStatut = null;
123
	private ComboBox<Valeur> comboLiStatut = null;
127
	private ComboBox<Valeur> comboLiStatut = null;
124
	private ListStore<Valeur> fonctionsMagazin = null;
128
	private ListStore<Valeur> fonctionsMagazin = null;
125
	private ComboBox<Valeur> fonctionsCombo = null;
129
	private ComboBox<Valeur> fonctionsCombo = null;
126
	private ComboBox<InterneValeur> comboAcronyme = null;
130
	private ComboBox<InterneValeur> comboAcronyme = null;
127
	private TextField<String> ihChp = null;
131
	private TextField<String> ihChp = null;
128
	private TextField<String> mnhnChp = null;
132
	private TextField<String> mnhnChp = null;
129
	private ComboBox<InterneValeur> comboTypeStructure = null;
133
	private ComboBox<InterneValeur> comboTypeStructure = null;
130
	private TextField<String> nomStructureChp = null;
134
	private TextField<String> nomStructureChp = null;
131
	private TextField<String> dateFondationChp = null;
135
	private TextField<String> dateFondationChp = null;
132
	private TextArea descriptionChp = null;
136
	private TextArea descriptionChp = null;
133
	private TextArea conditionAccesChp = null;
137
	private TextArea conditionAccesChp = null;
134
	private TextArea conditionUsageChp = null;
138
	private TextArea conditionUsageChp = null;
135
	private TextArea adrChp = null;
139
	private TextArea adrChp = null;
136
	private TextArea adrComplementChp = null;
140
	private TextArea adrComplementChp = null;
137
	private TextField<String> cpChp = null;
141
	private TextField<String> cpChp = null;
138
	private TextField<String> villeChp = null;
142
	private TextField<String> villeChp = null;
139
	private ListStore<Valeur> magazinRegion = null;
143
	private ListStore<Valeur> magazinRegion = null;
140
	private ComboBox<Valeur> comboRegion = null;
144
	private ComboBox<Valeur> comboRegion = null;
141
	private ListStore<Valeur> magazinPays = null;
145
	private ListStore<Valeur> magazinPays = null;
142
	private ChampComboBoxRechercheTempsReelPaginable comboPays = null;
146
	private ChampComboBoxRechercheTempsReelPaginable comboPays = null;
143
	private TextField<String> latitudeChp = null;
147
	private TextField<String> latitudeChp = null;
144
	private TextField<String> longitudeChp = null;
148
	private TextField<String> longitudeChp = null;
145
	private TextField<String> telChp = null;
149
	private TextField<String> telChp = null;
146
	private TextField<String> faxChp = null;
150
	private TextField<String> faxChp = null;
147
	private TextField<String> emailChp = null;
151
	private TextField<String> emailChp = null;
148
	private TextField<String> urlChp = null;
152
	private TextField<String> urlChp = null;
149
 
153
 
150
	// Onglet PERSONNEL
154
	// Onglet PERSONNEL
151
	private StructureAPersonneListe personnel = null;
155
	private StructureAPersonneListe personnel = null;
152
	private StructureAPersonneListe personnelAjoute = null;
156
	private StructureAPersonneListe personnelAjoute = null;
153
	private StructureAPersonneListe personnelModifie = null;
157
	private StructureAPersonneListe personnelModifie = null;
154
	private StructureAPersonneListe personnelSupprime = null;
158
	private StructureAPersonneListe personnelSupprime = null;
155
	private NumberField nbreTotalPersonneStructureChp = null;
159
	private NumberField nbreTotalPersonneStructureChp = null;
156
	private EditorGrid<StructureAPersonne> grillePersonnel = null;
160
	private EditorGrid<StructureAPersonne> grillePersonnel = null;
157
	private ListStore<StructureAPersonne> personnelGrilleMagazin = null;
161
	private ListStore<StructureAPersonne> personnelGrilleMagazin = null;
158
	
162
	
159
	// Onglet CONSERVATION
163
	// Onglet CONSERVATION
160
	private StructureConservation conservation = null;
164
	private StructureConservation conservation = null;
161
	private RadioGroup formationMarkRGrpChp = null;
165
	private RadioGroup formationMarkRGrpChp = null;
162
	private RadioGroup interetFormationMarkRGrpChp = null;
166
	private RadioGroup interetFormationMarkRGrpChp = null;
163
	private RadioGroup collectionCommuneMarkRGrpChp = null;
167
	private RadioGroup collectionCommuneMarkRGrpChp = null;
164
	private RadioGroup accesControleMarkRGrpChp = null;
168
	private RadioGroup accesControleMarkRGrpChp = null;
165
	private RadioGroup restaurationMarkRGrpChp = null;
169
	private RadioGroup restaurationMarkRGrpChp = null;
166
	private RadioGroup traitementMarkRGrpChp = null;
170
	private RadioGroup traitementMarkRGrpChp = null;
167
	private RadioGroup collectionAcquisitionMarkRGrpChp = null;
171
	private RadioGroup collectionAcquisitionMarkRGrpChp = null;
168
	private RadioGroup echantillonAcquisitionMarkRGrpChp = null;
172
	private RadioGroup echantillonAcquisitionMarkRGrpChp = null;
169
	private TextField<String> localStockageAutreChp = null;
173
	private TextField<String> localStockageAutreChp = null;
170
	private TextField<String> meubleStockageAutreChp = null;
174
	private TextField<String> meubleStockageAutreChp = null;
171
	private TextField<String> parametreStockageAutreChp = null;
175
	private TextField<String> parametreStockageAutreChp = null;
172
	private TextField<String> collectionAutreAutreChp = null;
176
	private TextField<String> collectionAutreAutreChp = null;
173
	private TextField<String> autreCollectionAutreChp = null;
177
	private TextField<String> autreCollectionAutreChp = null;
174
	private TextField<String> opRestauAutreChp = null;
178
	private TextField<String> opRestauAutreChp = null;
175
	private TextField<String> autreMaterielAutreChp = null;
179
	private TextField<String> autreMaterielAutreChp = null;
176
	private TextField<String> poisonTraitementAutreChp = null;
180
	private TextField<String> poisonTraitementAutreChp = null;
177
	private TextField<String> traitementAutreChp = null;
181
	private TextField<String> traitementAutreChp = null;
178
	private TextField<String> insecteTraitementAutreChp = null;
182
	private TextField<String> insecteTraitementAutreChp = null;
179
	private TextField<String> actionAutreChp = null;
183
	private TextField<String> actionAutreChp = null;
180
	private TextField<String> provenanceRechercheAutreChp = null;
184
	private TextField<String> provenanceRechercheAutreChp = null;
181
	private TextField<String> typeRechercheAutreChp = null;
185
	private TextField<String> typeRechercheAutreChp = null;
182
	private CheckBoxGroup localStockageTrukCacGrpChp = null;
186
	private CheckBoxGroup localStockageTrukCacGrpChp = null;
183
	private LayoutContainer localStockageTrukCp = null;
187
	private LayoutContainer localStockageTrukCp = null;
184
	private CheckBoxGroup meubleStockageTrukCacGrpChp = null;
188
	private CheckBoxGroup meubleStockageTrukCacGrpChp = null;
185
	private LayoutContainer meubleStockageTrukCp = null;
189
	private LayoutContainer meubleStockageTrukCp = null;
186
	private CheckBoxGroup parametreStockageTrukCacGrpChp = null;
190
	private CheckBoxGroup parametreStockageTrukCacGrpChp = null;
187
	private LayoutContainer parametreStockageTrukCp = null;
191
	private LayoutContainer parametreStockageTrukCp = null;
188
	private LayoutContainer collectionAutreTrukCp = null;
192
	private LayoutContainer collectionAutreTrukCp = null;
189
	private CheckBoxGroup collectionAutreTrukCacGrpChp = null;
193
	private CheckBoxGroup collectionAutreTrukCacGrpChp = null;
190
	private CheckBoxGroup opRestauTrukCacGrpChp = null;
194
	private CheckBoxGroup opRestauTrukCacGrpChp = null;
191
	private LayoutContainer opRestauTrukCp = null;
195
	private LayoutContainer opRestauTrukCp = null;
192
	private CheckBoxGroup autreMaterielTrukCacGrpChp = null;
196
	private CheckBoxGroup autreMaterielTrukCacGrpChp = null;
193
	private LayoutContainer autreMaterielTrukCp = null;
197
	private LayoutContainer autreMaterielTrukCp = null;
194
	private LayoutContainer traitementTrukCp = null;
198
	private LayoutContainer traitementTrukCp = null;
195
	private CheckBoxGroup traitementTrukCacGrpChp = null;
199
	private CheckBoxGroup traitementTrukCacGrpChp = null;
196
	private LayoutContainer poisonTraitementTrukCp = null;
200
	private LayoutContainer poisonTraitementTrukCp = null;
197
	private LayoutContainer insecteTraitementTrukCp = null;
201
	private LayoutContainer insecteTraitementTrukCp = null;
198
	private CheckBoxGroup insecteTraitementTrukCacGrpChp = null;
202
	private CheckBoxGroup insecteTraitementTrukCacGrpChp = null;
199
	private CheckBoxGroup poisonTraitementTrukCacGrpChp = null;
203
	private CheckBoxGroup poisonTraitementTrukCacGrpChp = null;
200
	private LayoutContainer autreCollectionTrukCp = null;
204
	private LayoutContainer autreCollectionTrukCp = null;
201
	private CheckBoxGroup autreCollectionTrukCacGrpChp = null;
205
	private CheckBoxGroup autreCollectionTrukCacGrpChp = null;
202
	private LayoutContainer provenanceRechercheTrukCp = null;
206
	private LayoutContainer provenanceRechercheTrukCp = null;
203
	private CheckBoxGroup provenanceRechercheTrukCacGrpChp = null;
207
	private CheckBoxGroup provenanceRechercheTrukCacGrpChp = null;
204
	private CheckBoxGroup typeRechercheTrukCacGrpChp = null;
208
	private CheckBoxGroup typeRechercheTrukCacGrpChp = null;
205
	private LayoutContainer typeRechercheTrukCp = null;
209
	private LayoutContainer typeRechercheTrukCp = null;
206
	private TextField<String> futureActionChp = null;
210
	private TextField<String> futureActionChp = null;
207
	private TextField<String> sansMotifAccesChp = null;
211
	private TextField<String> sansMotifAccesChp = null;
208
	private TextField<String> avecMotifAccesChp = null;
212
	private TextField<String> avecMotifAccesChp = null;
209
	private TextField<String> formationChp = null;
213
	private TextField<String> formationChp = null;
210
	private RadioGroup traitementAcquisitionMarkRGrpChp = null;
214
	private RadioGroup traitementAcquisitionMarkRGrpChp = null;
211
	private LabelField traitementAcquisitionMarkLabel = null;
215
	private LabelField traitementAcquisitionMarkLabel = null;
212
	private RadioGroup materielConservationCeRGrpChp = null;
216
	private RadioGroup materielConservationCeRGrpChp = null;
213
 
217
 
214
	// Onglet VALORISATION
218
	// Onglet VALORISATION
215
	private StructureValorisation valorisation = null;
219
	private StructureValorisation valorisation = null;
216
	private RadioGroup actionMarkRGrpChp = null;
220
	private RadioGroup actionMarkRGrpChp = null;
217
	private LayoutContainer actionTrukCp = null;
221
	private LayoutContainer actionTrukCp = null;
218
	private CheckBoxGroup actionTrukCacGrpChp = null;
222
	private CheckBoxGroup actionTrukCacGrpChp = null;
219
	private RadioGroup futureActionMarkRGrpChp = null;
223
	private RadioGroup futureActionMarkRGrpChp = null;
220
	private RadioGroup rechercheMarkRGrpChp = null;
224
	private RadioGroup rechercheMarkRGrpChp = null;
221
	private RadioGroup sansMotifAccesMarkRGrpChp = null;
225
	private RadioGroup sansMotifAccesMarkRGrpChp = null;
222
	private RadioGroup avecMotifAccesMarkRGrpChp = null;
226
	private RadioGroup avecMotifAccesMarkRGrpChp = null;
223
	private TextField<String> publicationChp = null;
227
	private TextField<String> publicationChp = null;
224
	private LayoutContainer materielConservationCp = null;
228
	private LayoutContainer materielConservationCp = null;
225
	private ListStore<Personne> personneExistanteMagazin = null;
229
	private ListStore<Personne> personneExistanteMagazin = null;
226
	private ChampComboBoxRechercheTempsReelPaginable personneExistanteCombo = null;
230
	private ChampComboBoxRechercheTempsReelPaginable personneExistanteCombo = null;
227
	private Button supprimerPersonnelBtn = null;
231
	private Button supprimerPersonnelBtn = null;
228
	private ListStore<Projet> projetsMagazin = null;
232
	private ListStore<Projet> projetsMagazin = null;
229
	private ChampComboBoxRechercheTempsReelPaginable projetsCombo = null;
233
	private ChampComboBoxRechercheTempsReelPaginable projetsCombo = null;
230
	private CellEditor fonctionEditor = null;
234
	private CellEditor fonctionEditor = null;
231
	private List<Valeur> fonctionsListe = null;
235
	private List<Valeur> fonctionsListe = null;
232
	
236
	
233
	private Sequenceur sequenceur;
237
	private Sequenceur sequenceur;
234
	
238
	
235
	public StructureForm(Mediateur mediateurCourrant, String modeDeCreation, Sequenceur sequenceur) {
239
	public StructureForm(Mediateur mediateurCourrant, String modeDeCreation, Sequenceur sequenceur) {
236
		initialiserFormulaire(mediateurCourrant, modeDeCreation, MenuApplicationId.STRUCTURE);
240
		initialiserFormulaire(mediateurCourrant, modeDeCreation, MenuApplicationId.STRUCTURE);
237
		this.sequenceur = sequenceur;
241
		this.sequenceur = sequenceur;
238
		
242
		
239
		// Ajout du titre
243
		// Ajout du titre
240
		panneauFormulaire.setHeading(i18nC.titreAjoutFormStructurePanneau());
244
		panneauFormulaire.setHeading(i18nC.titreAjoutFormStructurePanneau());
241
		// Création des onglets
245
		// Création des onglets
242
		onglets = creerOnglets();
246
		onglets = creerOnglets();
243
		
247
		
244
		// Ajout des onglets au formulaire général
248
		// Ajout des onglets au formulaire général
245
		panneauFormulaire.add(onglets);
249
		panneauFormulaire.add(onglets);
246
	}
250
	}
247
	
251
	
248
	protected TabPanel creerOnglets() {
252
	protected TabPanel creerOnglets() {
249
		TabPanel ongletsStructure = new TabPanel();
253
		TabPanel ongletsStructure = new TabPanel();
250
		// NOTE : pour faire apparaître les scrollBar il faut définir la hauteur du panneau d'onglets à 100% (autoHeight ne semble pas fonctionner) 
254
		// NOTE : pour faire apparaître les scrollBar il faut définir la hauteur du panneau d'onglets à 100% (autoHeight ne semble pas fonctionner) 
251
		ongletsStructure.setHeight("100%");
255
		ongletsStructure.setHeight("100%");
252
		
256
		
253
		// Onlget formulaire IDENTIFICATION
257
		// Onlget formulaire IDENTIFICATION
254
		ongletsStructure.add(creerOngletIdentification());
258
		ongletsStructure.add(creerOngletIdentification());
255
		
259
		
256
		// Onlget formulaire PERSONNEL
260
		// Onlget formulaire PERSONNEL
257
		ongletsStructure.add(creerOngletPersonnel());
261
		ongletsStructure.add(creerOngletPersonnel());
258
		
262
		
259
		// Onlget formulaire CONSERVATION
263
		// Onlget formulaire CONSERVATION
260
		ongletsStructure.add(creerOngletConservation());
264
		ongletsStructure.add(creerOngletConservation());
261
		
265
		
262
		// Onlget formulaire VALORISATION
266
		// Onlget formulaire VALORISATION
263
		ongletsStructure.add(creerOngletValorisation());
267
		ongletsStructure.add(creerOngletValorisation());
264
		
268
		
265
		// Sélection de l'onglet par défaut
269
		// Sélection de l'onglet par défaut
266
		//ongletsStructure(personnelOnglet);
270
		//ongletsStructure(personnelOnglet);
267
		
271
		
268
		return ongletsStructure;
272
		return ongletsStructure;
269
	}
273
	}
270
	
274
	
271
	public void reinitialiserFormulaire() {
275
	public void reinitialiserFormulaire() {
272
		if (mode.equals(StructureForm.MODE_MODIFIER)) {
276
		if (mode.equals(StructureForm.MODE_MODIFIER)) {
273
			mediateur.afficherFormStructure(identification.getId());
277
			mediateur.afficherFormStructure(identification.getId());
274
		} else {
278
		} else {
275
			mediateur.afficherFormStructure(null);
279
			mediateur.afficherFormStructure(null);
276
		}
280
		}
277
	}
281
	}
278
	
282
	
279
	public boolean soumettreFormulaire() {
283
	public boolean soumettreFormulaire() {
280
		
284
		
281
		// Vérification de la validité des champs du formulaire
285
		// Vérification de la validité des champs du formulaire
282
		boolean fomulaireValide = verifierFormulaire();
286
		boolean fomulaireValide = verifierFormulaire();
283
		if (fomulaireValide) {
287
		if (fomulaireValide) {
284
			// Collecte des données du formulaire
288
			// Collecte des données du formulaire
285
			Structure structure = collecterStructureIdentification();
289
			Structure structure = collecterStructureIdentification();
286
			StructureConservation conservation = collecterStructureConservation();
290
			StructureConservation conservation = collecterStructureConservation();
287
			StructureValorisation valorisation = collecterStructureValorisation();
291
			StructureValorisation valorisation = collecterStructureValorisation();
288
			collecterStructurePersonnel();
292
			collecterStructurePersonnel();
289
			
293
			
290
			if (mode.equals(MODE_AJOUTER)) {
294
			if (mode.equals(MODE_AJOUTER)) {
291
				// Ajout des informations sur la Structure
295
				// Ajout des informations sur la Structure
292
				mediateur.ajouterStructure(this, structure, conservation, valorisation);
296
				mediateur.ajouterStructure(this, structure, conservation, valorisation);
293
				// L'ajout des relations StructureAPersonne se fait quand la structure a été ajoutée
297
				// L'ajout des relations StructureAPersonne se fait quand la structure a été ajoutée
294
				// Voir la méthode rafraichir().
298
				// Voir la méthode rafraichir().
295
			} else if (mode.equals(MODE_MODIFIER)) {
299
			} else if (mode.equals(MODE_MODIFIER)) {
296
				
300
				
297
				// Modification des informations sur la Structure
301
				// Modification des informations sur la Structure
298
				if (structure == null && conservation == null && valorisation == null) {
302
				if (structure == null && conservation == null && valorisation == null) {
299
					InfoLogger.display("Modification d'une institution", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
303
					InfoLogger.display("Modification d'une institution", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
300
				} else {
304
				} else {
301
					mediateur.modifierStructure(this, identification.getId(), structure, conservation, valorisation);
305
					mediateur.modifierStructure(this, identification.getId(), structure, conservation, valorisation);
302
				}
306
				}
303
				
307
				
304
				if (personnelModifie.size() == 0 && personnelAjoute.size() == 0 && personnelSupprime.size() == 0) {
308
				if (personnelModifie.size() == 0 && personnelAjoute.size() == 0 && personnelSupprime.size() == 0) {
305
					InfoLogger.display("Modification du personnel", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
309
					InfoLogger.display("Modification du personnel", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
306
				} else {
310
				} else {
307
					if (personnelModifie.size() != 0) {
311
					if (personnelModifie.size() != 0) {
308
						decompteRafraichissementPersonnel++;
312
						decompteRafraichissementPersonnel++;
309
						mediateur.modifierStructureAPersonne(this, personnelModifie);
313
						mediateur.modifierStructureAPersonne(this, personnelModifie);
310
					}
314
					}
311
					// Ajout des relations StructureAPersonne
315
					// Ajout des relations StructureAPersonne
312
					if (personnelAjoute.size() != 0) {
316
					if (personnelAjoute.size() != 0) {
313
						decompteRafraichissementPersonnel++;
317
						decompteRafraichissementPersonnel++;
314
						mediateur.ajouterStructureAPersonne(this, identification.getId(), personnelAjoute);
318
						mediateur.ajouterStructureAPersonne(this, identification.getId(), personnelAjoute);
315
					}
319
					}
316
					// Suppression des relations StructureAPersonne
320
					// Suppression des relations StructureAPersonne
317
					if (personnelSupprime.size() != 0) {
321
					if (personnelSupprime.size() != 0) {
318
						decompteRafraichissementPersonnel++;
322
						decompteRafraichissementPersonnel++;
319
						mediateur.supprimerStructureAPersonne(this, personnelSupprime);
323
						mediateur.supprimerStructureAPersonne(this, personnelSupprime);
320
					}
324
					}
321
				}
325
				}
322
			}
326
			}
323
		}
327
		}
324
		
328
		
325
		return fomulaireValide;
329
		return fomulaireValide;
326
	}
330
	}
327
	
331
	
328
	public boolean verifierFormulaire() {
332
	public boolean verifierFormulaire() {
329
		ArrayList<String> messages = new ArrayList<String>();
333
		ArrayList<String> messages = new ArrayList<String>();
330
		
334
		
331
		// Vérification des infos sur le nom de la structure
335
		// Vérification des infos sur le nom de la structure
332
		if (	(identificationOnglet.getData("acces").equals(true) && nomStructureChp.getValue() == null) ||
336
		if (	(identificationOnglet.getData("acces").equals(true) && nomStructureChp.getValue() == null) ||
333
				(identificationOnglet.getData("acces").equals(true) && nomStructureChp.getValue().equals("")) ||
337
				(identificationOnglet.getData("acces").equals(true) && nomStructureChp.getValue().equals("")) ||
334
				(identificationOnglet.getData("acces").equals(false) && identification.getNom().equals(""))) {
338
				(identificationOnglet.getData("acces").equals(false) && identification.getNom().equals(""))) {
335
			messages.add("Veuillez indiquez un nom à l'institution.");
339
			messages.add("Veuillez indiquez un nom à l'institution.");
336
		}
340
		}
337
		
341
		
338
		// Vérification des infos sur le projet de la structure
342
		// Vérification des infos sur le projet de la structure
339
		if (	(identificationOnglet.getData("acces").equals(true) && projetsCombo.getCombo().getValue() == null) ||
343
		if (	(identificationOnglet.getData("acces").equals(true) && projetsCombo.getCombo().getValue() == null) ||
340
				(identificationOnglet.getData("acces").equals(true) && projetsCombo.getCombo().getValue().equals("")) ||
344
				(identificationOnglet.getData("acces").equals(true) && projetsCombo.getCombo().getValue().equals("")) ||
341
				(identificationOnglet.getData("acces").equals(false) && identification.getIdProjet().equals(""))) {
345
				(identificationOnglet.getData("acces").equals(false) && identification.getIdProjet().equals(""))) {
342
			messages.add("Veuillez sélectionner un projet pour l'institution.");
346
			messages.add("Veuillez sélectionner un projet pour l'institution.");
343
		}
347
		}
344
		
348
		
345
		// Vérification du Personnel
349
		// Vérification du Personnel
346
		if (personnelOnglet.getData("acces").equals(true)) {
350
		if (personnelOnglet.getData("acces").equals(true)) {
347
			String personnelNumero = "";
351
			String personnelNumero = "";
348
			int nbrePersonne = personnelGrilleMagazin.getCount();
352
			int nbrePersonne = personnelGrilleMagazin.getCount();
349
			for (int i = 0; i < nbrePersonne; i++) {
353
			for (int i = 0; i < nbrePersonne; i++) {
350
				StructureAPersonne personne = personnelGrilleMagazin.getAt(i);
354
				StructureAPersonne personne = personnelGrilleMagazin.getAt(i);
351
				if (personne.getNom().equals("") || personne.getPrenom().equals("")) {
355
				if (personne.getNom().equals("") || personne.getPrenom().equals("")) {
352
					personnelNumero += (i != 0 ? ", " : "")+(i+1);
356
					personnelNumero += (i != 0 ? ", " : "")+(i+1);
353
				}
357
				}
354
			}
358
			}
355
			if (!personnelNumero.equals("")) {
359
			if (!personnelNumero.equals("")) {
356
				messages.add("Veuillez indiquez un prénom et un nom au personnel numéro : "+personnelNumero);
360
				messages.add("Veuillez indiquez un prénom et un nom au personnel numéro : "+personnelNumero);
357
			}
361
			}
358
		}
362
		}
359
 
363
 
360
		//Vérification de la date de fondation
364
		//Vérification de la date de fondation
361
		String valeurDateFondation = dateFondationChp.getValue();
365
		String valeurDateFondation = dateFondationChp.getValue();
362
		if (!UtilString.isEmpty(valeurDateFondation) && (!valeurDateFondation.matches("\\d{2}/\\d{2}/\\d{4}") && 
366
		if (!UtilString.isEmpty(valeurDateFondation) && (!valeurDateFondation.matches("\\d{2}/\\d{2}/\\d{4}") && 
363
				!valeurDateFondation.matches("\\d{4}")))	{
367
				!valeurDateFondation.matches("\\d{4}")))	{
364
				messages.add("La date de fondation n'est pas au format jj/MM/AAAA ou AAAA");
368
				messages.add("La date de fondation n'est pas au format jj/MM/AAAA ou AAAA");
365
			} 
369
			} 
366
		
370
		
367
		// Affichage des messages d'alerte
371
		// Affichage des messages d'alerte
368
		if (messages.size() != 0) {
372
		if (messages.size() != 0) {
369
			String[] a = {};
373
			String[] a = {};
370
			a = messages.toArray(a);
374
			a = messages.toArray(a);
371
			MessageBox.alert("Erreurs de saisies", UtilArray.implode(a, "\n\n"), null);
375
			MessageBox.alert("Erreurs de saisies", UtilArray.implode(a, "\n\n"), null);
372
			return false;
376
			return false;
373
		}
377
		}
374
		
378
		
375
		return true;
379
		return true;
376
	}
380
	}
377
	
381
	
378
	private StructureValorisation collecterStructureValorisation() {
382
	private StructureValorisation collecterStructureValorisation() {
379
		StructureValorisation valorisationARetourner = null;
383
		StructureValorisation valorisationARetourner = null;
380
		if (valorisationOnglet.getData("acces").equals(true)) {
384
		if (valorisationOnglet.getData("acces").equals(true)) {
381
			// Création de l'objet
385
			// Création de l'objet
382
			StructureValorisation valorisationCollectee = (StructureValorisation) valorisation.cloner(new StructureValorisation());
386
			StructureValorisation valorisationCollectee = (StructureValorisation) valorisation.cloner(new StructureValorisation());
383
			
387
			
384
			// ACTION
388
			// ACTION
385
			if (actionMarkRGrpChp.getValue() != null) {
389
			if (actionMarkRGrpChp.getValue() != null) {
386
				valorisationCollectee.setAction(actionMarkRGrpChp.getValue().getValueAttribute());
390
				valorisationCollectee.setAction(actionMarkRGrpChp.getValue().getValueAttribute());
387
			}
391
			}
388
			
392
			
389
			// ACTION INFO
393
			// ACTION INFO
390
			valorisationCollectee.setActionInfo(creerChaineDenormalisee(actionTrukCacGrpChp.getValues()));
394
			valorisationCollectee.setActionInfo(creerChaineDenormalisee(actionTrukCacGrpChp.getValues()));
391
			valorisationCollectee.setActionInfo("AUTRE", actionAutreChp.getValue());
395
			valorisationCollectee.setActionInfo("AUTRE", actionAutreChp.getValue());
392
			
396
			
393
			// PUBLICATION
397
			// PUBLICATION
394
			valorisationCollectee.setPublication(publicationChp.getValue());
398
			valorisationCollectee.setPublication(publicationChp.getValue());
395
			
399
			
396
			// COLLECTION AUTRE
400
			// COLLECTION AUTRE
397
			valorisationCollectee.setCollectionAutre(creerChaineDenormalisee(autreCollectionTrukCacGrpChp.getValues()));
401
			valorisationCollectee.setCollectionAutre(creerChaineDenormalisee(autreCollectionTrukCacGrpChp.getValues()));
398
			valorisationCollectee.setCollectionAutre("AUTRE", autreCollectionAutreChp.getValue());
402
			valorisationCollectee.setCollectionAutre("AUTRE", autreCollectionAutreChp.getValue());
399
			
403
			
400
			// ACTION FUTURE
404
			// ACTION FUTURE
401
			if (futureActionMarkRGrpChp.getValue() != null) {
405
			if (futureActionMarkRGrpChp.getValue() != null) {
402
				valorisationCollectee.setActionFuture(futureActionMarkRGrpChp.getValue().getValueAttribute());
406
				valorisationCollectee.setActionFuture(futureActionMarkRGrpChp.getValue().getValueAttribute());
403
			}
407
			}
404
			// ACTION FUTURE INFO
408
			// ACTION FUTURE INFO
405
			valorisationCollectee.setActionFutureInfo(futureActionChp.getValue());
409
			valorisationCollectee.setActionFutureInfo(futureActionChp.getValue());
406
			
410
			
407
			// RECHERCHE
411
			// RECHERCHE
408
			if (rechercheMarkRGrpChp.getValue() != null) {
412
			if (rechercheMarkRGrpChp.getValue() != null) {
409
				valorisationCollectee.setRecherche(rechercheMarkRGrpChp.getValue().getValueAttribute());
413
				valorisationCollectee.setRecherche(rechercheMarkRGrpChp.getValue().getValueAttribute());
410
 
414
 
411
				// RECHERCHE PROVENANCE
415
				// RECHERCHE PROVENANCE
412
				valorisationCollectee.setRechercheProvenance(creerChaineDenormalisee(provenanceRechercheTrukCacGrpChp.getValues()));
416
				valorisationCollectee.setRechercheProvenance(creerChaineDenormalisee(provenanceRechercheTrukCacGrpChp.getValues()));
413
				valorisationCollectee.setRechercheProvenance("AUTRE", provenanceRechercheAutreChp.getValue());
417
				valorisationCollectee.setRechercheProvenance("AUTRE", provenanceRechercheAutreChp.getValue());
414
				
418
				
415
				// RECHERCHE TYPE
419
				// RECHERCHE TYPE
416
				valorisationCollectee.setRechercheType(creerChaineDenormalisee(typeRechercheTrukCacGrpChp.getValues()));
420
				valorisationCollectee.setRechercheType(creerChaineDenormalisee(typeRechercheTrukCacGrpChp.getValues()));
417
				valorisationCollectee.setRechercheType("AUTRE", typeRechercheAutreChp.getValue());
421
				valorisationCollectee.setRechercheType("AUTRE", typeRechercheAutreChp.getValue());
418
			}
422
			}
419
			
423
			
420
			// ACCÈS SANS MOTIF
424
			// ACCÈS SANS MOTIF
421
			if (sansMotifAccesMarkRGrpChp.getValue() != null) {
425
			if (sansMotifAccesMarkRGrpChp.getValue() != null) {
422
				valorisationCollectee.setAccesSansMotif(sansMotifAccesMarkRGrpChp.getValue().getValueAttribute());
426
				valorisationCollectee.setAccesSansMotif(sansMotifAccesMarkRGrpChp.getValue().getValueAttribute());
423
			}
427
			}
424
			// ACCÈS SANS MOTIF INFO
428
			// ACCÈS SANS MOTIF INFO
425
			valorisationCollectee.setAccesSansMotifInfo(sansMotifAccesChp.getValue());
429
			valorisationCollectee.setAccesSansMotifInfo(sansMotifAccesChp.getValue());
426
			
430
			
427
			// VISITE AVEC MOTIF
431
			// VISITE AVEC MOTIF
428
			if (avecMotifAccesMarkRGrpChp.getValue() != null) {
432
			if (avecMotifAccesMarkRGrpChp.getValue() != null) {
429
				valorisationCollectee.setVisiteAvecMotif(avecMotifAccesMarkRGrpChp.getValue().getValueAttribute());
433
				valorisationCollectee.setVisiteAvecMotif(avecMotifAccesMarkRGrpChp.getValue().getValueAttribute());
430
			}
434
			}
431
			// VISITE AVEC MOTIF INFO
435
			// VISITE AVEC MOTIF INFO
432
			valorisationCollectee.setVisiteAvecMotifInfo(avecMotifAccesChp.getValue());
436
			valorisationCollectee.setVisiteAvecMotifInfo(avecMotifAccesChp.getValue());
433
			
437
			
434
			// Retour de l'objet
438
			// Retour de l'objet
435
			if (!valorisationCollectee.comparer(valorisation)) {
439
			if (!valorisationCollectee.comparer(valorisation)) {
436
				valorisationARetourner = valorisation = valorisationCollectee;
440
				valorisationARetourner = valorisation = valorisationCollectee;
437
			}
441
			}
438
		}
442
		}
439
		return valorisationARetourner;
443
		return valorisationARetourner;
440
	}
444
	}
441
	
445
	
442
	private void peuplerStructureValorisation() {
446
	private void peuplerStructureValorisation() {
443
		if (mode.equals(MODE_AJOUTER)) {
447
		if (mode.equals(MODE_AJOUTER)) {
444
			// Indique que l'onglet a pu être modifié pour la méthode collecter...
448
			// Indique que l'onglet a pu être modifié pour la méthode collecter...
445
			valorisationOnglet.setData("acces", true);
449
			valorisationOnglet.setData("acces", true);
446
			// Initialisation de l'objet Structure
450
			// Initialisation de l'objet Structure
447
			valorisation = new StructureValorisation();
451
			valorisation = new StructureValorisation();
448
		}
452
		}
449
		if (mode.equals(MODE_MODIFIER) && valorisation != null && valorisationOnglet.getData("acces").equals(false)) {
453
		if (mode.equals(MODE_MODIFIER) && valorisation != null && valorisationOnglet.getData("acces").equals(false)) {
450
			// ACTION : 
454
			// ACTION : 
451
			//TODO : check below:
455
			//TODO : check below:
452
			((Radio) actionMarkRGrpChp.get((valorisation.getAction().equals("1") ? 0 : 1))).setValue(true);
456
			((Radio) actionMarkRGrpChp.get((valorisation.getAction().equals("1") ? 0 : 1))).setValue(true);
453
			
457
			
454
			// ACTION INFO
458
			// ACTION INFO
455
			peuplerCasesACocher(valorisation.getActionInfo(), actionTrukCacGrpChp, actionAutreChp);
459
			peuplerCasesACocher(valorisation.getActionInfo(), actionTrukCacGrpChp, actionAutreChp);
456
			
460
			
457
			// PUBLICATION
461
			// PUBLICATION
458
			publicationChp.setValue(valorisation.getPublication());
462
			publicationChp.setValue(valorisation.getPublication());
459
			
463
			
460
			// COLLECTION AUTRE
464
			// COLLECTION AUTRE
461
			peuplerCasesACocher(valorisation.getCollectionAutre(), autreCollectionTrukCacGrpChp, autreCollectionAutreChp);
465
			peuplerCasesACocher(valorisation.getCollectionAutre(), autreCollectionTrukCacGrpChp, autreCollectionAutreChp);
462
			
466
			
463
			// ACTION FUTURE
467
			// ACTION FUTURE
464
			((Radio) futureActionMarkRGrpChp.get((valorisation.getActionFuture().equals("1") ? 0 : 1))).setValue(true);
468
			((Radio) futureActionMarkRGrpChp.get((valorisation.getActionFuture().equals("1") ? 0 : 1))).setValue(true);
465
			
469
			
466
			// ACTION FUTURE INFO
470
			// ACTION FUTURE INFO
467
			futureActionChp.setValue(valorisation.getActionFutureInfo());
471
			futureActionChp.setValue(valorisation.getActionFutureInfo());
468
			
472
			
469
			// RECHERCHE
473
			// RECHERCHE
470
			((Radio) rechercheMarkRGrpChp.get((valorisation.getRecherche().equals("1") ? 0 : 1))).setValue(true);
474
			((Radio) rechercheMarkRGrpChp.get((valorisation.getRecherche().equals("1") ? 0 : 1))).setValue(true);
471
			// RECHERCHE PROVENANCE
475
			// RECHERCHE PROVENANCE
472
			peuplerCasesACocher(valorisation.getRechercheProvenance(), provenanceRechercheTrukCacGrpChp, provenanceRechercheAutreChp);
476
			peuplerCasesACocher(valorisation.getRechercheProvenance(), provenanceRechercheTrukCacGrpChp, provenanceRechercheAutreChp);
473
			// RECHERCHE TYPE
477
			// RECHERCHE TYPE
474
			peuplerCasesACocher(valorisation.getRechercheType(), typeRechercheTrukCacGrpChp, typeRechercheAutreChp);
478
			peuplerCasesACocher(valorisation.getRechercheType(), typeRechercheTrukCacGrpChp, typeRechercheAutreChp);
475
 
479
 
476
			// ACCÈS SANS MOTIF
480
			// ACCÈS SANS MOTIF
477
			((Radio) sansMotifAccesMarkRGrpChp.get((valorisation.getAccesSansMotif().equals("1") ? 0 : 1))).setValue(true);
481
			((Radio) sansMotifAccesMarkRGrpChp.get((valorisation.getAccesSansMotif().equals("1") ? 0 : 1))).setValue(true);
478
			// ACCÈS SANS MOTIF INFO
482
			// ACCÈS SANS MOTIF INFO
479
			sansMotifAccesChp.setValue(valorisation.getAccesSansMotifInfo());
483
			sansMotifAccesChp.setValue(valorisation.getAccesSansMotifInfo());
480
			
484
			
481
			// VISITE AVEC MOTIF
485
			// VISITE AVEC MOTIF
482
			((Radio) avecMotifAccesMarkRGrpChp.get((valorisation.getVisiteAvecMotif().equals("1") ? 0 : 1))).setValue(true);
486
			((Radio) avecMotifAccesMarkRGrpChp.get((valorisation.getVisiteAvecMotif().equals("1") ? 0 : 1))).setValue(true);
483
			// VISITE AVEC MOTIF INFO
487
			// VISITE AVEC MOTIF INFO
484
			avecMotifAccesChp.setValue(valorisation.getVisiteAvecMotifInfo());
488
			avecMotifAccesChp.setValue(valorisation.getVisiteAvecMotifInfo());
485
			
489
			
486
			// Indique que l'onglet a été rempli et a pu être modifié pour la méthode collecter... 
490
			// Indique que l'onglet a été rempli et a pu être modifié pour la méthode collecter... 
487
			valorisationOnglet.setData("acces", true);
491
			valorisationOnglet.setData("acces", true);
488
		}
492
		}
489
	}
493
	}
490
	
494
	
491
	private StructureConservation collecterStructureConservation() {
495
	private StructureConservation collecterStructureConservation() {
492
		StructureConservation conservationARetourner = null;
496
		StructureConservation conservationARetourner = null;
493
		if (conservationOnglet.getData("acces").equals(true)) {
497
		if (conservationOnglet.getData("acces").equals(true)) {
494
			// Création de l'objet
498
			// Création de l'objet
495
			StructureConservation conservationCollectee = (StructureConservation) conservation.cloner(new StructureConservation());
499
			StructureConservation conservationCollectee = (StructureConservation) conservation.cloner(new StructureConservation());
496
			
500
			
497
			// FORMATION
501
			// FORMATION
498
			if (formationMarkRGrpChp.getValue() != null) {
502
			if (formationMarkRGrpChp.getValue() != null) {
499
				conservationCollectee.setFormation(formationMarkRGrpChp.getValue().getValueAttribute());
503
				conservationCollectee.setFormation(formationMarkRGrpChp.getValue().getValueAttribute());
500
			}
504
			}
501
			// FORMATION INFO
505
			// FORMATION INFO
502
			conservationCollectee.setFormationInfo(formationChp.getValue());
506
			conservationCollectee.setFormationInfo(formationChp.getValue());
503
			// FORMATION INTERET
507
			// FORMATION INTERET
504
			if (interetFormationMarkRGrpChp.getValue() != null) {
508
			if (interetFormationMarkRGrpChp.getValue() != null) {
505
				conservationCollectee.setFormationInteret(interetFormationMarkRGrpChp.getValue().getValueAttribute());
509
				conservationCollectee.setFormationInteret(interetFormationMarkRGrpChp.getValue().getValueAttribute());
506
			}
510
			}
507
			
511
			
508
			// STOCKAGE LOCAL
512
			// STOCKAGE LOCAL
509
			conservationCollectee.setStockageLocal(creerChaineDenormalisee(localStockageTrukCacGrpChp.getValues()));
513
			conservationCollectee.setStockageLocal(creerChaineDenormalisee(localStockageTrukCacGrpChp.getValues()));
510
			conservationCollectee.setStockageLocal("AUTRE", localStockageAutreChp.getValue());
514
			conservationCollectee.setStockageLocal("AUTRE", localStockageAutreChp.getValue());
511
	
515
	
512
			// STOCKAGE MEUBLE
516
			// STOCKAGE MEUBLE
513
			conservationCollectee.setStockageMeuble(creerChaineDenormalisee(meubleStockageTrukCacGrpChp.getValues()));
517
			conservationCollectee.setStockageMeuble(creerChaineDenormalisee(meubleStockageTrukCacGrpChp.getValues()));
514
			conservationCollectee.setStockageMeuble("AUTRE", meubleStockageAutreChp.getValue());
518
			conservationCollectee.setStockageMeuble("AUTRE", meubleStockageAutreChp.getValue());
515
			
519
			
516
			// STOCKAGE PAREMETRE
520
			// STOCKAGE PAREMETRE
517
			conservationCollectee.setStockageParametre(creerChaineDenormalisee(parametreStockageTrukCacGrpChp.getValues()));
521
			conservationCollectee.setStockageParametre(creerChaineDenormalisee(parametreStockageTrukCacGrpChp.getValues()));
518
			conservationCollectee.setStockageParametre("AUTRE", parametreStockageAutreChp.getValue());
522
			conservationCollectee.setStockageParametre("AUTRE", parametreStockageAutreChp.getValue());
519
			
523
			
520
			// COLLECTION COMMUNE
524
			// COLLECTION COMMUNE
521
			if (collectionCommuneMarkRGrpChp.getValue() != null) {
525
			if (collectionCommuneMarkRGrpChp.getValue() != null) {
522
				conservationCollectee.setCollectionCommune(collectionCommuneMarkRGrpChp.getValue().getValueAttribute());
526
				conservationCollectee.setCollectionCommune(collectionCommuneMarkRGrpChp.getValue().getValueAttribute());
523
			}
527
			}
524
			// COLLECTION AUTRE
528
			// COLLECTION AUTRE
525
			conservationCollectee.setCollectionAutre(creerChaineDenormalisee(collectionAutreTrukCacGrpChp.getValues()));
529
			conservationCollectee.setCollectionAutre(creerChaineDenormalisee(collectionAutreTrukCacGrpChp.getValues()));
526
			conservationCollectee.setCollectionAutre("AUTRE", collectionAutreAutreChp.getValue());
530
			conservationCollectee.setCollectionAutre("AUTRE", collectionAutreAutreChp.getValue());
527
			
531
			
528
			// ACCÈS CONTROLÉ
532
			// ACCÈS CONTROLÉ
529
			if (accesControleMarkRGrpChp.getValue() != null) {
533
			if (accesControleMarkRGrpChp.getValue() != null) {
530
				conservationCollectee.setAccesControle(accesControleMarkRGrpChp.getValue().getValueAttribute());
534
				conservationCollectee.setAccesControle(accesControleMarkRGrpChp.getValue().getValueAttribute());
531
			}
535
			}
532
			
536
			
533
			// RESTAURATION
537
			// RESTAURATION
534
			if (restaurationMarkRGrpChp.getValue() != null) {
538
			if (restaurationMarkRGrpChp.getValue() != null) {
535
				conservationCollectee.setRestauration(restaurationMarkRGrpChp.getValue().getValueAttribute());
539
				conservationCollectee.setRestauration(restaurationMarkRGrpChp.getValue().getValueAttribute());
536
			}
540
			}
537
			// RESTAURATION OPÉRATION
541
			// RESTAURATION OPÉRATION
538
			conservationCollectee.setRestaurationOperation(creerChaineDenormalisee(opRestauTrukCacGrpChp.getValues()));
542
			conservationCollectee.setRestaurationOperation(creerChaineDenormalisee(opRestauTrukCacGrpChp.getValues()));
539
			conservationCollectee.setRestaurationOperation("AUTRE", opRestauAutreChp.getValue());
543
			conservationCollectee.setRestaurationOperation("AUTRE", opRestauAutreChp.getValue());
540
			
544
			
541
			// MATERIEL CONSERVATION
545
			// MATERIEL CONSERVATION
542
			if (materielConservationCeRGrpChp.getValue() != null) {
546
			if (materielConservationCeRGrpChp.getValue() != null) {
543
				conservationCollectee.setMaterielConservation(materielConservationCeRGrpChp.getValue().getValueAttribute());
547
				conservationCollectee.setMaterielConservation(materielConservationCeRGrpChp.getValue().getValueAttribute());
544
 
548
 
545
				// MATERIEL AUTRE
549
				// MATERIEL AUTRE
546
				conservationCollectee.setMaterielAutre(creerChaineDenormalisee(autreMaterielTrukCacGrpChp.getValues()));
550
				conservationCollectee.setMaterielAutre(creerChaineDenormalisee(autreMaterielTrukCacGrpChp.getValues()));
547
				conservationCollectee.setMaterielAutre("AUTRE", autreMaterielAutreChp.getValue());
551
				conservationCollectee.setMaterielAutre("AUTRE", autreMaterielAutreChp.getValue());
548
			}
552
			}
549
			
553
			
550
			// TRAITEMENT
554
			// TRAITEMENT
551
			if (traitementMarkRGrpChp.getValue() != null) {
555
			if (traitementMarkRGrpChp.getValue() != null) {
552
				conservationCollectee.setTraitement(traitementMarkRGrpChp.getValue().getValueAttribute());
556
				conservationCollectee.setTraitement(traitementMarkRGrpChp.getValue().getValueAttribute());
553
			}
557
			}
554
			// TRAIEMENTS
558
			// TRAIEMENTS
555
			conservationCollectee.setTraitements(creerChaineDenormalisee(traitementTrukCacGrpChp.getValues()));
559
			conservationCollectee.setTraitements(creerChaineDenormalisee(traitementTrukCacGrpChp.getValues()));
556
			conservationCollectee.setTraitements("AUTRE", traitementAutreChp.getValue());
560
			conservationCollectee.setTraitements("AUTRE", traitementAutreChp.getValue());
557
			
561
			
558
			
562
			
559
			// ACQUISITION COLLECTION
563
			// ACQUISITION COLLECTION
560
			if (collectionAcquisitionMarkRGrpChp.getValue() != null) {
564
			if (collectionAcquisitionMarkRGrpChp.getValue() != null) {
561
				conservationCollectee.setAcquisitionCollection(collectionAcquisitionMarkRGrpChp.getValue().getValueAttribute());
565
				conservationCollectee.setAcquisitionCollection(collectionAcquisitionMarkRGrpChp.getValue().getValueAttribute());
562
			}
566
			}
563
			
567
			
564
			// ACQUISITION ECHANTILLON
568
			// ACQUISITION ECHANTILLON
565
			if (echantillonAcquisitionMarkRGrpChp.getValue() != null) {
569
			if (echantillonAcquisitionMarkRGrpChp.getValue() != null) {
566
				conservationCollectee.setAcquisitionEchantillon(echantillonAcquisitionMarkRGrpChp.getValue().getValueAttribute());
570
				conservationCollectee.setAcquisitionEchantillon(echantillonAcquisitionMarkRGrpChp.getValue().getValueAttribute());
567
			}
571
			}
568
			// ACQUISITION TRAITEMENT
572
			// ACQUISITION TRAITEMENT
569
			if (traitementAcquisitionMarkRGrpChp.getValue() != null) {
573
			if (traitementAcquisitionMarkRGrpChp.getValue() != null) {
570
				conservationCollectee.setAcquisitionTraitement(traitementAcquisitionMarkRGrpChp.getValue().getValueAttribute());
574
				conservationCollectee.setAcquisitionTraitement(traitementAcquisitionMarkRGrpChp.getValue().getValueAttribute());
571
			}
575
			}
572
			// ACQUISITION TRAITEMENT POISON
576
			// ACQUISITION TRAITEMENT POISON
573
			conservationCollectee.setAcquisitionTraitementPoison(creerChaineDenormalisee(poisonTraitementTrukCacGrpChp.getValues()));
577
			conservationCollectee.setAcquisitionTraitementPoison(creerChaineDenormalisee(poisonTraitementTrukCacGrpChp.getValues()));
574
			conservationCollectee.setAcquisitionTraitementPoison("AUTRE", poisonTraitementAutreChp.getValue());
578
			conservationCollectee.setAcquisitionTraitementPoison("AUTRE", poisonTraitementAutreChp.getValue());
575
			// ACQUISITION TRAITEMENT INSECTE
579
			// ACQUISITION TRAITEMENT INSECTE
576
			conservationCollectee.setAcquisitionTraitementInsecte(creerChaineDenormalisee(insecteTraitementTrukCacGrpChp.getValues()));
580
			conservationCollectee.setAcquisitionTraitementInsecte(creerChaineDenormalisee(insecteTraitementTrukCacGrpChp.getValues()));
577
			conservationCollectee.setAcquisitionTraitementInsecte("AUTRE", insecteTraitementAutreChp.getValue());
581
			conservationCollectee.setAcquisitionTraitementInsecte("AUTRE", insecteTraitementAutreChp.getValue());
578
			
582
			
579
			// Retour de l'objet
583
			// Retour de l'objet
580
			if (!conservationCollectee.comparer(conservation)) {
584
			if (!conservationCollectee.comparer(conservation)) {
581
				GWT.log("Collecte différent de Retour", null);
585
				GWT.log("Collecte différent de Retour", null);
582
				conservationARetourner = conservation = conservationCollectee;
586
				conservationARetourner = conservation = conservationCollectee;
583
			}
587
			}
584
		}
588
		}
585
		return conservationARetourner;
589
		return conservationARetourner;
586
	}
590
	}
587
	
591
	
588
	private void peuplerStructureConservation() {
592
	private void peuplerStructureConservation() {
589
		if (mode.equals(MODE_AJOUTER)) {
593
		if (mode.equals(MODE_AJOUTER)) {
590
			// Indique que l'onglet a pu être modifié pour la méthode collecter...
594
			// Indique que l'onglet a pu être modifié pour la méthode collecter...
591
			conservationOnglet.setData("acces", true);
595
			conservationOnglet.setData("acces", true);
592
			// Initialisation de l'objet Structure
596
			// Initialisation de l'objet Structure
593
			conservation = new StructureConservation();
597
			conservation = new StructureConservation();
594
		}
598
		}
595
		if (mode.equals(MODE_MODIFIER) && conservation != null && conservationOnglet.getData("acces").equals(false)) {
599
		if (mode.equals(MODE_MODIFIER) && conservation != null && conservationOnglet.getData("acces").equals(false)) {
596
			// FORMATION
600
			// FORMATION
597
			// Bouton oui, à toujours l'index 0 donc on teste en fonction...
601
			// Bouton oui, à toujours l'index 0 donc on teste en fonction...
598
			((Radio) formationMarkRGrpChp.get((conservation.getFormation().equals("1") ? 0 : 1))).setValue(true);
602
			((Radio) formationMarkRGrpChp.get((conservation.getFormation().equals("1") ? 0 : 1))).setValue(true);
599
			// FORMATION INFO
603
			// FORMATION INFO
600
			formationChp.setValue(conservation.getFormationInfo());
604
			formationChp.setValue(conservation.getFormationInfo());
601
			// FORMATION INTERET
605
			// FORMATION INTERET
602
			((Radio) interetFormationMarkRGrpChp.get((conservation.getFormationInteret().equals("1") ? 0 : 1))).setValue(true);
606
			((Radio) interetFormationMarkRGrpChp.get((conservation.getFormationInteret().equals("1") ? 0 : 1))).setValue(true);
603
	
607
	
604
			// STOCKAGE LOCAL		
608
			// STOCKAGE LOCAL		
605
			peuplerCasesACocher(conservation.getStockageLocal(), localStockageTrukCacGrpChp,localStockageAutreChp);
609
			peuplerCasesACocher(conservation.getStockageLocal(), localStockageTrukCacGrpChp,localStockageAutreChp);
606
	
610
	
607
			// STOCKAGE MEUBLE
611
			// STOCKAGE MEUBLE
608
			peuplerCasesACocher(conservation.getStockageMeuble(), meubleStockageTrukCacGrpChp, meubleStockageAutreChp);
612
			peuplerCasesACocher(conservation.getStockageMeuble(), meubleStockageTrukCacGrpChp, meubleStockageAutreChp);
609
	
613
	
610
			// STOCKAGE PAREMETRE
614
			// STOCKAGE PAREMETRE
611
			peuplerCasesACocher(conservation.getStockageParametre(), parametreStockageTrukCacGrpChp, parametreStockageAutreChp);
615
			peuplerCasesACocher(conservation.getStockageParametre(), parametreStockageTrukCacGrpChp, parametreStockageAutreChp);
612
			
616
			
613
			// COLLECTION COMMUNE
617
			// COLLECTION COMMUNE
614
			((Radio) collectionCommuneMarkRGrpChp.get((conservation.getCollectionCommune().equals("1") ? 0 : 1))).setValue(true);
618
			((Radio) collectionCommuneMarkRGrpChp.get((conservation.getCollectionCommune().equals("1") ? 0 : 1))).setValue(true);
615
			// COLLECTION AUTRE
619
			// COLLECTION AUTRE
616
			peuplerCasesACocher(conservation.getCollectionAutre(), collectionAutreTrukCacGrpChp, collectionAutreAutreChp);
620
			peuplerCasesACocher(conservation.getCollectionAutre(), collectionAutreTrukCacGrpChp, collectionAutreAutreChp);
617
			
621
			
618
			// ACCÈS CONTROLÉ
622
			// ACCÈS CONTROLÉ
619
			((Radio) accesControleMarkRGrpChp.get((conservation.getAccesControle().equals("1") ? 0 : 1))).setValue(true);
623
			((Radio) accesControleMarkRGrpChp.get((conservation.getAccesControle().equals("1") ? 0 : 1))).setValue(true);
620
			
624
			
621
			// RESTAURATION
625
			// RESTAURATION
622
			((Radio) restaurationMarkRGrpChp.get((conservation.getRestauration().equals("1") ? 0 : 1))).setValue(true);
626
			((Radio) restaurationMarkRGrpChp.get((conservation.getRestauration().equals("1") ? 0 : 1))).setValue(true);
623
			// RESTAURATION OPÉRATION
627
			// RESTAURATION OPÉRATION
624
			peuplerCasesACocher(conservation.getRestaurationOperation(), opRestauTrukCacGrpChp, opRestauAutreChp);
628
			peuplerCasesACocher(conservation.getRestaurationOperation(), opRestauTrukCacGrpChp, opRestauAutreChp);
625
			
629
			
626
			// MATERIEL CONSERVATION
630
			// MATERIEL CONSERVATION
627
			peuplerBoutonsRadio(conservation.getMaterielConservation(), materielConservationCeRGrpChp);
631
			peuplerBoutonsRadio(conservation.getMaterielConservation(), materielConservationCeRGrpChp);
628
			
632
			
629
			// MATERIEL AUTRE
633
			// MATERIEL AUTRE
630
			peuplerCasesACocher(conservation.getMaterielAutre(), autreMaterielTrukCacGrpChp, autreMaterielAutreChp);
634
			peuplerCasesACocher(conservation.getMaterielAutre(), autreMaterielTrukCacGrpChp, autreMaterielAutreChp);
631
			
635
			
632
			// TRAITEMENT
636
			// TRAITEMENT
633
			((Radio) traitementMarkRGrpChp.get((conservation.getTraitement().equals("1") ? 0 : 1))).setValue(true);
637
			((Radio) traitementMarkRGrpChp.get((conservation.getTraitement().equals("1") ? 0 : 1))).setValue(true);
634
			// TRAITEMENTS
638
			// TRAITEMENTS
635
			peuplerCasesACocher(conservation.getTraitements(), traitementTrukCacGrpChp, traitementAutreChp);
639
			peuplerCasesACocher(conservation.getTraitements(), traitementTrukCacGrpChp, traitementAutreChp);
636
			
640
			
637
			// ACQUISITION COLLECTION
641
			// ACQUISITION COLLECTION
638
			((Radio) collectionAcquisitionMarkRGrpChp.get((conservation.getAcquisitionCollection().equals("1") ? 0 : 1))).setValue(true);
642
			((Radio) collectionAcquisitionMarkRGrpChp.get((conservation.getAcquisitionCollection().equals("1") ? 0 : 1))).setValue(true);
639
			
643
			
640
			// ACQUISITION ECHANTILLON
644
			// ACQUISITION ECHANTILLON
641
			((Radio) echantillonAcquisitionMarkRGrpChp.get((conservation.getAcquisitionEchantillon().equals("1") ? 0 : 1))).setValue(true);
645
			((Radio) echantillonAcquisitionMarkRGrpChp.get((conservation.getAcquisitionEchantillon().equals("1") ? 0 : 1))).setValue(true);
642
			
646
			
643
			// ACQUISITION TRAITEMENT
647
			// ACQUISITION TRAITEMENT
644
			((Radio) traitementAcquisitionMarkRGrpChp.get((conservation.getAcquisitionTraitement().equals("1") ? 0 : 1))).setValue(true);			
648
			((Radio) traitementAcquisitionMarkRGrpChp.get((conservation.getAcquisitionTraitement().equals("1") ? 0 : 1))).setValue(true);			
645
			// ACQUISITION TRAITEMENT POISON
649
			// ACQUISITION TRAITEMENT POISON
646
			peuplerCasesACocher(conservation.getAcquisitionTraitementPoison(), poisonTraitementTrukCacGrpChp, poisonTraitementAutreChp);
650
			peuplerCasesACocher(conservation.getAcquisitionTraitementPoison(), poisonTraitementTrukCacGrpChp, poisonTraitementAutreChp);
647
			// ACQUISITION TRAITEMENT INSECTE
651
			// ACQUISITION TRAITEMENT INSECTE
648
			peuplerCasesACocher(conservation.getAcquisitionTraitementInsecte(), insecteTraitementTrukCacGrpChp, insecteTraitementAutreChp);
652
			peuplerCasesACocher(conservation.getAcquisitionTraitementInsecte(), insecteTraitementTrukCacGrpChp, insecteTraitementAutreChp);
649
			
653
			
650
			// Indique que l'onglet a été rempli et a pu être modifié pour la méthode collecter...
654
			// Indique que l'onglet a été rempli et a pu être modifié pour la méthode collecter...
651
			conservationOnglet.setData("acces", true);
655
			conservationOnglet.setData("acces", true);
652
		}
656
		}
653
	}
657
	}
654
	
658
	
655
	private Structure collecterStructureIdentification() {
659
	private Structure collecterStructureIdentification() {
656
		Structure structureARetourner = null;
660
		Structure structureARetourner = null;
657
		if (identificationOnglet.getData("acces").equals(true)) {
661
		if (identificationOnglet.getData("acces").equals(true)) {
658
			
662
			
659
			Structure structureCollectee = (Structure) identification.cloner(new Structure());
663
			Structure structureCollectee = (Structure) identification.cloner(new Structure());
660
			
664
			
661
			structureCollectee.setId(idStructureChp.getValue());
665
			structureCollectee.setId(idStructureChp.getValue());
662
			structureCollectee.setNom(nomStructureChp.getValue());
666
			structureCollectee.setNom(nomStructureChp.getValue());
663
			// Récupération de l'identifiant du projet
667
			// Récupération de l'identifiant du projet
664
			if (projetsCombo.getCombo().getValue() != null) {
668
			if (projetsCombo.getCombo().getValue() != null) {
665
				structureCollectee.setIdProjet(new Projet(projetsCombo.getValeur()).getId());
669
				structureCollectee.setIdProjet(new Projet(projetsCombo.getValeur()).getId());
666
			}
670
			}
667
			// Récupération de l'acronyme (= identifiant alternatif)
671
			// Récupération de l'acronyme (= identifiant alternatif)
668
			structureCollectee.setIdAlternatif(null);
672
			structureCollectee.setIdAlternatif(null);
669
			if (comboAcronyme.getValue() != null) {
673
			if (comboAcronyme.getValue() != null) {
670
				String typeAcronyme = comboAcronyme.getValue().getAbr();
674
				String typeAcronyme = comboAcronyme.getValue().getAbr();
671
				if (typeAcronyme == "IH") {
675
				if (typeAcronyme == "IH") {
672
					structureCollectee.setIdAlternatif(typeAcronyme+"##"+ihChp.getValue());
676
					structureCollectee.setIdAlternatif(typeAcronyme+"##"+ihChp.getValue());
673
				} else if (typeAcronyme == "MNHN") {
677
				} else if (typeAcronyme == "MNHN") {
674
					structureCollectee.setIdAlternatif(typeAcronyme+"##"+mnhnChp.getValue());
678
					structureCollectee.setIdAlternatif(typeAcronyme+"##"+mnhnChp.getValue());
675
				}
679
				}
676
			}
680
			}
677
			// Récupération statut de la structure
681
			// Récupération statut de la structure
678
			structureCollectee.setTypePublic(null);
682
			structureCollectee.setTypePublic(null);
679
			structureCollectee.setTypePrive(null);
683
			structureCollectee.setTypePrive(null);
680
			if (comboTypeStructure.getValue() != null) {
684
			if (comboTypeStructure.getValue() != null) {
681
				String typeStructure = comboTypeStructure.getValue().getAbr();
685
				String typeStructure = comboTypeStructure.getValue().getAbr();
682
				if (typeStructure == "stpu" && comboLstpu.getValue() != null) {
686
				if (typeStructure == "stpu" && comboLstpu.getValue() != null) {
683
					structureCollectee.setTypePublic(comboLstpu.getValue().getId());
687
					structureCollectee.setTypePublic(comboLstpu.getValue().getId());
684
				} else if (typeStructure == "stpr" && comboLstpr.getValue() != null) {
688
				} else if (typeStructure == "stpr" && comboLstpr.getValue() != null) {
685
					structureCollectee.setTypePrive(comboLstpr.getValue().getId());
689
					structureCollectee.setTypePrive(comboLstpr.getValue().getId());
686
				}
690
				}
687
			}
691
			}
688
			
692
			
689
			String valeurDateFondation = dateFondationChp.getValue();
693
			String valeurDateFondation = dateFondationChp.getValue();
690
			if (!UtilString.isEmpty(valeurDateFondation))	{
694
			if (!UtilString.isEmpty(valeurDateFondation))	{
691
				if (valeurDateFondation.matches("\\d{2}/\\d{2}/\\d{4}"))	{
695
				if (valeurDateFondation.matches("\\d{2}/\\d{2}/\\d{4}"))	{
692
					Date dateFondation = DateTimeFormat.getFormat("dd/MM/yyyy").parse(valeurDateFondation);
696
					Date dateFondation = DateTimeFormat.getFormat("dd/MM/yyyy").parse(valeurDateFondation);
693
					structureCollectee.setDateFondation(dateFondation);
697
					structureCollectee.setDateFondation(dateFondation);
694
				} else if (valeurDateFondation.matches("\\d{4}"))	{
698
				} else if (valeurDateFondation.matches("\\d{4}"))	{
695
					structureCollectee.setDateFondation(valeurDateFondation + "-00-00");
699
					structureCollectee.setDateFondation(valeurDateFondation + "-00-00");
696
				}
700
				}
697
			}
701
			}
698
			
702
			
699
			structureCollectee.setDescription(descriptionChp.getValue());
703
			structureCollectee.setDescription(descriptionChp.getValue());
700
			structureCollectee.setConditionAcces(conditionAccesChp.getValue());
704
			structureCollectee.setConditionAcces(conditionAccesChp.getValue());
701
			structureCollectee.setConditionUsage(conditionUsageChp.getValue());
705
			structureCollectee.setConditionUsage(conditionUsageChp.getValue());
702
			
706
			
703
			structureCollectee.setAdresse(adrChp.getValue());
707
			structureCollectee.setAdresse(adrChp.getValue());
704
			structureCollectee.setAdresseComplement(adrComplementChp.getValue());
708
			structureCollectee.setAdresseComplement(adrComplementChp.getValue());
705
			structureCollectee.setCodePostal(cpChp.getValue());
709
			structureCollectee.setCodePostal(cpChp.getValue());
706
			structureCollectee.setVille(villeChp.getValue());
710
			structureCollectee.setVille(villeChp.getValue());
707
			
711
			
708
			String strRegion = "";
712
			String strRegion = "";
709
			Valeur valeurRegion = comboRegion.getValue();
713
			Valeur valeurRegion = comboRegion.getValue();
710
			if (valeurRegion == null)	{
714
			if (valeurRegion == null)	{
711
				strRegion = "AUTRE##" + comboRegion.getRawValue();	
715
				strRegion = "AUTRE##" + comboRegion.getRawValue();	
712
			} else	{
716
			} else	{
713
				strRegion = valeurRegion.getId();
717
				strRegion = valeurRegion.getId();
714
			}
718
			}
715
			
719
			
716
			structureCollectee.setRegion(strRegion);
720
			structureCollectee.setRegion(strRegion);
717
			structureCollectee.setPays(null);
721
			structureCollectee.setPays(null);
718
			if (comboPays.getCombo().getValue() != null) {
722
			if (comboPays.getCombo().getValue() != null) {
719
				structureCollectee.setPays(new Valeur(comboPays.getValeur()).getId());
723
				structureCollectee.setPays(new Valeur(comboPays.getValeur()).getId());
720
			} else if (comboPays.getCombo().getRawValue() != "") {
724
			} else if (comboPays.getCombo().getRawValue() != "") {
721
				structureCollectee.setPays(comboPays.getCombo().getRawValue());
725
				structureCollectee.setPays(comboPays.getCombo().getRawValue());
722
			}
726
			}
723
			structureCollectee.setLatitude(latitudeChp.getValue());
727
			structureCollectee.setLatitude(latitudeChp.getValue());
724
			structureCollectee.setLongitude(longitudeChp.getValue());
728
			structureCollectee.setLongitude(longitudeChp.getValue());
725
			
729
			
726
			structureCollectee.setTelephoneFixe(telChp.getValue());
730
			structureCollectee.setTelephoneFixe(telChp.getValue());
727
			structureCollectee.setFax(faxChp.getValue());
731
			structureCollectee.setFax(faxChp.getValue());
728
			
732
			
729
			structureCollectee.setCourriel(emailChp.getValue());
733
			structureCollectee.setCourriel(emailChp.getValue());
730
			structureCollectee.setUrl(Structure.URL_SITE, urlChp.getValue());
734
			structureCollectee.setUrl(Structure.URL_SITE, urlChp.getValue());
731
			
735
			
732
			if (nbreTotalPersonneStructureChp.getValue() != null) {
736
			if (nbreTotalPersonneStructureChp.getValue() != null) {
733
				structureCollectee.setNbrePersonne(nbreTotalPersonneStructureChp.getValue().intValue());
737
				structureCollectee.setNbrePersonne(nbreTotalPersonneStructureChp.getValue().intValue());
734
			}
738
			}
735
			
739
			
736
			if (!structureCollectee.comparer(identification)) {
740
			if (!structureCollectee.comparer(identification)) {
737
				structureARetourner = identification = structureCollectee;
741
				structureARetourner = identification = structureCollectee;
738
			}
742
			}
739
			
743
			
740
		}
744
		}
741
		return structureARetourner;
745
		return structureARetourner;
742
	}
746
	}
743
	
747
	
744
	private void peuplerStructureIdentification() {
748
	private void peuplerStructureIdentification() {
745
		if (mode.equals(MODE_AJOUTER)) {
749
		if (mode.equals(MODE_AJOUTER)) {
746
			// Indique que l'ongleta pu être modifié pour la méthode collecter...
750
			// Indique que l'ongleta pu être modifié pour la méthode collecter...
747
			identificationOnglet.setData("acces", true);
751
			identificationOnglet.setData("acces", true);
748
			// Initialisation de l'objet Structure
752
			// Initialisation de l'objet Structure
749
			identification = new Structure();
753
			identification = new Structure();
750
			// Indication du projet sélectionné par défaut
754
			// Indication du projet sélectionné par défaut
751
			String projetCourantId = ((Mediateur) Registry.get(RegistreId.MEDIATEUR)).getProjetId();
755
			String projetCourantId = ((Mediateur) Registry.get(RegistreId.MEDIATEUR)).getProjetId();
752
			if (projetCourantId != null && !projetCourantId.equals("0")) {
756
			if (projetCourantId != null && !projetCourantId.equals("0")) {
753
				projetsCombo.getCombo().setValue(projetsCombo.getStore().findModel("cpr_id_projet", projetCourantId));
757
				projetsCombo.getCombo().setValue(projetsCombo.getStore().findModel("cpr_id_projet", projetCourantId));
754
			}
758
			}
755
		}
759
		}
756
		if (mode.equals(MODE_MODIFIER) && identification != null && identificationOnglet.getData("acces").equals(false)) {
760
		if (mode.equals(MODE_MODIFIER) && identification != null && identificationOnglet.getData("acces").equals(false)) {
757
			idStructureChp.setValue(identification.getId());
761
			idStructureChp.setValue(identification.getId());
758
			nomStructureChp.setValue(identification.getNom());
762
			nomStructureChp.setValue(identification.getNom());
759
			if (!identification.getIdProjet().equals("0")) {
763
			if (!identification.getIdProjet().equals("0")) {
760
				projetsCombo.getCombo().setValue(projetsCombo.getStore().findModel("cpr_id_projet", identification.getIdProjet()));
764
				projetsCombo.getCombo().setValue(projetsCombo.getStore().findModel("cpr_id_projet", identification.getIdProjet()));
761
			}
765
			}
762
			
766
			
763
			if (!identification.getIdAlternatif().isEmpty()) {
767
			if (!identification.getIdAlternatif().isEmpty()) {
764
				String[] acronyme = identification.getIdAlternatif().split("##");
768
				String[] acronyme = identification.getIdAlternatif().split("##");
765
				//#436 : Ne pas afficher "null"
769
				//#436 : Ne pas afficher "null"
766
				if (UtilString.isEmpty(acronyme[1]) || acronyme[1].equals("null"))	{
770
				if (UtilString.isEmpty(acronyme[1]) || acronyme[1].equals("null"))	{
767
					acronyme[1] = "";
771
					acronyme[1] = "";
768
				}
772
				}
769
				
773
				
770
				if (acronyme[0].matches("^IH$")) {
774
				if (acronyme[0].matches("^IH$")) {
771
					comboAcronyme.setValue(InterneValeurListe.getTypeAcronymeIH());
775
					comboAcronyme.setValue(InterneValeurListe.getTypeAcronymeIH());
772
					ihChp.setValue(acronyme[1]);
776
					ihChp.setValue(acronyme[1]);
773
				} else if (acronyme[0].matches("^MNHN$")) {
777
				} else if (acronyme[0].matches("^MNHN$")) {
774
					comboAcronyme.setValue(InterneValeurListe.getTypeAcronymeMNHN());
778
					comboAcronyme.setValue(InterneValeurListe.getTypeAcronymeMNHN());
775
					mnhnChp.setValue(acronyme[1]);
779
					mnhnChp.setValue(acronyme[1]);
776
				}
780
				}
777
			}
781
			}
778
			if (!identification.getTypePrive().isEmpty()) {
782
			if (!identification.getTypePrive().isEmpty()) {
779
				if (identification.getTypePrive().matches("^[0-9]+$")) {
783
				if (identification.getTypePrive().matches("^[0-9]+$")) {
780
					comboTypeStructure.setValue(InterneValeurListe.getTypePrivee());
784
					comboTypeStructure.setValue(InterneValeurListe.getTypePrivee());
781
					comboLstpr.setValue(comboLstpr.getStore().findModel("id_valeur", identification.getTypePrive()));
785
					comboLstpr.setValue(comboLstpr.getStore().findModel("id_valeur", identification.getTypePrive()));
782
				}
786
				}
783
			} else if (!identification.getTypePublic().isEmpty()) {
787
			} else if (!identification.getTypePublic().isEmpty()) {
784
				if (identification.getTypePublic().matches("^[0-9]+$")) {
788
				if (identification.getTypePublic().matches("^[0-9]+$")) {
785
					comboTypeStructure.setValue(InterneValeurListe.getTypePublique());
789
					comboTypeStructure.setValue(InterneValeurListe.getTypePublique());
786
					comboLstpu.setValue(comboLstpu.getStore().findModel("id_valeur", identification.getTypePublic()));
790
					comboLstpu.setValue(comboLstpu.getStore().findModel("id_valeur", identification.getTypePublic()));
787
				}
791
				}
788
			}
792
			}
789
			
793
			
790
			String dateFondation = identification.getAnneeOuDateFondation();
794
			String dateFondation = identification.getAnneeOuDateFondation();
791
			if (!dateFondation.equals(""))	{
795
			if (!dateFondation.equals(""))	{
792
				if (dateFondation.endsWith("00-00"))	{
796
				if (dateFondation.endsWith("00-00"))	{
793
					dateFondationChp.setValue(dateFondation.substring(0, 4));
797
					dateFondationChp.setValue(dateFondation.substring(0, 4));
794
				} else {
798
				} else {
795
					Date date = DateTimeFormat.getFormat("yyyy-MM-dd").parse(dateFondation);
799
					Date date = DateTimeFormat.getFormat("yyyy-MM-dd").parse(dateFondation);
796
					dateFondationChp.setValue(DateTimeFormat.getFormat("dd/MM/yyyy").format(date));
800
					dateFondationChp.setValue(DateTimeFormat.getFormat("dd/MM/yyyy").format(date));
797
				}
801
				}
798
			}
802
			}
799
			
803
			
800
			descriptionChp.setValue(identification.getDescription());
804
			descriptionChp.setValue(identification.getDescription());
801
			conditionAccesChp.setValue(identification.getConditionAcces());
805
			conditionAccesChp.setValue(identification.getConditionAcces());
802
			conditionUsageChp.setValue(identification.getConditionUsage());
806
			conditionUsageChp.setValue(identification.getConditionUsage());
803
			
807
			
804
			adrChp.setValue(identification.getAdresse());
808
			adrChp.setValue(identification.getAdresse());
805
			adrComplementChp.setValue(identification.getAdresseComplement());
809
			adrComplementChp.setValue(identification.getAdresseComplement());
806
			cpChp.setValue(identification.getCodePostal());
810
			cpChp.setValue(identification.getCodePostal());
807
			villeChp.setValue(identification.getVille());
811
			villeChp.setValue(identification.getVille());
808
			mettreAJourRegion();
812
			mettreAJourRegion();
809
			//(identification.getRegion());
813
			//(identification.getRegion());
810
			if (identification.getPays().matches("^[0-9]+$")) {
814
			if (identification.getPays().matches("^[0-9]+$")) {
811
				comboPays.getCombo().setValue(comboPays.getStore().findModel("cmlv_id_valeur", identification.getPays()));
815
				comboPays.getCombo().setValue(comboPays.getStore().findModel("cmlv_id_valeur", identification.getPays()));
812
			} else {
816
			} else {
813
				comboPays.getCombo().setRawValue(identification.getPays());
817
				comboPays.getCombo().setRawValue(identification.getPays());
814
			}
818
			}
815
			latitudeChp.setValue(identification.getLatitude());
819
			latitudeChp.setValue(identification.getLatitude());
816
			longitudeChp.setValue(identification.getLongitude());
820
			longitudeChp.setValue(identification.getLongitude());
817
			
821
			
818
			telChp.setValue(identification.getTelephoneFixe());
822
			telChp.setValue(identification.getTelephoneFixe());
819
			faxChp.setValue(identification.getFax());
823
			faxChp.setValue(identification.getFax());
820
			
824
			
821
			emailChp.setValue(identification.getCourriel());
825
			emailChp.setValue(identification.getCourriel());
822
			urlChp.setValue(identification.getUrl("WEB"));
826
			urlChp.setValue(identification.getUrl("WEB"));
823
			
827
			
824
			nbreTotalPersonneStructureChp.setValue(identification.getNbrePersonne());
828
			nbreTotalPersonneStructureChp.setValue(identification.getNbrePersonne());
825
			
829
			
826
			// Indique que l'onglet a été rempli et a pu être modifié pour la méthode collecter...
830
			// Indique que l'onglet a été rempli et a pu être modifié pour la méthode collecter...
827
			identificationOnglet.setData("acces", true);
831
			identificationOnglet.setData("acces", true);
828
		}
832
		}
829
	}
833
	}
830
	
834
	
831
	private TabItem creerOngletValorisation() {
835
	private TabItem creerOngletValorisation() {
832
		valorisationOnglet = creerOnglet("Valorisation", "valorisation");
836
		valorisationOnglet = creerOnglet("Valorisation", "valorisation");
833
		valorisationOnglet.setLayout(creerFormLayout(650, LabelAlign.TOP));
837
		valorisationOnglet.setLayout(creerFormLayout(650, LabelAlign.TOP));
834
		Listener<ComponentEvent> ecouteurSelection = new Listener<ComponentEvent>() {  
838
		Listener<ComponentEvent> ecouteurSelection = new Listener<ComponentEvent>() {  
835
			public void handleEvent(ComponentEvent be) {  
839
			public void handleEvent(ComponentEvent be) {  
836
				peuplerStructureValorisation();
840
				peuplerStructureValorisation();
837
				valorisationOnglet.layout();
841
				valorisationOnglet.layout();
838
			}  
842
			}  
839
		};
843
		};
840
		valorisationOnglet.addListener(Events.Select, ecouteurSelection);
844
		valorisationOnglet.addListener(Events.Select, ecouteurSelection);
841
		
845
		
842
		actionMarkRGrpChp = creerChoixUniqueRadioGroupe("action_mark", "ouiNon");
846
		actionMarkRGrpChp = creerChoixUniqueRadioGroupe("action_mark", "ouiNon");
843
		actionMarkRGrpChp.setFieldLabel("Avez-vous réalisé des actions de valorisation de vos collections botaniques ou avez-vous été sollicités pour la valorisation de ces collections ?");
847
		actionMarkRGrpChp.setFieldLabel("Avez-vous réalisé des actions de valorisation de vos collections botaniques ou avez-vous été sollicités pour la valorisation de ces collections ?");
844
		valorisationOnglet.add(actionMarkRGrpChp);
848
		valorisationOnglet.add(actionMarkRGrpChp);
845
		
849
		
846
		
850
		
847
		actionTrukCp = creerChoixMultipleCp();
851
		actionTrukCp = creerChoixMultipleCp();
848
		actionTrukCp.hide();
852
		actionTrukCp.hide();
849
		actionTrukCacGrpChp = new CheckBoxGroup();
853
		actionTrukCacGrpChp = new CheckBoxGroup();
850
		actionTrukCacGrpChp.setFieldLabel("Si oui, lesquelles ?");
854
		actionTrukCacGrpChp.setFieldLabel("Si oui, lesquelles ?");
851
		valorisationOnglet.add(actionTrukCp);
855
		valorisationOnglet.add(actionTrukCp);
852
		mediateur.obtenirListeValeurEtRafraichir(this, "actionValorisation", sequenceur);
856
		mediateur.obtenirListeValeurEtRafraichir(this, "actionValorisation", sequenceur);
853
		mediateur.obtenirListeValeurEtRafraichir(this, "statut", sequenceur);
857
		mediateur.obtenirListeValeurEtRafraichir(this, "statut", sequenceur);
854
		
858
		
855
		publicationChp = new TextArea();
859
		publicationChp = new TextArea();
856
		publicationChp.setFieldLabel("Quelques titres des ouvrages, articles scientifiques, ...");
860
		publicationChp.setFieldLabel("Quelques titres des ouvrages, articles scientifiques, ...");
857
		valorisationOnglet.add(publicationChp, new FormData(550, 0));
861
		valorisationOnglet.add(publicationChp, new FormData(550, 0));
858
		
862
		
859
		autreCollectionTrukCp = creerChoixMultipleCp();
863
		autreCollectionTrukCp = creerChoixMultipleCp();
860
		autreCollectionTrukCacGrpChp = new CheckBoxGroup();
864
		autreCollectionTrukCacGrpChp = new CheckBoxGroup();
861
		autreCollectionTrukCacGrpChp.setFieldLabel("L'organisme dispose-t-il d'autres collections (permettant une valorisation pluridisciplinaire) ?");
865
		autreCollectionTrukCacGrpChp.setFieldLabel("L'organisme dispose-t-il d'autres collections (permettant une valorisation pluridisciplinaire) ?");
862
		valorisationOnglet.add(autreCollectionTrukCp);
866
		valorisationOnglet.add(autreCollectionTrukCp);
863
		mediateur.obtenirListeValeurEtRafraichir(this, "autreCollection", sequenceur);
867
		mediateur.obtenirListeValeurEtRafraichir(this, "autreCollection", sequenceur);
864
		
868
		
865
		futureActionMarkRGrpChp = creerChoixUniqueRadioGroupe("future_action_mark", "ouiNon");
869
		futureActionMarkRGrpChp = creerChoixUniqueRadioGroupe("future_action_mark", "ouiNon");
866
		futureActionMarkRGrpChp.setFieldLabel("Envisagez vous des actions de valorisation dans le cadre de votre politique culturelle ?");
870
		futureActionMarkRGrpChp.setFieldLabel("Envisagez vous des actions de valorisation dans le cadre de votre politique culturelle ?");
867
		valorisationOnglet.add(futureActionMarkRGrpChp);
871
		valorisationOnglet.add(futureActionMarkRGrpChp);
868
		
872
		
869
		futureActionChp = new TextArea();
873
		futureActionChp = new TextArea();
870
		futureActionChp.setFieldLabel("Si oui, lesquelles ?");
874
		futureActionChp.setFieldLabel("Si oui, lesquelles ?");
871
		futureActionChp.hide();
875
		futureActionChp.hide();
872
		futureActionChp.addListener(Events.Hide, new Listener<BaseEvent>() {
876
		futureActionChp.addListener(Events.Hide, new Listener<BaseEvent>() {
873
 
877
 
874
			public void handleEvent(BaseEvent be) {
878
			public void handleEvent(BaseEvent be) {
875
				((TextArea) be.getSource()).setValue("");
879
				((TextArea) be.getSource()).setValue("");
876
			}
880
			}
877
			
881
			
878
		});
882
		});
879
		valorisationOnglet.add(futureActionChp, new FormData(550, 0));
883
		valorisationOnglet.add(futureActionChp, new FormData(550, 0));
880
		
884
		
881
		rechercheMarkRGrpChp = creerChoixUniqueRadioGroupe("recherche_mark", "ouiNon");
885
		rechercheMarkRGrpChp = creerChoixUniqueRadioGroupe("recherche_mark", "ouiNon");
882
		rechercheMarkRGrpChp.setFieldLabel("Vos collections botaniques sont-elles utilisées pour des recherches scientifiques ?");
886
		rechercheMarkRGrpChp.setFieldLabel("Vos collections botaniques sont-elles utilisées pour des recherches scientifiques ?");
883
		valorisationOnglet.add(rechercheMarkRGrpChp);
887
		valorisationOnglet.add(rechercheMarkRGrpChp);
884
		
888
		
885
		provenanceRechercheTrukCp = creerChoixMultipleCp();
889
		provenanceRechercheTrukCp = creerChoixMultipleCp();
886
		provenanceRechercheTrukCp.hide();
890
		provenanceRechercheTrukCp.hide();
887
		provenanceRechercheTrukCacGrpChp = new CheckBoxGroup();
891
		provenanceRechercheTrukCacGrpChp = new CheckBoxGroup();
888
		provenanceRechercheTrukCacGrpChp.setFieldLabel("Si oui, par des chercheurs (professionnels ou amateurs) de quelle provenance ?");
892
		provenanceRechercheTrukCacGrpChp.setFieldLabel("Si oui, par des chercheurs (professionnels ou amateurs) de quelle provenance ?");
889
		valorisationOnglet.add(provenanceRechercheTrukCp);
893
		valorisationOnglet.add(provenanceRechercheTrukCp);
890
		mediateur.obtenirListeValeurEtRafraichir(this, "continentEtFr", sequenceur);
894
		mediateur.obtenirListeValeurEtRafraichir(this, "continentEtFr", sequenceur);
891
		
895
		
892
		typeRechercheTrukCp = creerChoixMultipleCp();
896
		typeRechercheTrukCp = creerChoixMultipleCp();
893
		typeRechercheTrukCp.hide();
897
		typeRechercheTrukCp.hide();
894
		typeRechercheTrukCacGrpChp = new CheckBoxGroup();
898
		typeRechercheTrukCacGrpChp = new CheckBoxGroup();
895
		typeRechercheTrukCacGrpChp.setFieldLabel("Et pour quelles recherches ?");
899
		typeRechercheTrukCacGrpChp.setFieldLabel("Et pour quelles recherches ?");
896
		valorisationOnglet.add(typeRechercheTrukCp);
900
		valorisationOnglet.add(typeRechercheTrukCp);
897
		mediateur.obtenirListeValeurEtRafraichir(this, "typeRecherche", sequenceur);
901
		mediateur.obtenirListeValeurEtRafraichir(this, "typeRecherche", sequenceur);
898
		
902
		
899
		sansMotifAccesMarkRGrpChp = creerChoixUniqueRadioGroupe("sans_motif_acces_mark", "ouiNon");
903
		sansMotifAccesMarkRGrpChp = creerChoixUniqueRadioGroupe("sans_motif_acces_mark", "ouiNon");
900
		sansMotifAccesMarkRGrpChp.setFieldLabel("Peut-on consulter vos collections botaniques sans motif de recherches scientifiques ?");
904
		sansMotifAccesMarkRGrpChp.setFieldLabel("Peut-on consulter vos collections botaniques sans motif de recherches scientifiques ?");
901
		valorisationOnglet.add(sansMotifAccesMarkRGrpChp);
905
		valorisationOnglet.add(sansMotifAccesMarkRGrpChp);
902
		
906
		
903
		valorisationOnglet.add(sansMotifAccesChp = new TextArea(), new FormData(550, 0));
907
		valorisationOnglet.add(sansMotifAccesChp = new TextArea(), new FormData(550, 0));
904
		sansMotifAccesChp.hide();
908
		sansMotifAccesChp.hide();
905
		sansMotifAccesChp.addListener(Events.Hide, new Listener<BaseEvent>() {
909
		sansMotifAccesChp.addListener(Events.Hide, new Listener<BaseEvent>() {
906
 
910
 
907
			public void handleEvent(BaseEvent be) {
911
			public void handleEvent(BaseEvent be) {
908
				((TextArea) be.getSource()).setValue("");
912
				((TextArea) be.getSource()).setValue("");
909
			}
913
			}
910
			
914
			
911
		});
915
		});
912
		sansMotifAccesChp.setFieldLabel("Si oui, quelles démarches doit-on faire pour les consulter ?");
916
		sansMotifAccesChp.setFieldLabel("Si oui, quelles démarches doit-on faire pour les consulter ?");
913
		
917
		
914
		avecMotifAccesMarkRGrpChp = creerChoixUniqueRadioGroupe("avec_motif_acces_mark", "ouiNon");
918
		avecMotifAccesMarkRGrpChp = creerChoixUniqueRadioGroupe("avec_motif_acces_mark", "ouiNon");
915
		avecMotifAccesMarkRGrpChp.setFieldLabel("Peut-on visiter vos collections botaniques avec des objectifs de recherches scientifiques ?");
919
		avecMotifAccesMarkRGrpChp.setFieldLabel("Peut-on visiter vos collections botaniques avec des objectifs de recherches scientifiques ?");
916
		valorisationOnglet.add(avecMotifAccesMarkRGrpChp);
920
		valorisationOnglet.add(avecMotifAccesMarkRGrpChp);
917
		
921
		
918
		valorisationOnglet.add(avecMotifAccesChp = new TextArea(), new FormData(550, 0));
922
		valorisationOnglet.add(avecMotifAccesChp = new TextArea(), new FormData(550, 0));
919
		avecMotifAccesChp.hide();
923
		avecMotifAccesChp.hide();
920
		avecMotifAccesChp.addListener(Events.Hide, new Listener<BaseEvent>() {
924
		avecMotifAccesChp.addListener(Events.Hide, new Listener<BaseEvent>() {
921
 
925
 
922
			public void handleEvent(BaseEvent be) {
926
			public void handleEvent(BaseEvent be) {
923
				((TextArea) be.getSource()).setValue("");
927
				((TextArea) be.getSource()).setValue("");
924
			}
928
			}
925
			
929
			
926
		});
930
		});
927
		avecMotifAccesChp.setFieldLabel("Si oui, quelles démarches doit-on faire pour les visiter ?");
931
		avecMotifAccesChp.setFieldLabel("Si oui, quelles démarches doit-on faire pour les visiter ?");
928
		
932
		
929
		return valorisationOnglet;
933
		return valorisationOnglet;
930
	}
934
	}
931
	
935
	
932
	private TabItem creerOngletConservation() {
936
	private TabItem creerOngletConservation() {
933
		conservationOnglet = creerOnglet("Conservation", "conservation");
937
		conservationOnglet = creerOnglet("Conservation", "conservation");
934
		conservationOnglet.setLayout(creerFormLayout(650, LabelAlign.TOP));
938
		conservationOnglet.setLayout(creerFormLayout(650, LabelAlign.TOP));
935
		Listener<ComponentEvent> ecouteurSelection = new Listener<ComponentEvent>() {  
939
		Listener<ComponentEvent> ecouteurSelection = new Listener<ComponentEvent>() {  
936
			public void handleEvent(ComponentEvent be) {  
940
			public void handleEvent(ComponentEvent be) {  
937
				peuplerStructureConservation();
941
				peuplerStructureConservation();
938
				conservationOnglet.layout();
942
				conservationOnglet.layout();
939
			}  
943
			}  
940
		};
944
		};
941
		conservationOnglet.addListener(Events.Select, ecouteurSelection);
945
		conservationOnglet.addListener(Events.Select, ecouteurSelection);
942
		
946
		
943
		formationMarkRGrpChp = creerChoixUniqueRadioGroupe("formation_mark", "ouiNon");
947
		formationMarkRGrpChp = creerChoixUniqueRadioGroupe("formation_mark", "ouiNon");
944
		formationMarkRGrpChp.setFieldLabel("Le personnel s'occupant des collections a-t-il suivi des formations en conservations ?");
948
		formationMarkRGrpChp.setFieldLabel("Le personnel s'occupant des collections a-t-il suivi des formations en conservations ?");
945
		conservationOnglet.add(formationMarkRGrpChp);
949
		conservationOnglet.add(formationMarkRGrpChp);
946
		
950
		
947
		formationChp = new TextArea();
951
		formationChp = new TextArea();
948
		formationChp.hide();
952
		formationChp.hide();
949
		formationChp.addListener(Events.Hide, new Listener<BaseEvent>() {
953
		formationChp.addListener(Events.Hide, new Listener<BaseEvent>() {
950
 
954
 
951
			public void handleEvent(BaseEvent be) {
955
			public void handleEvent(BaseEvent be) {
952
				((TextArea) be.getSource()).setValue("");
956
				((TextArea) be.getSource()).setValue("");
953
			}
957
			}
954
			
958
			
955
		});
959
		});
956
		formationChp.setFieldLabel("Si oui, lesquelles ?");
960
		formationChp.setFieldLabel("Si oui, lesquelles ?");
957
		conservationOnglet.add(formationChp);
961
		conservationOnglet.add(formationChp);
958
		
962
		
959
		interetFormationMarkRGrpChp = creerChoixUniqueRadioGroupe("interet_formation_mark", "ouiNon");
963
		interetFormationMarkRGrpChp = creerChoixUniqueRadioGroupe("interet_formation_mark", "ouiNon");
960
		interetFormationMarkRGrpChp.setFieldLabel("Seriez vous intéressé par une formation à la conservation et à la restauration d'herbier ?");
964
		interetFormationMarkRGrpChp.setFieldLabel("Seriez vous intéressé par une formation à la conservation et à la restauration d'herbier ?");
961
		conservationOnglet.add(interetFormationMarkRGrpChp);
965
		conservationOnglet.add(interetFormationMarkRGrpChp);
962
		
966
		
963
		localStockageTrukCacGrpChp = new CheckBoxGroup();
967
		localStockageTrukCacGrpChp = new CheckBoxGroup();
964
		localStockageTrukCacGrpChp.setFieldLabel("Avez vous des locaux spécifiques de stockage des collections botaniques ?");
968
		localStockageTrukCacGrpChp.setFieldLabel("Avez vous des locaux spécifiques de stockage des collections botaniques ?");
965
		localStockageTrukCp = creerChoixMultipleCp();
969
		localStockageTrukCp = creerChoixMultipleCp();
966
		conservationOnglet.add(localStockageTrukCp);
970
		conservationOnglet.add(localStockageTrukCp);
967
		mediateur.obtenirListeValeurEtRafraichir(this, "localStockage", sequenceur);
971
		mediateur.obtenirListeValeurEtRafraichir(this, "localStockage", sequenceur);
968
		
972
		
969
		meubleStockageTrukCp = creerChoixMultipleCp();
973
		meubleStockageTrukCp = creerChoixMultipleCp();
970
		meubleStockageTrukCacGrpChp = new CheckBoxGroup();
974
		meubleStockageTrukCacGrpChp = new CheckBoxGroup();
971
		meubleStockageTrukCacGrpChp.setFieldLabel("Avez vous des meubles spécifiques au stockage des collections botaniques ?");
975
		meubleStockageTrukCacGrpChp.setFieldLabel("Avez vous des meubles spécifiques au stockage des collections botaniques ?");
972
		conservationOnglet.add(meubleStockageTrukCp);
976
		conservationOnglet.add(meubleStockageTrukCp);
973
		mediateur.obtenirListeValeurEtRafraichir(this, "meubleStockage", sequenceur);
977
		mediateur.obtenirListeValeurEtRafraichir(this, "meubleStockage", sequenceur);
974
		
978
		
975
		parametreStockageTrukCp = creerChoixMultipleCp();
979
		parametreStockageTrukCp = creerChoixMultipleCp();
976
		parametreStockageTrukCacGrpChp = new CheckBoxGroup();
980
		parametreStockageTrukCacGrpChp = new CheckBoxGroup();
977
		parametreStockageTrukCacGrpChp.setFieldLabel("Quels paramètres maîtrisez vous ?");
981
		parametreStockageTrukCacGrpChp.setFieldLabel("Quels paramètres maîtrisez vous ?");
978
		conservationOnglet.add(parametreStockageTrukCp);
982
		conservationOnglet.add(parametreStockageTrukCp);
979
		mediateur.obtenirListeValeurEtRafraichir(this, "parametreStockage", sequenceur);
983
		mediateur.obtenirListeValeurEtRafraichir(this, "parametreStockage", sequenceur);
980
		
984
		
981
		collectionCommuneMarkRGrpChp = creerChoixUniqueRadioGroupe("collection_commune_mark", "ouiNon");
985
		collectionCommuneMarkRGrpChp = creerChoixUniqueRadioGroupe("collection_commune_mark", "ouiNon");
982
		collectionCommuneMarkRGrpChp.setFieldLabel("Les collections botaniques sont-elles conservées avec d'autres collections  dans les mêmes locaux (problème de conservation en commun) ?");
986
		collectionCommuneMarkRGrpChp.setFieldLabel("Les collections botaniques sont-elles conservées avec d'autres collections  dans les mêmes locaux (problème de conservation en commun) ?");
983
		conservationOnglet.add(collectionCommuneMarkRGrpChp);
987
		conservationOnglet.add(collectionCommuneMarkRGrpChp);
984
		
988
		
985
		collectionAutreTrukCp = creerChoixMultipleCp();
989
		collectionAutreTrukCp = creerChoixMultipleCp();
986
		collectionAutreTrukCacGrpChp = new CheckBoxGroup();
990
		collectionAutreTrukCacGrpChp = new CheckBoxGroup();
987
		collectionAutreTrukCacGrpChp.setFieldLabel("Si oui, lesquelles ?");
991
		collectionAutreTrukCacGrpChp.setFieldLabel("Si oui, lesquelles ?");
988
		collectionAutreTrukCp.hide();
992
		collectionAutreTrukCp.hide();
989
		conservationOnglet.add(collectionAutreTrukCp);
993
		conservationOnglet.add(collectionAutreTrukCp);
990
		mediateur.obtenirListeValeurEtRafraichir(this, "autreCollection", sequenceur);
994
		mediateur.obtenirListeValeurEtRafraichir(this, "autreCollection", sequenceur);
991
		
995
		
992
		accesControleMarkRGrpChp = creerChoixUniqueRadioGroupe("mark_acces_controle", "ouiNon");
996
		accesControleMarkRGrpChp = creerChoixUniqueRadioGroupe("mark_acces_controle", "ouiNon");
993
		accesControleMarkRGrpChp.setFieldLabel("L'accès à vos collections botanique est-il contrôlé (ex. : manipulation réservées à des personnes compétentes) ?");
997
		accesControleMarkRGrpChp.setFieldLabel("L'accès à vos collections botanique est-il contrôlé (ex. : manipulation réservées à des personnes compétentes) ?");
994
		conservationOnglet.add(accesControleMarkRGrpChp);
998
		conservationOnglet.add(accesControleMarkRGrpChp);
995
		
999
		
996
		restaurationMarkRGrpChp = creerChoixUniqueRadioGroupe("restauration_mark", "ouiNon");
1000
		restaurationMarkRGrpChp = creerChoixUniqueRadioGroupe("restauration_mark", "ouiNon");
997
		restaurationMarkRGrpChp.setFieldLabel("Effectuez vous des opérations de restauration ou de remise en état de vos collections botaniques ?");
1001
		restaurationMarkRGrpChp.setFieldLabel("Effectuez vous des opérations de restauration ou de remise en état de vos collections botaniques ?");
998
		conservationOnglet.add(restaurationMarkRGrpChp);
1002
		conservationOnglet.add(restaurationMarkRGrpChp);
999
		
1003
		
1000
		opRestauTrukCp = creerChoixMultipleCp();
1004
		opRestauTrukCp = creerChoixMultipleCp();
1001
		opRestauTrukCacGrpChp = new CheckBoxGroup();
1005
		opRestauTrukCacGrpChp = new CheckBoxGroup();
1002
		opRestauTrukCacGrpChp.setFieldLabel("Si oui, lesquelles ?");
1006
		opRestauTrukCacGrpChp.setFieldLabel("Si oui, lesquelles ?");
1003
		opRestauTrukCp.hide();
1007
		opRestauTrukCp.hide();
1004
		conservationOnglet.add(opRestauTrukCp);
1008
		conservationOnglet.add(opRestauTrukCp);
1005
		mediateur.obtenirListeValeurEtRafraichir(this, "opRestau", sequenceur);
1009
		mediateur.obtenirListeValeurEtRafraichir(this, "opRestau", sequenceur);
1006
		
1010
		
1007
		// Création d'un ContentPanel vide et du groupe de bouton radio
1011
		// Création d'un ContentPanel vide et du groupe de bouton radio
1008
		// Le groupe de bouton radio recevra les boutons au moment de la réception des données (rafraichir()) et ser à ce moment là ajouter au ContenetPanel
1012
		// Le groupe de bouton radio recevra les boutons au moment de la réception des données (rafraichir()) et ser à ce moment là ajouter au ContenetPanel
1009
		materielConservationCp = creerChoixMultipleCp();
1013
		materielConservationCp = creerChoixMultipleCp();
1010
		conservationOnglet.add(materielConservationCp);
1014
		conservationOnglet.add(materielConservationCp);
1011
		materielConservationCeRGrpChp = creerChoixUniqueRadioGroupe("materiel_conservation_ce", "onep");
1015
		materielConservationCeRGrpChp = creerChoixUniqueRadioGroupe("materiel_conservation_ce", "onep");
1012
		materielConservationCeRGrpChp.setFieldLabel("Utilisez vous du matériel de conservation ?");
1016
		materielConservationCeRGrpChp.setFieldLabel("Utilisez vous du matériel de conservation ?");
1013
		materielConservationCeRGrpChp.setToolTip(new ToolTipConfig("Matériel de conservation", "matériel spécialisé pour la conservation des archives ou du patrimoine fragile. Ce matériel possède des propriétés mécaniques et chimiques qui font qu'il résiste dans le temps et que sa dégradation n'entraîne pas de dommages sur le matériel qu'il aide à conserver. Exemples : papier neutre, papier gommé, etc..."));
1017
		materielConservationCeRGrpChp.setToolTip(new ToolTipConfig("Matériel de conservation", "matériel spécialisé pour la conservation des archives ou du patrimoine fragile. Ce matériel possède des propriétés mécaniques et chimiques qui font qu'il résiste dans le temps et que sa dégradation n'entraîne pas de dommages sur le matériel qu'il aide à conserver. Exemples : papier neutre, papier gommé, etc..."));
1014
		mediateur.obtenirListeValeurEtRafraichir(this, "onep", sequenceur);
1018
		mediateur.obtenirListeValeurEtRafraichir(this, "onep", sequenceur);
1015
		
1019
		
1016
		autreMaterielTrukCp = creerChoixMultipleCp();
1020
		autreMaterielTrukCp = creerChoixMultipleCp();
1017
		autreMaterielTrukCacGrpChp = new CheckBoxGroup();
1021
		autreMaterielTrukCacGrpChp = new CheckBoxGroup();
1018
		autreMaterielTrukCacGrpChp.setFieldLabel("Si non, qu'utilisez vous comme matériel ?");
1022
		autreMaterielTrukCacGrpChp.setFieldLabel("Si non, qu'utilisez vous comme matériel ?");
1019
		autreMaterielTrukCp.hide();
1023
		autreMaterielTrukCp.hide();
1020
		conservationOnglet.add(autreMaterielTrukCp);
1024
		conservationOnglet.add(autreMaterielTrukCp);
1021
		mediateur.obtenirListeValeurEtRafraichir(this, "autreMateriel", sequenceur);
1025
		mediateur.obtenirListeValeurEtRafraichir(this, "autreMateriel", sequenceur);
1022
		
1026
		
1023
		traitementMarkRGrpChp = creerChoixUniqueRadioGroupe("traitement_mark", "ouiNon");
1027
		traitementMarkRGrpChp = creerChoixUniqueRadioGroupe("traitement_mark", "ouiNon");
1024
		traitementMarkRGrpChp.setFieldLabel("Réalisez vous actuellement des traitements globaux contre les insectes ?");
1028
		traitementMarkRGrpChp.setFieldLabel("Réalisez vous actuellement des traitements globaux contre les insectes ?");
1025
		conservationOnglet.add(traitementMarkRGrpChp);
1029
		conservationOnglet.add(traitementMarkRGrpChp);
1026
		
1030
		
1027
		traitementTrukCp = creerChoixMultipleCp();
1031
		traitementTrukCp = creerChoixMultipleCp();
1028
		traitementTrukCp.hide();
1032
		traitementTrukCp.hide();
1029
		traitementTrukCacGrpChp = new CheckBoxGroup();
1033
		traitementTrukCacGrpChp = new CheckBoxGroup();
1030
		traitementTrukCacGrpChp.setFieldLabel("Si oui, lesquels ?");
1034
		traitementTrukCacGrpChp.setFieldLabel("Si oui, lesquels ?");
1031
		conservationOnglet.add(traitementTrukCp);
1035
		conservationOnglet.add(traitementTrukCp);
1032
		mediateur.obtenirListeValeurEtRafraichir(this, "insecteTraitement", sequenceur);
1036
		mediateur.obtenirListeValeurEtRafraichir(this, "insecteTraitement", sequenceur);
1033
		
1037
		
1034
		collectionAcquisitionMarkRGrpChp = creerChoixUniqueRadioGroupe("collection_acquisition_mark", "ouiNon");
1038
		collectionAcquisitionMarkRGrpChp = creerChoixUniqueRadioGroupe("collection_acquisition_mark", "ouiNon");
1035
		collectionAcquisitionMarkRGrpChp.setFieldLabel("Actuellement, vos collections botaniques s'accroissent-elles de nouvelles acquisitions ?");
1039
		collectionAcquisitionMarkRGrpChp.setFieldLabel("Actuellement, vos collections botaniques s'accroissent-elles de nouvelles acquisitions ?");
1036
		conservationOnglet.add(collectionAcquisitionMarkRGrpChp);
1040
		conservationOnglet.add(collectionAcquisitionMarkRGrpChp);
1037
		
1041
		
1038
		echantillonAcquisitionMarkRGrpChp = creerChoixUniqueRadioGroupe("echantillon_acquisition_mark", "ouiNon");
1042
		echantillonAcquisitionMarkRGrpChp = creerChoixUniqueRadioGroupe("echantillon_acquisition_mark", "ouiNon");
1039
		echantillonAcquisitionMarkRGrpChp.setFieldLabel("Actuellement, mettez vous en herbier de nouveaux échantillons ?");
1043
		echantillonAcquisitionMarkRGrpChp.setFieldLabel("Actuellement, mettez vous en herbier de nouveaux échantillons ?");
1040
		conservationOnglet.add(echantillonAcquisitionMarkRGrpChp);
1044
		conservationOnglet.add(echantillonAcquisitionMarkRGrpChp);
1041
 
1045
 
1042
		traitementAcquisitionMarkRGrpChp = creerChoixUniqueRadioGroupe("traitement_acquisition_mark", "ouiNon");
1046
		traitementAcquisitionMarkRGrpChp = creerChoixUniqueRadioGroupe("traitement_acquisition_mark", "ouiNon");
1043
		traitementAcquisitionMarkRGrpChp.hide();
1047
		traitementAcquisitionMarkRGrpChp.hide();
1044
		traitementAcquisitionMarkRGrpChp.setFieldLabel("Si oui, faites-vous un traitement contre les insectes avant l'intégration dans vos collections ?");
1048
		traitementAcquisitionMarkRGrpChp.setFieldLabel("Si oui, faites-vous un traitement contre les insectes avant l'intégration dans vos collections ?");
1045
		conservationOnglet.add(traitementAcquisitionMarkRGrpChp);
1049
		conservationOnglet.add(traitementAcquisitionMarkRGrpChp);
1046
		
1050
		
1047
		traitementAcquisitionMarkLabel = new LabelField();
1051
		traitementAcquisitionMarkLabel = new LabelField();
1048
		traitementAcquisitionMarkLabel.hide();
1052
		traitementAcquisitionMarkLabel.hide();
1049
		traitementAcquisitionMarkLabel.setFieldLabel("Si oui, lesquels ?");
1053
		traitementAcquisitionMarkLabel.setFieldLabel("Si oui, lesquels ?");
1050
		conservationOnglet.add(traitementAcquisitionMarkLabel);
1054
		conservationOnglet.add(traitementAcquisitionMarkLabel);
1051
		
1055
		
1052
		poisonTraitementTrukCp = creerChoixMultipleCp();
1056
		poisonTraitementTrukCp = creerChoixMultipleCp();
1053
		poisonTraitementTrukCp.hide();
1057
		poisonTraitementTrukCp.hide();
1054
		poisonTraitementTrukCacGrpChp = new CheckBoxGroup();
1058
		poisonTraitementTrukCacGrpChp = new CheckBoxGroup();
1055
		poisonTraitementTrukCacGrpChp.setFieldLabel("Empoisonnement");
1059
		poisonTraitementTrukCacGrpChp.setFieldLabel("Empoisonnement");
1056
		poisonTraitementTrukCacGrpChp.setLabelStyle("font-weight:normal;text-decoration:underline;");
1060
		poisonTraitementTrukCacGrpChp.setLabelStyle("font-weight:normal;text-decoration:underline;");
1057
		poisonTraitementTrukCacGrpChp.setLabelSeparator("");
1061
		poisonTraitementTrukCacGrpChp.setLabelSeparator("");
1058
		conservationOnglet.add(poisonTraitementTrukCp);
1062
		conservationOnglet.add(poisonTraitementTrukCp);
1059
		mediateur.obtenirListeValeurEtRafraichir(this, "poisonTraitement", sequenceur);
1063
		mediateur.obtenirListeValeurEtRafraichir(this, "poisonTraitement", sequenceur);
1060
		
1064
		
1061
		insecteTraitementTrukCp = creerChoixMultipleCp();
1065
		insecteTraitementTrukCp = creerChoixMultipleCp();
1062
		insecteTraitementTrukCp.hide();
1066
		insecteTraitementTrukCp.hide();
1063
		insecteTraitementTrukCacGrpChp = new CheckBoxGroup();
1067
		insecteTraitementTrukCacGrpChp = new CheckBoxGroup();
1064
		insecteTraitementTrukCacGrpChp.setLabelStyle("font-weight:normal;text-decoration:underline;");
1068
		insecteTraitementTrukCacGrpChp.setLabelStyle("font-weight:normal;text-decoration:underline;");
1065
		insecteTraitementTrukCacGrpChp.setLabelSeparator("");
1069
		insecteTraitementTrukCacGrpChp.setLabelSeparator("");
1066
		insecteTraitementTrukCacGrpChp.setFieldLabel("Désinsectisation");
1070
		insecteTraitementTrukCacGrpChp.setFieldLabel("Désinsectisation");
1067
		conservationOnglet.add(insecteTraitementTrukCp);
1071
		conservationOnglet.add(insecteTraitementTrukCp);
1068
		mediateur.obtenirListeValeurEtRafraichir(this, "insecteTraitement", sequenceur);
1072
		mediateur.obtenirListeValeurEtRafraichir(this, "insecteTraitement", sequenceur);
1069
		
1073
		
1070
		conservationOnglet.add(new Html("<br />"));
1074
		conservationOnglet.add(new Html("<br />"));
1071
		return conservationOnglet;
1075
		return conservationOnglet;
1072
	}
1076
	}
1073
	
1077
	
1074
	private void collecterStructurePersonnel() {
1078
	private void collecterStructurePersonnel() {
1075
		if (personnelOnglet.getData("acces").equals(true)) {
1079
		if (personnelOnglet.getData("acces").equals(true)) {
1076
			personnelGrilleMagazin.commitChanges();
1080
			personnelGrilleMagazin.commitChanges();
1077
			int nbrePersonne = personnelGrilleMagazin.getCount();
1081
			int nbrePersonne = personnelGrilleMagazin.getCount();
1078
			for (int i = 0; i < nbrePersonne; i++) {
1082
			for (int i = 0; i < nbrePersonne; i++) {
1079
				StructureAPersonne personne = personnelGrilleMagazin.getAt(i);
1083
				StructureAPersonne personne = personnelGrilleMagazin.getAt(i);
1080
				
1084
				
1081
				// Seules les lignes ajoutées ou modifiées sont prises en compte.
1085
				// Seules les lignes ajoutées ou modifiées sont prises en compte.
1082
				Record record = personnelGrilleMagazin.getRecord(personne);
1086
				Record record = personnelGrilleMagazin.getRecord(personne);
1083
				if (personnelGrilleMagazin.getModifiedRecords().contains(record) == true 
1087
				if (personnelGrilleMagazin.getModifiedRecords().contains(record) == true 
1084
						|| (personne.get("etat") != null && (personne.get("etat").equals(StructureAPersonne.ETAT_AJOUTE) || personne.get("etat").equals(StructureAPersonne.ETAT_MODIFIE)) )) {
1088
						|| (personne.get("etat") != null && (personne.get("etat").equals(StructureAPersonne.ETAT_AJOUTE) || personne.get("etat").equals(StructureAPersonne.ETAT_MODIFIE)) )) {
1085
					
1089
					
1086
					// Gestion de l'id de la structure
1090
					// Gestion de l'id de la structure
1087
					if (mode.equals("MODIF")) {
1091
					if (mode.equals("MODIF")) {
1088
						personne.setIdStructure(identification.getId());
1092
						personne.setIdStructure(identification.getId());
1089
					}
1093
					}
1090
					
1094
					
1091
					// Récupération de l'id du projet de la structure qui servira aussi pour les Personnes crées dans ce formulaire
1095
					// Récupération de l'id du projet de la structure qui servira aussi pour les Personnes crées dans ce formulaire
1092
					if (personne.getIdPersonne().equals("") && projetsCombo.getCombo().getValue() != null) {
1096
					if (personne.getIdPersonne().equals("") && projetsCombo.getCombo().getValue() != null) {
1093
						personne.setIdProjetPersonne(new Projet(projetsCombo.getValeur()).getId());
1097
						personne.setIdProjetPersonne(new Projet(projetsCombo.getValeur()).getId());
1094
					}
1098
					}
1095
					
1099
					
1096
					// Gestion de la fonction
1100
					// Gestion de la fonction
1097
					String fonction = personne.get("fonction");
1101
					String fonction = personne.get("fonction");
1098
					if (fonction != null && !fonction.equals("")) {
1102
					if (fonction != null && !fonction.equals("")) {
1099
						Valeur valeurRecherche = fonctionsCombo.getStore().findModel("nom", fonction);
1103
						Valeur valeurRecherche = fonctionsCombo.getStore().findModel("nom", fonction);
1100
						if (valeurRecherche != null) {
1104
						if (valeurRecherche != null) {
1101
							personne.setFonction(valeurRecherche.getId());
1105
							personne.setFonction(valeurRecherche.getId());
1102
						} else {
1106
						} else {
1103
							personne.setFonction("AUTRE", fonction);
1107
							personne.setFonction("AUTRE", fonction);
1104
						}
1108
						}
1105
					} else {
1109
					} else {
1106
						personne.setFonction("");
1110
						personne.setFonction("");
1107
					}
1111
					}
1108
 
1112
 
1109
					// Gestion du nom complet
1113
					// Gestion du nom complet
1110
					String nomComplet = personne.getPrenom()+" "+personne.getNom();
1114
					String nomComplet = personne.getPrenom()+" "+personne.getNom();
1111
					personne.setNomComplet(nomComplet);					
1115
					personne.setNomComplet(nomComplet);					
1112
					
1116
					
1113
					// Gestion de la notion de "contact"
1117
					// Gestion de la notion de "contact"
1114
					personne.setContact(false);
1118
					personne.setContact(false);
1115
					if (personne.get("contact").equals(true)) {
1119
					if (personne.get("contact").equals(true)) {
1116
						personne.setContact(true);
1120
						personne.setContact(true);
1117
					}
1121
					}
1118
					
1122
					
1119
					// Gestion du statut
1123
					// Gestion du statut
1120
					String statut = personne.get("statut");
1124
					String statut = personne.get("statut");
1121
					if (statut != null && !statut.equals("")) {
1125
					if (statut != null && !statut.equals("")) {
1122
						Valeur valeurRecherche = comboLiStatut.getStore().findModel("nom", statut);
1126
						Valeur valeurRecherche = comboLiStatut.getStore().findModel("nom", statut);
1123
						if (valeurRecherche != null) {
1127
						if (valeurRecherche != null) {
1124
							personne.setStatut(valeurRecherche.getId());
1128
							personne.setStatut(valeurRecherche.getId());
1125
						} else {
1129
						} else {
1126
							personne.setStatut("AUTRE", statut);
1130
							personne.setStatut("AUTRE", statut);
1127
						}
1131
						}
1128
					} else {
1132
					} else {
1129
						personne.setStatut("");
1133
						personne.setStatut("");
1130
					}
1134
					}
1131
					
1135
					
1132
					// Gestion du temps de travail
1136
					// Gestion du temps de travail
1133
					personne.setBotaTravailHebdoTps(personne.get("travail").toString());
1137
					personne.setBotaTravailHebdoTps(personne.get("travail").toString());
1134
					
1138
					
1135
					// Gestion du téléphone
1139
					// Gestion du téléphone
1136
					String telephoneFixe = personne.get("tel_fix");
1140
					String telephoneFixe = personne.get("tel_fix");
1137
					personne.setTelephoneFixe(telephoneFixe);
1141
					personne.setTelephoneFixe(telephoneFixe);
1138
					
1142
					
1139
					// Gestion du fax
1143
					// Gestion du fax
1140
					String fax = personne.get("tel_fax");
1144
					String fax = personne.get("tel_fax");
1141
					personne.setFax(fax);
1145
					personne.setFax(fax);
1142
									
1146
									
1143
					// Gestion du courriel
1147
					// Gestion du courriel
1144
					String courriel = personne.get("courriel");
1148
					String courriel = personne.get("courriel");
1145
					personne.setCourriel(courriel);
1149
					personne.setCourriel(courriel);
1146
					
1150
					
1147
					// Gestion de la spécialité
1151
					// Gestion de la spécialité
1148
					String specialite = personne.get("specialite");
1152
					String specialite = personne.get("specialite");
1149
					personne.setSpecialite(specialite);
1153
					personne.setSpecialite(specialite);
1150
					
1154
					
1151
					// On met à faux le décès
1155
					// On met à faux le décès
1152
					personne.setDeces(Personne.ETRE_VIVANT);
1156
					personne.setDeces(Personne.ETRE_VIVANT);
1153
					
1157
					
1154
					// Ajout de la personne dans la liste correspondant à son état (ajouté ou modifié)
1158
					// Ajout de la personne dans la liste correspondant à son état (ajouté ou modifié)
1155
					if (personne.get("etat") != null && personne.get("etat").equals(StructureAPersonne.ETAT_AJOUTE)) { // Une personne ajoutée
1159
					if (personne.get("etat") != null && personne.get("etat").equals(StructureAPersonne.ETAT_AJOUTE)) { // Une personne ajoutée
1156
						personnelAjoute.put(""+i, personne);
1160
						personnelAjoute.put(""+i, personne);
1157
					} else {// Une personne modifiée
1161
					} else {// Une personne modifiée
1158
						personnelModifie.put(personne.getId(), personne);
1162
						personnelModifie.put(personne.getId(), personne);
1159
					}
1163
					}
1160
				} else {
1164
				} else {
1161
					GWT.log("Personne non modifiées : "+personne.getPrenom()+" "+personne.getNom(), null);
1165
					GWT.log("Personne non modifiées : "+personne.getPrenom()+" "+personne.getNom(), null);
1162
				}
1166
				}
1163
			}
1167
			}
1164
		}
1168
		}
1165
	}
1169
	}
1166
	
1170
	
1167
	private void peuplerStructurePersonnel() {
1171
	private void peuplerStructurePersonnel() {
1168
		if (mode.equals(MODE_MODIFIER) && personnel != null) {
1172
		if (mode.equals(MODE_MODIFIER) && personnel != null) {
1169
			ArrayList<StructureAPersonne> personnes = new ArrayList<StructureAPersonne>();
1173
			ArrayList<StructureAPersonne> personnes = new ArrayList<StructureAPersonne>();
1170
			for (Iterator<String> it = personnel.keySet().iterator(); it.hasNext();) {
1174
			for (Iterator<String> it = personnel.keySet().iterator(); it.hasNext();) {
1171
				String index = it.next();
1175
				String index = it.next();
1172
				
1176
				
1173
				// Gestion de la fonction
1177
				// Gestion de la fonction
1174
				if (fonctionsMagazin != null && !((String) personnel.get(index).getFonction()).startsWith("AUTRE##")) {
1178
				if (fonctionsMagazin != null && !((String) personnel.get(index).getFonction()).startsWith("AUTRE##")) {
1175
					if (fonctionsMagazin.findModel("id_valeur", personnel.get(index).getFonction()) != null) {
1179
					if (fonctionsMagazin.findModel("id_valeur", personnel.get(index).getFonction()) != null) {
1176
						personnel.get(index).set("fonction", fonctionsMagazin.findModel("id_valeur", personnel.get(index).getFonction()).getNom());
1180
						personnel.get(index).set("fonction", fonctionsMagazin.findModel("id_valeur", personnel.get(index).getFonction()).getNom());
1177
					}
1181
					}
1178
				} else {
1182
				} else {
1179
					personnel.get(index).set("fonction", personnel.get(index).getFonction().replaceFirst("AUTRE##", ""));
1183
					personnel.get(index).set("fonction", personnel.get(index).getFonction().replaceFirst("AUTRE##", ""));
1180
				}
1184
				}
1181
				
1185
				
1182
				// Gestion de la notion de "contact"
1186
				// Gestion de la notion de "contact"
1183
				personnel.get(index).set("contact", (personnel.get(index).getContact().equals("1") ? true : false));
1187
				personnel.get(index).set("contact", (personnel.get(index).getContact().equals("1") ? true : false));
1184
				
1188
				
1185
				// Gestion du statut
1189
				// Gestion du statut
1186
				if (magazinLiStatut != null && ((String) personnel.get(index).getStatut()).matches("^[0-9]+$")) {
1190
				if (magazinLiStatut != null && ((String) personnel.get(index).getStatut()).matches("^[0-9]+$")) {
1187
					personnel.get(index).set("statut", magazinLiStatut.findModel("id_valeur", personnel.get(index).getStatut()).getNom());
1191
					personnel.get(index).set("statut", magazinLiStatut.findModel("id_valeur", personnel.get(index).getStatut()).getNom());
1188
				} else {
1192
				} else {
1189
					personnel.get(index).set("statut", personnel.get(index).getStatut().replaceFirst("AUTRE##", ""));
1193
					personnel.get(index).set("statut", personnel.get(index).getStatut().replaceFirst("AUTRE##", ""));
1190
				}
1194
				}
1191
				// Gestion de la specialite
1195
				// Gestion de la specialite
1192
				if (((String) personnel.get(index).getSpecialite()).matches("^[0-9]+$")) {
1196
				if (((String) personnel.get(index).getSpecialite()).matches("^[0-9]+$")) {
1193
					// Author : Cyprien
1197
					// Author : Cyprien
1194
					// TODO
1198
					// TODO
1195
					// Ici faire un combobox ?
1199
					// Ici faire un combobox ?
1196
					// ...
1200
					// ...
1197
				} else {
1201
				} else {
1198
					personnel.get(index).set("specialite", personnel.get(index).getSpecialite().replaceFirst("AUTRE##", ""));
1202
					personnel.get(index).set("specialite", personnel.get(index).getSpecialite().replaceFirst("AUTRE##", ""));
1199
				}				
1203
				}				
1200
				
1204
				
1201
				// Gestion du temps de travail
1205
				// Gestion du temps de travail
1202
				String tps = personnel.get(index).getBotaTravailHebdoTps();
1206
				String tps = personnel.get(index).getBotaTravailHebdoTps();
1203
				personnel.get(index).set("travail", (tps.matches("^[0-9]+$")  ? Integer.parseInt(tps) : 0));
1207
				personnel.get(index).set("travail", (tps.matches("^[0-9]+$")  ? Integer.parseInt(tps) : 0));
1204
				
1208
				
1205
				personnes.add(personnel.get(index));
1209
				personnes.add(personnel.get(index));
1206
			}
1210
			}
1207
			personnelGrilleMagazin.removeAll();
1211
			personnelGrilleMagazin.removeAll();
1208
			personnelGrilleMagazin.add(personnes);
1212
			personnelGrilleMagazin.add(personnes);
1209
			
1213
			
1210
			// Nous vidons la variable personnel une fois qu'elle a remplie la grille
1214
			// Nous vidons la variable personnel une fois qu'elle a remplie la grille
1211
			personnel = null;
1215
			personnel = null;
1212
		}
1216
		}
1213
	}
1217
	}
1214
	
1218
	
1215
	private TabItem creerOngletPersonnel() {
1219
	private TabItem creerOngletPersonnel() {
1216
		// Création des objets contenant les manipulations de la grille
1220
		// Création des objets contenant les manipulations de la grille
1217
		personnelModifie = new StructureAPersonneListe();
1221
		personnelModifie = new StructureAPersonneListe();
1218
		personnelAjoute = new StructureAPersonneListe();
1222
		personnelAjoute = new StructureAPersonneListe();
1219
		personnelSupprime = new StructureAPersonneListe();
1223
		personnelSupprime = new StructureAPersonneListe();
1220
		
1224
		
1221
		personnelOnglet = creerOnglet("Personnel", "personnel");
1225
		personnelOnglet = creerOnglet("Personnel", "personnel");
1222
		personnelOnglet.setLayout(creerFormLayout(400, LabelAlign.LEFT));
1226
		personnelOnglet.setLayout(creerFormLayout(400, LabelAlign.LEFT));
1223
		personnelOnglet.setStyleAttribute("padding", "0");
1227
		personnelOnglet.setStyleAttribute("padding", "0");
1224
		personnelOnglet.addListener(Events.Select, new Listener<ComponentEvent>() {  
1228
		personnelOnglet.addListener(Events.Select, new Listener<ComponentEvent>() {  
1225
			public void handleEvent(ComponentEvent be) {  
1229
			public void handleEvent(ComponentEvent be) {  
1226
				
1230
				
1227
				// Indique que l'onglet a été rempli et a pu être modifié pour la méthode collecter...
1231
				// Indique que l'onglet a été rempli et a pu être modifié pour la méthode collecter...
1228
				personnelOnglet.setData("acces", true);
1232
				personnelOnglet.setData("acces", true);
1229
 
1233
 
1230
				// Rafraichissement du contenu de la grille du personnel
1234
				// Rafraichissement du contenu de la grille du personnel
1231
				if (mode.equals(MODE_AJOUTER)) {
1235
				if (mode.equals(MODE_AJOUTER)) {
1232
					rafraichirPersonnel();
1236
					rafraichirPersonnel();
1233
				}
1237
				}
1234
			}
1238
			}
1235
		});
1239
		});
1236
		
1240
		
1237
		ContentPanel cp = new ContentPanel();
1241
		ContentPanel cp = new ContentPanel();
1238
		cp.setHeading("Personnes travaillant sur les collections");
1242
		cp.setHeading("Personnes travaillant sur les collections");
1239
		cp.setIcon(Images.ICONES.table());
1243
		cp.setIcon(Images.ICONES.table());
1240
		cp.setScrollMode(Scroll.AUTO);
1244
		cp.setScrollMode(Scroll.AUTO);
1241
		cp.setLayout(new FitLayout());
1245
		cp.setLayout(new FitLayout());
1242
		//cp.setWidth(1250);
1246
		//cp.setWidth(1250);
1243
		//cp.setHeight("100%");
1247
		//cp.setHeight("100%");
1244
		cp.setFrame(true);
1248
		cp.setFrame(true);
1245
		
1249
		
1246
		personnelGrilleMagazin = new ListStore<StructureAPersonne>();
1250
		personnelGrilleMagazin = new ListStore<StructureAPersonne>();
1247
		personnelGrilleMagazin.setMonitorChanges(true);
1251
		personnelGrilleMagazin.setMonitorChanges(true);
1248
		
1252
		
1249
		personnelGrilleMagazin.addListener(Store.Add, new Listener<StoreEvent<StructureAPersonne>>() {
1253
		personnelGrilleMagazin.addListener(Store.Add, new Listener<StoreEvent<StructureAPersonne>>() {
1250
			public void handleEvent(StoreEvent<StructureAPersonne> ce) {
1254
			public void handleEvent(StoreEvent<StructureAPersonne> ce) {
1251
				// Activation du bouton supprimer si la grille contient un élément
1255
				// Activation du bouton supprimer si la grille contient un élément
1252
				if (grillePersonnel.getStore().getCount() > 0) {  
1256
				if (grillePersonnel.getStore().getCount() > 0) {  
1253
					supprimerPersonnelBtn.enable();
1257
					supprimerPersonnelBtn.enable();
1254
				}
1258
				}
1255
				
1259
				
1256
			}
1260
			}
1257
		});
1261
		});
1258
		
1262
		
1259
		
1263
		
1260
		RowNumberer r = new RowNumberer();
1264
		RowNumberer r = new RowNumberer();
1261
		
1265
		
1262
		List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
1266
		List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
1263
 
1267
 
1264
		GridSelectionModel<StructureAPersonne> sm = new GridSelectionModel<StructureAPersonne>();
1268
		GridSelectionModel<StructureAPersonne> sm = new GridSelectionModel<StructureAPersonne>();
1265
		configs.add(r);
1269
		configs.add(r);
1266
		
1270
		
1267
		ColumnConfig column = new ColumnConfig("fonction", "Fonction", 150);
1271
		ColumnConfig column = new ColumnConfig("fonction", "Fonction", 150);
1268
		fonctionsMagazin = new ListStore<Valeur>();
1272
		fonctionsMagazin = new ListStore<Valeur>();
1269
		
1273
		
1270
		fonctionsCombo = new ComboBox<Valeur>();  
1274
		fonctionsCombo = new ComboBox<Valeur>();  
1271
		fonctionsCombo.setTriggerAction(TriggerAction.ALL);  
1275
		fonctionsCombo.setTriggerAction(TriggerAction.ALL);  
1272
		fonctionsCombo.setEditable(true);
1276
		fonctionsCombo.setEditable(true);
1273
		fonctionsCombo.setDisplayField("nom");
1277
		fonctionsCombo.setDisplayField("nom");
1274
		fonctionsCombo.setStore(fonctionsMagazin);
1278
		fonctionsCombo.setStore(fonctionsMagazin);
1275
		mediateur.obtenirListeValeurEtRafraichir(this, "fonction", sequenceur);
1279
		mediateur.obtenirListeValeurEtRafraichir(this, "fonction", sequenceur);
1276
		
1280
		
1277
		fonctionEditor = new CellEditor(fonctionsCombo) {  
1281
		fonctionEditor = new CellEditor(fonctionsCombo) {  
1278
			@Override  
1282
			@Override  
1279
			public Object preProcessValue(Object valeur) {  
1283
			public Object preProcessValue(Object valeur) {  
1280
				Valeur retour = null;
1284
				Valeur retour = null;
1281
				
1285
				
1282
				if (valeur != null) {
1286
				if (valeur != null) {
1283
					String chaineTransmise = (String) valeur;
1287
					String chaineTransmise = (String) valeur;
1284
					if (fonctionsMagazin.getCount() == 0 && fonctionsListe != null) {
1288
					if (fonctionsMagazin.getCount() == 0 && fonctionsListe != null) {
1285
						fonctionsMagazin.add(fonctionsListe);
1289
						fonctionsMagazin.add(fonctionsListe);
1286
					}
1290
					}
1287
					if (fonctionsMagazin.findModel("id_valeur", chaineTransmise) != null) {
1291
					if (fonctionsMagazin.findModel("id_valeur", chaineTransmise) != null) {
1288
						retour = fonctionsMagazin.findModel("id_valeur", chaineTransmise);
1292
						retour = fonctionsMagazin.findModel("id_valeur", chaineTransmise);
1289
					} else if (fonctionsMagazin.findModel("nom", chaineTransmise) != null) {
1293
					} else if (fonctionsMagazin.findModel("nom", chaineTransmise) != null) {
1290
						retour = fonctionsMagazin.findModel("nom", chaineTransmise);
1294
						retour = fonctionsMagazin.findModel("nom", chaineTransmise);
1291
					} else {
1295
					} else {
1292
						retour = new Valeur("", chaineTransmise, "", "");
1296
						retour = new Valeur("", chaineTransmise, "", "");
1293
					}
1297
					}
1294
				}
1298
				}
1295
				
1299
				
1296
				return retour;
1300
				return retour;
1297
			}  
1301
			}  
1298
			
1302
			
1299
			@Override  
1303
			@Override  
1300
			public Object postProcessValue(Object valeur) {  
1304
			public Object postProcessValue(Object valeur) {  
1301
				String retour = "";
1305
				String retour = "";
1302
				Valeur fonctionTrouvee = null; 
1306
				Valeur fonctionTrouvee = null; 
1303
				if (valeur == null) {
1307
				if (valeur == null) {
1304
					String valeurBrute = this.getField().getRawValue();
1308
					String valeurBrute = this.getField().getRawValue();
1305
					if (fonctionsMagazin.getCount() == 0 && fonctionsListe != null) {
1309
					if (fonctionsMagazin.getCount() == 0 && fonctionsListe != null) {
1306
						fonctionsMagazin.add(fonctionsListe);
1310
						fonctionsMagazin.add(fonctionsListe);
1307
					}
1311
					}
1308
					if (valeurBrute.matches("^[0-9]+$") && fonctionsMagazin.findModel("id_valeur", valeurBrute) != null) {
1312
					if (valeurBrute.matches("^[0-9]+$") && fonctionsMagazin.findModel("id_valeur", valeurBrute) != null) {
1309
						fonctionTrouvee = fonctionsMagazin.findModel("id_valeur", valeurBrute);
1313
						fonctionTrouvee = fonctionsMagazin.findModel("id_valeur", valeurBrute);
1310
					} else {
1314
					} else {
1311
						retour = valeurBrute;
1315
						retour = valeurBrute;
1312
					}
1316
					}
1313
				} else if (valeur instanceof Valeur) {
1317
				} else if (valeur instanceof Valeur) {
1314
					fonctionTrouvee = (Valeur) valeur;
1318
					fonctionTrouvee = (Valeur) valeur;
1315
				}
1319
				}
1316
				
1320
				
1317
				if (fonctionTrouvee != null) {
1321
				if (fonctionTrouvee != null) {
1318
					retour = fonctionTrouvee.getNom();
1322
					retour = fonctionTrouvee.getNom();
1319
				}
1323
				}
1320
				
1324
				
1321
				return retour;				
1325
				return retour;				
1322
			}
1326
			}
1323
		};
1327
		};
1324
		column.setEditor(fonctionEditor);
1328
		column.setEditor(fonctionEditor);
1325
		configs.add(column);
1329
		configs.add(column);
1326
		
1330
		
1327
		column = new ColumnConfig("prenom", "Prénom", 100);  
1331
		column = new ColumnConfig("prenom", "Prénom", 100);  
1328
		TextField<String> prenomChp = new TextField<String>();  
1332
		TextField<String> prenomChp = new TextField<String>();  
1329
		prenomChp.setAllowBlank(false);
1333
		prenomChp.setAllowBlank(false);
1330
		prenomChp.getMessages().setBlankText("Ce champ est obligatoire.");
1334
		prenomChp.getMessages().setBlankText("Ce champ est obligatoire.");
1331
		prenomChp.setAutoValidate(true);
1335
		prenomChp.setAutoValidate(true);
1332
		prenomChp.addStyleName(ComposantClass.OBLIGATOIRE);
1336
		prenomChp.addStyleName(ComposantClass.OBLIGATOIRE);
1333
		prenomChp.addListener(Events.Valid, creerEcouteurChampObligatoire());
1337
		prenomChp.addListener(Events.Valid, creerEcouteurChampObligatoire());
1334
		column.setEditor(new CellEditor(prenomChp));
1338
		column.setEditor(new CellEditor(prenomChp));
1335
		configs.add(column);  
1339
		configs.add(column);  
1336
		
1340
		
1337
		column = new ColumnConfig("nom", "Nom", 100);
1341
		column = new ColumnConfig("nom", "Nom", 100);
1338
		TextField<String> nomChp = new TextField<String>();  
1342
		TextField<String> nomChp = new TextField<String>();  
1339
		nomChp.setAllowBlank(false);
1343
		nomChp.setAllowBlank(false);
1340
		nomChp.getMessages().setBlankText("Ce champ est obligatoire.");
1344
		nomChp.getMessages().setBlankText("Ce champ est obligatoire.");
1341
		nomChp.setAutoValidate(true);
1345
		nomChp.setAutoValidate(true);
1342
		nomChp.addStyleName(ComposantClass.OBLIGATOIRE);
1346
		nomChp.addStyleName(ComposantClass.OBLIGATOIRE);
1343
		nomChp.addListener(Events.Valid, creerEcouteurChampObligatoire());
1347
		nomChp.addListener(Events.Valid, creerEcouteurChampObligatoire());
1344
		column.setEditor(new CellEditor(nomChp));
1348
		column.setEditor(new CellEditor(nomChp));
1345
		configs.add(column);  
1349
		configs.add(column);  
1346
 
1350
 
1347
		column = new ColumnConfig("tel_fix", "Téléphone fixe", 100);
1351
		column = new ColumnConfig("tel_fix", "Téléphone fixe", 100);
1348
		TextField<String> telChp = new TextField<String>();  
1352
		TextField<String> telChp = new TextField<String>();  
1349
		column.setEditor(new CellEditor(telChp));
1353
		column.setEditor(new CellEditor(telChp));
1350
		configs.add(column);
1354
		configs.add(column);
1351
 
1355
 
1352
		column = new ColumnConfig("tel_fax", "Fax", 100);
1356
		column = new ColumnConfig("tel_fax", "Fax", 100);
1353
		TextField<String> faxChp = new TextField<String>();  
1357
		TextField<String> faxChp = new TextField<String>();  
1354
		column.setEditor(new CellEditor(faxChp));
1358
		column.setEditor(new CellEditor(faxChp));
1355
		configs.add(column);
1359
		configs.add(column);
1356
		
1360
		
1357
		column = new ColumnConfig("courriel", "Courriel principal", 200);
1361
		column = new ColumnConfig("courriel", "Courriel principal", 200);
1358
		TextField<String> emailChp = new TextField<String>();  
1362
		TextField<String> emailChp = new TextField<String>();  
1359
		column.setEditor(new CellEditor(emailChp));
1363
		column.setEditor(new CellEditor(emailChp));
1360
		configs.add(column);
1364
		configs.add(column);
1361
		
1365
		
1362
		magazinLiStatut = new ListStore<Valeur>();
1366
		magazinLiStatut = new ListStore<Valeur>();
1363
		magazinLiStatut.add(new ArrayList<Valeur>());
1367
		magazinLiStatut.add(new ArrayList<Valeur>());
1364
		
1368
		
1365
		comboLiStatut = new ComboBox<Valeur>();  
1369
		comboLiStatut = new ComboBox<Valeur>();  
1366
		comboLiStatut.setTriggerAction(TriggerAction.ALL);  
1370
		comboLiStatut.setTriggerAction(TriggerAction.ALL);  
1367
		comboLiStatut.setEditable(false);
1371
		comboLiStatut.setEditable(false);
1368
		comboLiStatut.disableTextSelection(true);
1372
		comboLiStatut.disableTextSelection(true);
1369
		comboLiStatut.setDisplayField("nom");
1373
		comboLiStatut.setDisplayField("nom");
1370
		comboLiStatut.setStore(magazinLiStatut);
1374
		comboLiStatut.setStore(magazinLiStatut);
1371
		mediateur.obtenirListeValeurEtRafraichir(this, "statut", sequenceur);
1375
		mediateur.obtenirListeValeurEtRafraichir(this, "statut", sequenceur);
1372
		
1376
		
1373
		CellEditor statutEditor = new CellEditor(comboLiStatut) {  
1377
		CellEditor statutEditor = new CellEditor(comboLiStatut) {  
1374
			@Override  
1378
			@Override  
1375
			public Object preProcessValue(Object value) {  
1379
			public Object preProcessValue(Object value) {  
1376
				if (value == null) {  
1380
				if (value == null) {  
1377
					return value;  
1381
					return value;  
1378
				}
1382
				}
1379
				return comboLiStatut.getStore().findModel("nom", (String) value);  
1383
				return comboLiStatut.getStore().findModel("nom", (String) value);  
1380
			}  
1384
			}  
1381
			
1385
			
1382
			@Override  
1386
			@Override  
1383
			public Object postProcessValue(Object value) {  
1387
			public Object postProcessValue(Object value) {  
1384
				if (value == null) {  
1388
				if (value == null) {  
1385
					return value;  
1389
					return value;  
1386
				}
1390
				}
1387
				return ((Valeur) value).get("nom");  
1391
				return ((Valeur) value).get("nom");  
1388
			}  
1392
			}  
1389
		};
1393
		};
1390
		column = new ColumnConfig("statut", "Statut", 100);
1394
		column = new ColumnConfig("statut", "Statut", 100);
1391
		column.setEditor(statutEditor);
1395
		column.setEditor(statutEditor);
1392
		configs.add(column);
1396
		configs.add(column);
1393
		
1397
		
1394
		column = new ColumnConfig("travail", "Travail hebdo (%)", 100);
1398
		column = new ColumnConfig("travail", "Travail hebdo (%)", 100);
1395
		column.setNumberFormat(NumberFormat.getFormat("##"));
1399
		column.setNumberFormat(NumberFormat.getFormat("##"));
1396
		NumberField tpsWChp = new NumberField();
1400
		NumberField tpsWChp = new NumberField();
1397
		tpsWChp.setFormat(NumberFormat.getFormat("##"));
1401
		tpsWChp.setFormat(NumberFormat.getFormat("##"));
1398
		tpsWChp.setToolTip("Ce champ doit contenir un nombre");
1402
		tpsWChp.setToolTip("Ce champ doit contenir un nombre");
1399
		column.setEditor(new CellEditor(tpsWChp));
1403
		column.setEditor(new CellEditor(tpsWChp));
1400
		configs.add(column);
1404
		configs.add(column);
1401
		
1405
		
1402
		column = new ColumnConfig("specialite", "Spécialité principale", 150);
1406
		column = new ColumnConfig("specialite", "Spécialité principale", 150);
1403
		TextField<String> speChp = new TextField<String>();  
1407
		TextField<String> speChp = new TextField<String>();  
1404
		column.setEditor(new CellEditor(speChp));
1408
		column.setEditor(new CellEditor(speChp));
1405
		configs.add(column);
1409
		configs.add(column);
1406
		
1410
		
1407
		CheckColumnConfig checkColumn = new CheckColumnConfig("contact", "Contact ?", 60);
1411
		CheckColumnConfig checkColumn = new CheckColumnConfig("contact", "Contact ?", 60);
1408
		configs.add(checkColumn);
1412
		configs.add(checkColumn);
1409
		
1413
		
1410
		ToolBar toolBar = new ToolBar();  
1414
		ToolBar toolBar = new ToolBar();  
1411
		
1415
		
1412
		Button ajouterPersonnelBtn = new Button("Ajouter");
1416
		Button ajouterPersonnelBtn = new Button("Ajouter");
1413
		ajouterPersonnelBtn.setIcon(Images.ICONES.vcardAjouter());
1417
		ajouterPersonnelBtn.setIcon(Images.ICONES.vcardAjouter());
1414
		ajouterPersonnelBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {  
1418
		ajouterPersonnelBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {  
1415
			@Override  
1419
			@Override  
1416
			public void componentSelected(ButtonEvent ce) {  
1420
			public void componentSelected(ButtonEvent ce) {  
1417
				StructureAPersonne membreDuPersonnel = new StructureAPersonne("", StructureAPersonne.ROLE_EQUIPE, StructureAPersonne.ETAT_AJOUTE);
1421
				StructureAPersonne membreDuPersonnel = new StructureAPersonne("", StructureAPersonne.ROLE_EQUIPE, StructureAPersonne.ETAT_AJOUTE);
1418
				ajouterMembreAGrillePersonnel(membreDuPersonnel);
1422
				ajouterMembreAGrillePersonnel(membreDuPersonnel);
1419
			}  
1423
			}  
1420
		});
1424
		});
1421
		toolBar.add(ajouterPersonnelBtn);
1425
		toolBar.add(ajouterPersonnelBtn);
1422
		
1426
		
1423
		toolBar.add(new SeparatorToolItem());
1427
		toolBar.add(new SeparatorToolItem());
1424
		
1428
		
1425
		supprimerPersonnelBtn = new Button("Supprimer");
1429
		supprimerPersonnelBtn = new Button("Supprimer");
1426
		supprimerPersonnelBtn.setIcon(Images.ICONES.vcardSupprimer());
1430
		supprimerPersonnelBtn.setIcon(Images.ICONES.vcardSupprimer());
1427
		supprimerPersonnelBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {  
1431
		supprimerPersonnelBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {  
1428
			@Override
1432
			@Override
1429
			public void componentSelected(ButtonEvent ce) {
1433
			public void componentSelected(ButtonEvent ce) {
1430
				StructureAPersonne personne = grillePersonnel.getSelectionModel().getSelectedItem();
1434
				StructureAPersonne personne = grillePersonnel.getSelectionModel().getSelectedItem();
1431
				if (personne != null) {
1435
				if (personne != null) {
1432
					// Ajout de la personne supprimée à la liste
1436
					// Ajout de la personne supprimée à la liste
1433
					if (personne.getIdPersonne() != null && !personne.getIdPersonne().equals("")) {
1437
					if (personne.getIdPersonne() != null && !personne.getIdPersonne().equals("")) {
1434
						personnelSupprime.put(personne.getId(), personne);
1438
						personnelSupprime.put(personne.getId(), personne);
1435
					}
1439
					}
1436
	
1440
	
1437
					// Suppression de l'enregistrement de la grille
1441
					// Suppression de l'enregistrement de la grille
1438
					grillePersonnel.getStore().remove(personne);
1442
					grillePersonnel.getStore().remove(personne);
1439
					
1443
					
1440
					// Désactivation du bouton supprimer si la grille contient plus d'élément
1444
					// Désactivation du bouton supprimer si la grille contient plus d'élément
1441
					if (grillePersonnel.getStore().getCount() == 0) {  
1445
					if (grillePersonnel.getStore().getCount() == 0) {  
1442
						//TODO : check : Item -> component
1446
						//TODO : check : Item -> component
1443
						ce.getComponent().disable();  
1447
						ce.getComponent().disable();  
1444
					}
1448
					}
1445
				}
1449
				}
1446
			}   
1450
			}   
1447
		});
1451
		});
1448
		toolBar.add(supprimerPersonnelBtn);
1452
		toolBar.add(supprimerPersonnelBtn);
1449
		
1453
		
1450
		toolBar.add(new SeparatorToolItem());
1454
		toolBar.add(new SeparatorToolItem());
1451
		
1455
		
1452
		Button rafraichirPersonnelBtn = new Button("Rafraichir");
1456
		Button rafraichirPersonnelBtn = new Button("Rafraichir");
1453
		rafraichirPersonnelBtn.setIcon(Images.ICONES.rafraichir());
1457
		rafraichirPersonnelBtn.setIcon(Images.ICONES.rafraichir());
1454
		rafraichirPersonnelBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {  
1458
		rafraichirPersonnelBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {  
1455
			@Override
1459
			@Override
1456
			public void componentSelected(ButtonEvent ce) {
1460
			public void componentSelected(ButtonEvent ce) {
1457
				rafraichirPersonnel();
1461
				rafraichirPersonnel();
1458
			}   
1462
			}   
1459
		});
1463
		});
1460
		toolBar.add(rafraichirPersonnelBtn);
1464
		toolBar.add(rafraichirPersonnelBtn);
1461
		
1465
		
1462
		toolBar.add(new SeparatorToolItem());
1466
		toolBar.add(new SeparatorToolItem());
1463
		
1467
		
1464
		personneExistanteMagazin = new ListStore<Personne>();
1468
		personneExistanteMagazin = new ListStore<Personne>();
1465
		personneExistanteMagazin.add(new ArrayList<Personne>());
1469
		personneExistanteMagazin.add(new ArrayList<Personne>());
1466
		
1470
		
1467
		ModelType modelTypePersonnes = new ModelType();
1471
		ModelType modelTypePersonnes = new ModelType();
1468
		modelTypePersonnes.setRoot("personnes");
1472
		modelTypePersonnes.setRoot("personnes");
1469
		modelTypePersonnes.setTotalName("nbElements");
1473
		modelTypePersonnes.setTotalName("nbElements");
1470
		modelTypePersonnes.addField("cp_fmt_nom_complet");
1474
		modelTypePersonnes.addField("cp_fmt_nom_complet");
1471
		modelTypePersonnes.addField("cp_nom");
1475
		modelTypePersonnes.addField("cp_nom");
1472
		modelTypePersonnes.addField("cp_prenom");
1476
		modelTypePersonnes.addField("cp_prenom");
1473
		modelTypePersonnes.addField("cp_truk_courriel");
1477
		modelTypePersonnes.addField("cp_truk_courriel");
1474
		modelTypePersonnes.addField("cp_truk_telephone");
1478
		modelTypePersonnes.addField("cp_truk_telephone");
1475
		modelTypePersonnes.addField("cp_ce_truk_specialite");
1479
		modelTypePersonnes.addField("cp_ce_truk_specialite");
1476
		
1480
		
1477
		String displayNamePersonnes = "cp_fmt_nom_complet";
1481
		String displayNamePersonnes = "cp_fmt_nom_complet";
1478
		ProxyPersonnes<ModelData> proxyPersonnes = new ProxyPersonnes<ModelData>(sequenceur);
1482
		ProxyPersonnes<ModelData> proxyPersonnes = new ProxyPersonnes<ModelData>(null);
1479
		
1483
		
1480
		personneExistanteCombo = new ChampComboBoxRechercheTempsReelPaginable(proxyPersonnes, modelTypePersonnes, displayNamePersonnes);
1484
		personneExistanteCombo = new ChampComboBoxRechercheTempsReelPaginable(proxyPersonnes, modelTypePersonnes, displayNamePersonnes);
1481
 
1485
 
1482
		// TODO : dans GXT 2.0 plus besoin de l'adaptateur, on peut ajouter la combobox directement sur la toolbar
1486
		// TODO : dans GXT 2.0 plus besoin de l'adaptateur, on peut ajouter la combobox directement sur la toolbar
1483
			//> CHECK
1487
			//> CHECK
1484
		toolBar.add(personneExistanteCombo);
1488
		toolBar.add(personneExistanteCombo);
1485
		
1489
		
1486
		Button ajouterPersonneExistanteBtn = new Button("Ajouter à la grille");
1490
		Button ajouterPersonneExistanteBtn = new Button("Ajouter à la grille");
1487
		ajouterPersonneExistanteBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {  
1491
		ajouterPersonneExistanteBtn.addSelectionListener(new SelectionListener<ButtonEvent>() {  
1488
			@Override  
1492
			@Override  
1489
			public void componentSelected(ButtonEvent ce) {
1493
			public void componentSelected(ButtonEvent ce) {
1490
				
1494
				
1491
				Personne personneExistante = new Personne(personneExistanteCombo.getValeur());
1495
				Personne personneExistante = new Personne(personneExistanteCombo.getValeur());
1492
				
1496
				
1493
				if (personneExistante != null) {
1497
				if (personneExistante != null) {
1494
					StructureAPersonne membreDuPersonnel = new StructureAPersonne(personneExistante, "", StructureAPersonne.ROLE_EQUIPE, StructureAPersonne.ETAT_AJOUTE);
1498
					StructureAPersonne membreDuPersonnel = new StructureAPersonne(personneExistante, "", StructureAPersonne.ROLE_EQUIPE, StructureAPersonne.ETAT_AJOUTE);
1495
					ajouterMembreAGrillePersonnel(membreDuPersonnel);
1499
					ajouterMembreAGrillePersonnel(membreDuPersonnel);
1496
				}
1500
				}
1497
			}  
1501
			}  
1498
		});
1502
		});
1499
		toolBar.add(ajouterPersonneExistanteBtn);
1503
		toolBar.add(ajouterPersonneExistanteBtn);
1500
		
1504
		
1501
		cp.setTopComponent(toolBar);  
1505
		cp.setTopComponent(toolBar);  
1502
 
1506
 
1503
		ColumnModel cm = new ColumnModel(configs);
1507
		ColumnModel cm = new ColumnModel(configs);
1504
		
1508
		
1505
		grillePersonnel = new EditorGrid<StructureAPersonne>(personnelGrilleMagazin, cm);
1509
		grillePersonnel = new EditorGrid<StructureAPersonne>(personnelGrilleMagazin, cm);
1506
		grillePersonnel.setHeight("100%");
1510
		grillePersonnel.setHeight("100%");
1507
		grillePersonnel.setBorders(true);
1511
		grillePersonnel.setBorders(true);
1508
		grillePersonnel.setSelectionModel(sm);
1512
		grillePersonnel.setSelectionModel(sm);
1509
		grillePersonnel.addPlugin(checkColumn);
1513
		grillePersonnel.addPlugin(checkColumn);
1510
		grillePersonnel.addPlugin(r);
1514
		grillePersonnel.addPlugin(r);
1511
		grillePersonnel.getView().setForceFit(true);
1515
		grillePersonnel.getView().setForceFit(true);
1512
  		grillePersonnel.setAutoExpandColumn("specialite");
1516
  		grillePersonnel.setAutoExpandColumn("specialite");
1513
  		grillePersonnel.setStripeRows(true);
1517
  		grillePersonnel.setStripeRows(true);
1514
  		grillePersonnel.setTrackMouseOver(true);
1518
  		grillePersonnel.setTrackMouseOver(true);
1515
  		
1519
  		
1516
  		
1520
  		
1517
		personnelGrilleMagazin.addListener(Store.Update, new Listener<StoreEvent<StructureAPersonne>>() {
1521
		personnelGrilleMagazin.addListener(Store.Update, new Listener<StoreEvent<StructureAPersonne>>() {
1518
			public void handleEvent(StoreEvent<StructureAPersonne> ce) {
1522
			public void handleEvent(StoreEvent<StructureAPersonne> ce) {
1519
 
-
 
1520
				StructureAPersonne structureAPersonne = ce.getModel();
1523
				StructureAPersonne structureAPersonne = ce.getModel();
1521
				String etat = structureAPersonne.get("etat");
1524
				String etat = structureAPersonne.get("etat");
1522
				
-
 
1523
				if (etat!=null && !etat.equals(aDonnee.ETAT_AJOUTE) && structureAPersonne!=null && !UtilString.isEmpty(structureAPersonne.getId()))	{
1525
				if ((etat==null || !etat.equals(aDonnee.ETAT_AJOUTE)) && structureAPersonne!=null && !UtilString.isEmpty(structureAPersonne.getId()))	{
1524
					ce.getModel().set("etat", aDonnee.ETAT_MODIFIE);
1526
					ce.getModel().set("etat", aDonnee.ETAT_MODIFIE);
1525
				}
1527
				}
1526
			}
1528
			}
1527
		});
1529
		});
-
 
1530
  		
1528
  		
1531
		
1529
  		cp.add(grillePersonnel);
1532
  		cp.add(grillePersonnel);
1530
		personnelOnglet.add(cp);
1533
		personnelOnglet.add(cp);
1531
		
1534
		
1532
		return personnelOnglet;
1535
		return personnelOnglet;
1533
	}
1536
	}
-
 
1537
	
1534
	
1538
	
1535
	private TabItem creerOngletIdentification() {
1539
	private TabItem creerOngletIdentification() {
1536
		//+-----------------------------------------------------------------------------------------------------------+
1540
		//+-----------------------------------------------------------------------------------------------------------+
1537
		// Onlget formulaire IDENTIFICATION
1541
		// Onlget formulaire IDENTIFICATION
1538
		identificationOnglet = creerOnglet("Identification", "identification");
1542
		identificationOnglet = creerOnglet("Identification", "identification");
1539
		identificationOnglet.addListener(Events.Select, new Listener<ComponentEvent>() {  
1543
		identificationOnglet.addListener(Events.Select, new Listener<ComponentEvent>() {  
1540
			public void handleEvent(ComponentEvent be) {  
1544
			public void handleEvent(ComponentEvent be) {  
1541
				peuplerStructureIdentification();
1545
				peuplerStructureIdentification();
1542
				identificationOnglet.layout();
1546
				identificationOnglet.layout();
1543
			}  
1547
			}  
1544
		});
1548
		});
1545
		
1549
		
1546
		//+-----------------------------------------------------------------------------------------------------------+
1550
		//+-----------------------------------------------------------------------------------------------------------+
1547
		// Champs cachés
1551
		// Champs cachés
1548
		idStructureChp = new HiddenField<String>();
1552
		idStructureChp = new HiddenField<String>();
1549
		
1553
		
1550
		//+-----------------------------------------------------------------------------------------------------------+
1554
		//+-----------------------------------------------------------------------------------------------------------+
1551
		// Fieldset IDENTITÉ
1555
		// Fieldset IDENTITÉ
1552
		FieldSet fieldSetIdentite = new FieldSet();
1556
		FieldSet fieldSetIdentite = new FieldSet();
1553
		fieldSetIdentite.setHeading("Identité");
1557
		fieldSetIdentite.setHeading("Identité");
1554
		fieldSetIdentite.setCollapsible(true);
1558
		fieldSetIdentite.setCollapsible(true);
1555
		fieldSetIdentite.setLayout(creerFormLayout(120, LabelAlign.LEFT));
1559
		fieldSetIdentite.setLayout(creerFormLayout(120, LabelAlign.LEFT));
1556
		
1560
		
1557
		nomStructureChp = new TextField<String>();
1561
		nomStructureChp = new TextField<String>();
1558
		nomStructureChp.setTabIndex(tabIndex++);
1562
		nomStructureChp.setTabIndex(tabIndex++);
1559
		nomStructureChp.setFieldLabel("Nom de la structure");
1563
		nomStructureChp.setFieldLabel("Nom de la structure");
1560
		nomStructureChp.setAllowBlank(false);
1564
		nomStructureChp.setAllowBlank(false);
1561
		nomStructureChp.getMessages().setBlankText("Ce champ est obligatoire.");
1565
		nomStructureChp.getMessages().setBlankText("Ce champ est obligatoire.");
1562
		nomStructureChp.addStyleName(ComposantClass.OBLIGATOIRE);
1566
		nomStructureChp.addStyleName(ComposantClass.OBLIGATOIRE);
1563
		nomStructureChp.addListener(Events.Valid, creerEcouteurChampObligatoire());
1567
		nomStructureChp.addListener(Events.Valid, creerEcouteurChampObligatoire());
1564
		fieldSetIdentite.add(nomStructureChp, new FormData(450, 0));
1568
		fieldSetIdentite.add(nomStructureChp, new FormData(450, 0));
1565
		
1569
		
1566
		ModelType modelTypeProjets = new ModelType();
1570
		ModelType modelTypeProjets = new ModelType();
1567
		modelTypeProjets.setRoot("projets");
1571
		modelTypeProjets.setRoot("projets");
1568
		modelTypeProjets.setTotalName("nbElements");
1572
		modelTypeProjets.setTotalName("nbElements");
1569
		modelTypeProjets.addField("cpr_nom");
1573
		modelTypeProjets.addField("cpr_nom");
1570
		modelTypeProjets.addField("cpr_id_projet");
1574
		modelTypeProjets.addField("cpr_id_projet");
1571
		
1575
		
1572
		String displayNameProjets = "cpr_nom";
1576
		String displayNameProjets = "cpr_nom";
1573
		ProxyProjets<ModelData> proxyProjets = new ProxyProjets<ModelData>(sequenceur);
1577
		ProxyProjets<ModelData> proxyProjets = new ProxyProjets<ModelData>(null);
1574
		
1578
		
1575
		projetsCombo = new ChampComboBoxRechercheTempsReelPaginable(proxyProjets, modelTypeProjets, displayNameProjets);
1579
		projetsCombo = new ChampComboBoxRechercheTempsReelPaginable(proxyProjets, modelTypeProjets, displayNameProjets);
1576
		projetsCombo.getCombo().setTabIndex(tabIndex++);
1580
		projetsCombo.getCombo().setTabIndex(tabIndex++);
1577
		projetsCombo.getCombo().setFieldLabel(i18nC.projetChamp());
1581
		projetsCombo.getCombo().setFieldLabel(i18nC.projetChamp());
1578
		projetsCombo.getCombo().setForceSelection(true);
1582
		projetsCombo.getCombo().setForceSelection(true);
1579
		projetsCombo.getCombo().addStyleName(ComposantClass.OBLIGATOIRE);
1583
		projetsCombo.getCombo().addStyleName(ComposantClass.OBLIGATOIRE);
1580
		projetsCombo.getCombo().addListener(Events.Valid, Formulaire.creerEcouteurChampObligatoire());
1584
		projetsCombo.getCombo().addListener(Events.Valid, Formulaire.creerEcouteurChampObligatoire());
1581
		projetsCombo.setWidth(120, 520);
1585
		projetsCombo.setWidth(120, 520);
1582
		fieldSetIdentite.add(projetsCombo, new FormData(520, 0));
1586
		fieldSetIdentite.add(projetsCombo, new FormData(520, 0));
1583
		
1587
		
1584
		// Création du sous-formulaire : Acronyme
1588
		// Création du sous-formulaire : Acronyme
1585
		LayoutContainer ligne = new LayoutContainer();  
1589
		LayoutContainer ligne = new LayoutContainer();  
1586
		ligne.setLayout(new ColumnLayout());
1590
		ligne.setLayout(new ColumnLayout());
1587
		ligne.setSize(600, -1);
1591
		ligne.setSize(600, -1);
1588
		
1592
		
1589
		LayoutContainer gauche = new LayoutContainer();
1593
		LayoutContainer gauche = new LayoutContainer();
1590
		gauche.setLayout(creerFormLayout(120, LabelAlign.LEFT));
1594
		gauche.setLayout(creerFormLayout(120, LabelAlign.LEFT));
1591
		LayoutContainer droite = new LayoutContainer();
1595
		LayoutContainer droite = new LayoutContainer();
1592
		droite.setLayout(creerFormLayout(10, LabelAlign.LEFT));
1596
		droite.setLayout(creerFormLayout(10, LabelAlign.LEFT));
1593
		
1597
		
1594
		ListStore<InterneValeur> acronymes = new ListStore<InterneValeur>();  
1598
		ListStore<InterneValeur> acronymes = new ListStore<InterneValeur>();  
1595
		acronymes.add(InterneValeurListe.getTypeAcronyme()); 
1599
		acronymes.add(InterneValeurListe.getTypeAcronyme()); 
1596
		
1600
		
1597
		comboAcronyme = new ComboBox<InterneValeur>();
1601
		comboAcronyme = new ComboBox<InterneValeur>();
1598
		comboAcronyme.setTabIndex(tabIndex++);
1602
		comboAcronyme.setTabIndex(tabIndex++);
1599
		comboAcronyme.setEmptyText("Sélectioner un type d'acronyme...");
1603
		comboAcronyme.setEmptyText("Sélectioner un type d'acronyme...");
1600
		comboAcronyme.setFieldLabel("Type d'acronyme");
1604
		comboAcronyme.setFieldLabel("Type d'acronyme");
1601
		comboAcronyme.setDisplayField("nom");
1605
		comboAcronyme.setDisplayField("nom");
1602
		comboAcronyme.setStore(acronymes);
1606
		comboAcronyme.setStore(acronymes);
1603
		comboAcronyme.setEditable(false);
1607
		comboAcronyme.setEditable(false);
1604
		comboAcronyme.setTypeAhead(true);  
1608
		comboAcronyme.setTypeAhead(true);  
1605
		comboAcronyme.setTriggerAction(TriggerAction.ALL);
1609
		comboAcronyme.setTriggerAction(TriggerAction.ALL);
1606
		comboAcronyme.addSelectionChangedListener(new SelectionChangedListener<InterneValeur>() {
1610
		comboAcronyme.addSelectionChangedListener(new SelectionChangedListener<InterneValeur>() {
1607
			@Override
1611
			@Override
1608
			public void selectionChanged(SelectionChangedEvent<InterneValeur> se) {
1612
			public void selectionChanged(SelectionChangedEvent<InterneValeur> se) {
1609
				String acronymeAbr = se.getSelectedItem().getAbr();
1613
				String acronymeAbr = se.getSelectedItem().getAbr();
1610
				if (acronymeAbr.equals("IH")) {
1614
				if (acronymeAbr.equals("IH")) {
1611
					mnhnChp.hide();
1615
					mnhnChp.hide();
1612
					ihChp.show();
1616
					ihChp.show();
1613
				} else if (acronymeAbr.equals("MNHN")) {
1617
				} else if (acronymeAbr.equals("MNHN")) {
1614
					ihChp.hide();
1618
					ihChp.hide();
1615
					mnhnChp.show();
1619
					mnhnChp.show();
1616
				} else if (acronymeAbr.equals("")) {
1620
				} else if (acronymeAbr.equals("")) {
1617
					ihChp.hide();
1621
					ihChp.hide();
1618
					mnhnChp.hide();
1622
					mnhnChp.hide();
1619
					comboAcronyme.clearSelections();
1623
					comboAcronyme.clearSelections();
1620
				}
1624
				}
1621
			}
1625
			}
1622
        });
1626
        });
1623
		gauche.add(comboAcronyme, new FormData("95%"));
1627
		gauche.add(comboAcronyme, new FormData("95%"));
1624
		
1628
		
1625
		ihChp = new TextField<String>();  
1629
		ihChp = new TextField<String>();  
1626
		ihChp.setTabIndex(tabIndex++);
1630
		ihChp.setTabIndex(tabIndex++);
1627
		ihChp.setLabelSeparator("");
1631
		ihChp.setLabelSeparator("");
1628
		ihChp.setToolTip("Index Herbariorum : herbier de plus de 5000 échantillons");
1632
		ihChp.setToolTip("Index Herbariorum : herbier de plus de 5000 échantillons");
1629
		ihChp.hide();
1633
		ihChp.hide();
1630
		droite.add(ihChp, new FormData("95%"));
1634
		droite.add(ihChp, new FormData("95%"));
1631
		
1635
		
1632
		mnhnChp = new TextField<String>();
1636
		mnhnChp = new TextField<String>();
1633
		mnhnChp.setTabIndex(tabIndex++);
1637
		mnhnChp.setTabIndex(tabIndex++);
1634
		mnhnChp.setLabelSeparator("");
1638
		mnhnChp.setLabelSeparator("");
1635
		mnhnChp.setToolTip("Acronyme MNHN : herbier de moins de 5000 échantillons");
1639
		mnhnChp.setToolTip("Acronyme MNHN : herbier de moins de 5000 échantillons");
1636
		mnhnChp.hide();
1640
		mnhnChp.hide();
1637
		droite.add(mnhnChp, new FormData("95%"));
1641
		droite.add(mnhnChp, new FormData("95%"));
1638
		
1642
		
1639
		ligne.add(gauche, new ColumnData(.5));  
1643
		ligne.add(gauche, new ColumnData(.5));  
1640
		ligne.add(droite, new ColumnData(.5));
1644
		ligne.add(droite, new ColumnData(.5));
1641
		fieldSetIdentite.add(ligne);
1645
		fieldSetIdentite.add(ligne);
1642
		
1646
		
1643
		// Création du sous-formulaire : Type de Structure
1647
		// Création du sous-formulaire : Type de Structure
1644
		LayoutContainer ligneTs = new LayoutContainer();  
1648
		LayoutContainer ligneTs = new LayoutContainer();  
1645
		ligneTs.setLayout(new ColumnLayout());
1649
		ligneTs.setLayout(new ColumnLayout());
1646
		ligneTs.setSize(600, -1);
1650
		ligneTs.setSize(600, -1);
1647
		
1651
		
1648
		LayoutContainer gaucheTs = new LayoutContainer();
1652
		LayoutContainer gaucheTs = new LayoutContainer();
1649
		gaucheTs.setLayout(creerFormLayout(120, LabelAlign.LEFT));
1653
		gaucheTs.setLayout(creerFormLayout(120, LabelAlign.LEFT));
1650
		
1654
		
1651
		LayoutContainer droiteTs = new LayoutContainer();
1655
		LayoutContainer droiteTs = new LayoutContainer();
1652
		droiteTs.setLayout(creerFormLayout(10, LabelAlign.LEFT));
1656
		droiteTs.setLayout(creerFormLayout(10, LabelAlign.LEFT));
1653
		
1657
		
1654
		ListStore<InterneValeur> typesStructure = new ListStore<InterneValeur>();  
1658
		ListStore<InterneValeur> typesStructure = new ListStore<InterneValeur>();  
1655
		typesStructure.add(InterneValeurListe.getTypeStructure());
1659
		typesStructure.add(InterneValeurListe.getTypeStructure());
1656
		
1660
		
1657
		comboTypeStructure = new ComboBox<InterneValeur>();
1661
		comboTypeStructure = new ComboBox<InterneValeur>();
1658
		comboTypeStructure.setTabIndex(tabIndex++);
1662
		comboTypeStructure.setTabIndex(tabIndex++);
1659
		comboTypeStructure.setEmptyText("Sélectioner un type de structure...");
1663
		comboTypeStructure.setEmptyText("Sélectioner un type de structure...");
1660
		comboTypeStructure.setFieldLabel("Statut des structures");
1664
		comboTypeStructure.setFieldLabel("Statut des structures");
1661
		comboTypeStructure.setDisplayField("nom");
1665
		comboTypeStructure.setDisplayField("nom");
1662
		comboTypeStructure.setStore(typesStructure);
1666
		comboTypeStructure.setStore(typesStructure);
1663
		comboTypeStructure.setEditable(false);
1667
		comboTypeStructure.setEditable(false);
1664
		comboTypeStructure.setTypeAhead(true);  
1668
		comboTypeStructure.setTypeAhead(true);  
1665
		comboTypeStructure.setTriggerAction(TriggerAction.ALL);
1669
		comboTypeStructure.setTriggerAction(TriggerAction.ALL);
1666
		comboTypeStructure.addSelectionChangedListener(new SelectionChangedListener<InterneValeur>() {
1670
		comboTypeStructure.addSelectionChangedListener(new SelectionChangedListener<InterneValeur>() {
1667
			@Override
1671
			@Override
1668
			public void selectionChanged(SelectionChangedEvent<InterneValeur> se) {
1672
			public void selectionChanged(SelectionChangedEvent<InterneValeur> se) {
1669
				String typeAbr = se.getSelectedItem().getAbr();
1673
				String typeAbr = se.getSelectedItem().getAbr();
1670
				if (typeAbr.equals("stpu")) {
1674
				if (typeAbr.equals("stpu")) {
1671
					comboLstpr.hide();
1675
					comboLstpr.hide();
1672
					comboLstpu.show();
1676
					comboLstpu.show();
1673
				} else if (typeAbr.equals("stpr")) {
1677
				} else if (typeAbr.equals("stpr")) {
1674
					comboLstpu.hide();
1678
					comboLstpu.hide();
1675
					comboLstpr.show();
1679
					comboLstpr.show();
1676
				} else if (typeAbr.equals("")) {
1680
				} else if (typeAbr.equals("")) {
1677
					comboLstpr.hide();
1681
					comboLstpr.hide();
1678
					comboLstpu.hide();
1682
					comboLstpu.hide();
1679
					comboTypeStructure.clearSelections();
1683
					comboTypeStructure.clearSelections();
1680
				}
1684
				}
1681
			}
1685
			}
1682
        });
1686
        });
1683
		gaucheTs.add(comboTypeStructure, new FormData("95%"));
1687
		gaucheTs.add(comboTypeStructure, new FormData("95%"));
1684
		
1688
		
1685
		magazinLstpu = new ListStore<Valeur>();
1689
		magazinLstpu = new ListStore<Valeur>();
1686
		comboLstpu = new ComboBox<Valeur>();
1690
		comboLstpu = new ComboBox<Valeur>();
1687
		comboLstpu.setTabIndex(tabIndex++);
1691
		comboLstpu.setTabIndex(tabIndex++);
1688
		//comboLstpu.setFieldLabel("Statut des structures publiques");
1692
		//comboLstpu.setFieldLabel("Statut des structures publiques");
1689
		comboLstpu.setLabelSeparator("");
1693
		comboLstpu.setLabelSeparator("");
1690
		comboLstpu.setDisplayField("nom");
1694
		comboLstpu.setDisplayField("nom");
1691
		comboLstpu.setEditable(false);
1695
		comboLstpu.setEditable(false);
1692
		comboLstpu.setTriggerAction(TriggerAction.ALL);
1696
		comboLstpu.setTriggerAction(TriggerAction.ALL);
1693
		comboLstpu.setStore(magazinLstpu);
1697
		comboLstpu.setStore(magazinLstpu);
1694
		comboLstpu.hide();
1698
		comboLstpu.hide();
1695
		droiteTs.add(comboLstpu, new FormData("95%"));
1699
		droiteTs.add(comboLstpu, new FormData("95%"));
1696
		mediateur.obtenirListeValeurEtRafraichir(this, "stpu", sequenceur);
1700
		mediateur.obtenirListeValeurEtRafraichir(this, "stpu", sequenceur);
1697
		
1701
		
1698
		magazinLstpr = new ListStore<Valeur>();
1702
		magazinLstpr = new ListStore<Valeur>();
1699
		comboLstpr = new ComboBox<Valeur>();
1703
		comboLstpr = new ComboBox<Valeur>();
1700
		comboLstpr.setTabIndex(tabIndex++);
1704
		comboLstpr.setTabIndex(tabIndex++);
1701
		//comboLstpr.setFieldLabel("Statut des structures privées");
1705
		//comboLstpr.setFieldLabel("Statut des structures privées");
1702
		comboLstpr.setLabelSeparator("");
1706
		comboLstpr.setLabelSeparator("");
1703
		comboLstpr.setDisplayField("nom");
1707
		comboLstpr.setDisplayField("nom");
1704
		comboLstpr.setEditable(false);
1708
		comboLstpr.setEditable(false);
1705
		comboLstpr.setTriggerAction(TriggerAction.ALL);
1709
		comboLstpr.setTriggerAction(TriggerAction.ALL);
1706
		comboLstpr.setStore(magazinLstpr);
1710
		comboLstpr.setStore(magazinLstpr);
1707
		comboLstpr.hide();
1711
		comboLstpr.hide();
1708
		droiteTs.add(comboLstpr, new FormData("95%"));
1712
		droiteTs.add(comboLstpr, new FormData("95%"));
1709
		mediateur.obtenirListeValeurEtRafraichir(this, "stpr", sequenceur);
1713
		mediateur.obtenirListeValeurEtRafraichir(this, "stpr", sequenceur);
1710
		
1714
		
1711
		ligneTs.add(gaucheTs, new ColumnData(0.5));  
1715
		ligneTs.add(gaucheTs, new ColumnData(0.5));  
1712
		ligneTs.add(droiteTs, new ColumnData(0.5));
1716
		ligneTs.add(droiteTs, new ColumnData(0.5));
1713
		fieldSetIdentite.add(ligneTs);
1717
		fieldSetIdentite.add(ligneTs);
1714
		
1718
		
1715
		dateFondationChp = new TextField();
1719
		dateFondationChp = new TextField();
1716
		dateFondationChp.setTabIndex(tabIndex++);
1720
		dateFondationChp.setTabIndex(tabIndex++);
1717
		dateFondationChp.setFieldLabel("Date de fondation");
1721
		dateFondationChp.setFieldLabel("Date de fondation");
1718
		fieldSetIdentite.add(dateFondationChp);
1722
		fieldSetIdentite.add(dateFondationChp);
1719
		
1723
		
1720
		nbreTotalPersonneStructureChp = new NumberField(); 
1724
		nbreTotalPersonneStructureChp = new NumberField(); 
1721
		nbreTotalPersonneStructureChp.setFieldLabel("Nombre de personne travaillant dans l'institution");
1725
		nbreTotalPersonneStructureChp.setFieldLabel("Nombre de personne travaillant dans l'institution");
1722
		nbreTotalPersonneStructureChp.setFormat(NumberFormat.getFormat("#"));
1726
		nbreTotalPersonneStructureChp.setFormat(NumberFormat.getFormat("#"));
1723
		nbreTotalPersonneStructureChp.setToolTip(i18nC.champNumerique());
1727
		nbreTotalPersonneStructureChp.setToolTip(i18nC.champNumerique());
1724
		fieldSetIdentite.add(nbreTotalPersonneStructureChp);
1728
		fieldSetIdentite.add(nbreTotalPersonneStructureChp);
1725
 
1729
 
1726
		identificationOnglet.add(fieldSetIdentite);
1730
		identificationOnglet.add(fieldSetIdentite);
1727
		
1731
		
1728
		//+-----------------------------------------------------------------------------------------------------------+		
1732
		//+-----------------------------------------------------------------------------------------------------------+		
1729
		// Fieldset DESCRIPTION
1733
		// Fieldset DESCRIPTION
1730
		FieldSet fieldSetDescription = new FieldSet();
1734
		FieldSet fieldSetDescription = new FieldSet();
1731
		fieldSetDescription.setHeading("Description");
1735
		fieldSetDescription.setHeading("Description");
1732
		fieldSetDescription.setCollapsible(true);
1736
		fieldSetDescription.setCollapsible(true);
1733
		fieldSetDescription.setLayout(creerFormLayout(120, LabelAlign.LEFT));
1737
		fieldSetDescription.setLayout(creerFormLayout(120, LabelAlign.LEFT));
1734
		
1738
		
1735
		descriptionChp = new TextArea();
1739
		descriptionChp = new TextArea();
1736
		descriptionChp.setTabIndex(tabIndex++);
1740
		descriptionChp.setTabIndex(tabIndex++);
1737
		descriptionChp.setFieldLabel("Description");
1741
		descriptionChp.setFieldLabel("Description");
1738
		fieldSetDescription.add(descriptionChp, new FormData(550, 0));
1742
		fieldSetDescription.add(descriptionChp, new FormData(550, 0));
1739
		
1743
		
1740
		conditionAccesChp = new TextArea();
1744
		conditionAccesChp = new TextArea();
1741
		conditionAccesChp.setTabIndex(tabIndex++);
1745
		conditionAccesChp.setTabIndex(tabIndex++);
1742
		conditionAccesChp.setFieldLabel("Conditions d'accès");
1746
		conditionAccesChp.setFieldLabel("Conditions d'accès");
1743
		fieldSetDescription.add(conditionAccesChp, new FormData(550, 0));
1747
		fieldSetDescription.add(conditionAccesChp, new FormData(550, 0));
1744
		
1748
		
1745
		conditionUsageChp = new TextArea();
1749
		conditionUsageChp = new TextArea();
1746
		conditionUsageChp.setTabIndex(tabIndex++);
1750
		conditionUsageChp.setTabIndex(tabIndex++);
1747
		conditionUsageChp.setFieldLabel("Conditions d'usage");
1751
		conditionUsageChp.setFieldLabel("Conditions d'usage");
1748
		fieldSetDescription.add(conditionUsageChp, new FormData(550, 0));
1752
		fieldSetDescription.add(conditionUsageChp, new FormData(550, 0));
1749
		
1753
		
1750
		identificationOnglet.add(fieldSetDescription);
1754
		identificationOnglet.add(fieldSetDescription);
1751
		
1755
		
1752
		//+-----------------------------------------------------------------------------------------------------------+		
1756
		//+-----------------------------------------------------------------------------------------------------------+		
1753
		// Fieldset ADRESSE
1757
		// Fieldset ADRESSE
1754
		LayoutContainer principalFdAdresse = new LayoutContainer();  
1758
		LayoutContainer principalFdAdresse = new LayoutContainer();  
1755
		principalFdAdresse.setLayout(new ColumnLayout());
1759
		principalFdAdresse.setLayout(new ColumnLayout());
1756
		principalFdAdresse.setSize(1050, -1);
1760
		principalFdAdresse.setSize(1050, -1);
1757
		
1761
		
1758
		LayoutContainer gaucheFdAdresse = new LayoutContainer();
1762
		LayoutContainer gaucheFdAdresse = new LayoutContainer();
1759
		gaucheFdAdresse.setLayout(creerFormLayout(null, LabelAlign.LEFT));
1763
		gaucheFdAdresse.setLayout(creerFormLayout(null, LabelAlign.LEFT));
1760
		
1764
		
1761
		LayoutContainer droiteFdAdresse = new LayoutContainer();
1765
		LayoutContainer droiteFdAdresse = new LayoutContainer();
1762
		droiteFdAdresse.setLayout(creerFormLayout(100, LabelAlign.LEFT));
1766
		droiteFdAdresse.setLayout(creerFormLayout(100, LabelAlign.LEFT));
1763
		droiteFdAdresse.setWidth(700);
1767
		droiteFdAdresse.setWidth(700);
1764
		
1768
		
1765
		FieldSet fieldSetAdresse = new FieldSet();
1769
		FieldSet fieldSetAdresse = new FieldSet();
1766
		fieldSetAdresse.setHeading("Adresse");
1770
		fieldSetAdresse.setHeading("Adresse");
1767
		fieldSetAdresse.setCollapsible(true);
1771
		fieldSetAdresse.setCollapsible(true);
1768
		
1772
		
1769
		fieldSetAdresse.setLayout(creerFormLayout(null, LabelAlign.LEFT));
1773
		fieldSetAdresse.setLayout(creerFormLayout(null, LabelAlign.LEFT));
1770
		
1774
		
1771
		adrChp = new TextArea();
1775
		adrChp = new TextArea();
1772
		adrChp.setTabIndex(tabIndex++);
1776
		adrChp.setTabIndex(tabIndex++);
1773
		adrChp.setFieldLabel("Adresse (Nom du batiment, rue...)");
1777
		adrChp.setFieldLabel("Adresse (Nom du batiment, rue...)");
1774
		fieldSetAdresse.add(adrChp, new FormData(550, 0));
1778
		fieldSetAdresse.add(adrChp, new FormData(550, 0));
1775
		
1779
		
1776
		adrComplementChp = new TextArea();
1780
		adrComplementChp = new TextArea();
1777
		adrComplementChp.setTabIndex(tabIndex++);
1781
		adrComplementChp.setTabIndex(tabIndex++);
1778
		adrComplementChp.setFieldLabel("Complément d'adresse (BP, étage...)");
1782
		adrComplementChp.setFieldLabel("Complément d'adresse (BP, étage...)");
1779
		fieldSetAdresse.add(adrComplementChp, new FormData(550, 0));
1783
		fieldSetAdresse.add(adrComplementChp, new FormData(550, 0));
1780
		
1784
		
1781
		cpChp = new TextField<String>();
1785
		cpChp = new TextField<String>();
1782
		cpChp.setTabIndex(tabIndex++);
1786
		cpChp.setTabIndex(tabIndex++);
1783
		cpChp.setFieldLabel("Code postal");
1787
		cpChp.setFieldLabel("Code postal");
1784
		gaucheFdAdresse.add(cpChp, new FormData("95%"));
1788
		gaucheFdAdresse.add(cpChp, new FormData("95%"));
1785
		
1789
		
1786
		villeChp = new TextField<String>();
1790
		villeChp = new TextField<String>();
1787
		villeChp.setTabIndex(tabIndex++);
1791
		villeChp.setTabIndex(tabIndex++);
1788
		villeChp.setFieldLabel("Ville");
1792
		villeChp.setFieldLabel("Ville");
1789
		gaucheFdAdresse.add(villeChp, new FormData("95%"));
1793
		gaucheFdAdresse.add(villeChp, new FormData("95%"));
1790
		
1794
		
1791
		ModelType modelTypesPays = new ModelType();
1795
		ModelType modelTypesPays = new ModelType();
1792
		modelTypesPays.setRoot("valeurs");
1796
		modelTypesPays.setRoot("valeurs");
1793
		modelTypesPays.setTotalName("nbElements");
1797
		modelTypesPays.setTotalName("nbElements");
1794
		modelTypesPays.addField("cmlv_nom");
1798
		modelTypesPays.addField("cmlv_nom");
1795
		modelTypesPays.addField("cmlv_id_valeur");
1799
		modelTypesPays.addField("cmlv_id_valeur");
1796
		modelTypesPays.addField("cmlv_abreviation");
1800
		modelTypesPays.addField("cmlv_abreviation");
1797
		modelTypesPays.addField("cmlv_description");
1801
		modelTypesPays.addField("cmlv_description");
1798
		
1802
		
1799
		String displayNamePays = "cmlv_nom";
1803
		String displayNamePays = "cmlv_nom";
1800
		String nomListeTypes = "pays";
1804
		String nomListeTypes = "pays";
1801
		ProxyValeur<ModelData> proxyPays = new ProxyValeur<ModelData>(nomListeTypes, sequenceur);
1805
		ProxyValeur<ModelData> proxyPays = new ProxyValeur<ModelData>(nomListeTypes, null);
1802
		
1806
		
1803
		comboPays = new ChampComboBoxRechercheTempsReelPaginable(proxyPays, modelTypesPays, displayNamePays);
1807
		comboPays = new ChampComboBoxRechercheTempsReelPaginable(proxyPays, modelTypesPays, displayNamePays);
1804
		comboPays.setWidth(100,500);
1808
		comboPays.setWidth(100,500);
1805
		comboPays.getCombo().setTabIndex(tabIndex++);
1809
		comboPays.getCombo().setTabIndex(tabIndex++);
1806
		comboPays.getCombo().setFieldLabel("Pays");
1810
		comboPays.getCombo().setFieldLabel("Pays");
1807
		comboPays.getCombo().setForceSelection(true);
1811
		comboPays.getCombo().setForceSelection(true);
1808
		comboPays.getCombo().setTemplate(getTemplatePays());
1812
		comboPays.getCombo().setTemplate(getTemplatePays());
1809
		
1813
		
1810
		SelectionChangedListener<ModelData> selectionChange = new SelectionChangedListener<ModelData>() {
1814
		SelectionChangedListener<ModelData> selectionChange = new SelectionChangedListener<ModelData>() {
1811
			public void selectionChanged(SelectionChangedEvent se) {
1815
			public void selectionChanged(SelectionChangedEvent se) {
1812
				// Rafraichir avec le pays sélectionné
1816
				// Rafraichir avec le pays sélectionné
1813
				comboRegion.clear();
1817
				comboRegion.clear();
1814
				obtenirListeRegionParPays((new Valeur(se.getSelectedItem())).getAbreviation().toString());
1818
				obtenirListeRegionParPays((new Valeur(se.getSelectedItem())).getAbreviation().toString());
1815
			}
1819
			}
1816
		};
1820
		};
1817
		comboPays.getCombo().addSelectionChangedListener(selectionChange);
1821
		comboPays.getCombo().addSelectionChangedListener(selectionChange);
1818
		
1822
		
1819
		droiteFdAdresse.add(comboPays, new FormData("95%"));
1823
		droiteFdAdresse.add(comboPays, new FormData("95%"));
1820
		
1824
		
1821
		magazinRegion = new ListStore<Valeur>();
1825
		magazinRegion = new ListStore<Valeur>();
1822
		comboRegion = new ComboBox<Valeur>();
1826
		comboRegion = new ComboBox<Valeur>();
1823
		comboRegion.setTabIndex(tabIndex++);
1827
		comboRegion.setTabIndex(tabIndex++);
1824
		comboRegion.setFieldLabel("Région");
1828
		comboRegion.setFieldLabel("Région");
1825
		comboRegion.setEmptyText("Sélectionner une région...");
1829
		comboRegion.setEmptyText("Sélectionner une région...");
1826
		comboRegion.setDisplayField("nom");
1830
		comboRegion.setDisplayField("nom");
1827
		comboRegion.setTypeAhead(true);
1831
		comboRegion.setTypeAhead(true);
1828
		comboRegion.setTriggerAction(TriggerAction.ALL);
1832
		comboRegion.setTriggerAction(TriggerAction.ALL);
1829
		comboRegion.setStore(magazinRegion);
1833
		comboRegion.setStore(magazinRegion);
1830
		droiteFdAdresse.add(comboRegion, new FormData("95%"));
1834
		droiteFdAdresse.add(comboRegion, new FormData("95%"));
1831
 
1835
 
1832
		
1836
		
1833
		latitudeChp = new TextField<String>();
1837
		latitudeChp = new TextField<String>();
1834
		latitudeChp.setRegex(Pattern.latitude);
1838
		latitudeChp.setRegex(Pattern.latitude);
1835
		latitudeChp.setToolTip("Format : nombre décimal positif ou négatif de 0 à 90.");
1839
		latitudeChp.setToolTip("Format : nombre décimal positif ou négatif de 0 à 90.");
1836
		latitudeChp.getMessages().setRegexText("La valeur saisie n'est pas une latitude valide. Exemples de latitude : -45,302010 ou 45.252423 ou 25,16.");
1840
		latitudeChp.getMessages().setRegexText("La valeur saisie n'est pas une latitude valide. Exemples de latitude : -45,302010 ou 45.252423 ou 25,16.");
1837
		latitudeChp.setTabIndex(tabIndex++);
1841
		latitudeChp.setTabIndex(tabIndex++);
1838
		latitudeChp.setFieldLabel("Latitude (Nord)");
1842
		latitudeChp.setFieldLabel("Latitude (Nord)");
1839
		gaucheFdAdresse.add(latitudeChp, new FormData("95%"));
1843
		gaucheFdAdresse.add(latitudeChp, new FormData("95%"));
1840
		
1844
		
1841
		longitudeChp = new TextField<String>();
1845
		longitudeChp = new TextField<String>();
1842
		longitudeChp.setRegex(Pattern.longitude);
1846
		longitudeChp.setRegex(Pattern.longitude);
1843
		longitudeChp.setToolTip("Format : nombre décimal positif ou négatif de 0 à 180.");
1847
		longitudeChp.setToolTip("Format : nombre décimal positif ou négatif de 0 à 180.");
1844
		longitudeChp.getMessages().setRegexText("La valeur saisie n'est pas une longitude valide. Exemples de longitude : -150,302010 ou 150.252423 ou 25,16.");
1848
		longitudeChp.getMessages().setRegexText("La valeur saisie n'est pas une longitude valide. Exemples de longitude : -150,302010 ou 150.252423 ou 25,16.");
1845
		longitudeChp.setTabIndex(tabIndex++);
1849
		longitudeChp.setTabIndex(tabIndex++);
1846
		longitudeChp.setFieldLabel("Longitude (Est)");
1850
		longitudeChp.setFieldLabel("Longitude (Est)");
1847
		droiteFdAdresse.add(longitudeChp, new FormData("95%"));
1851
		droiteFdAdresse.add(longitudeChp, new FormData("95%"));
1848
		
1852
		
1849
		principalFdAdresse.add(gaucheFdAdresse, new ColumnData(.5));
1853
		principalFdAdresse.add(gaucheFdAdresse, new ColumnData(.5));
1850
		principalFdAdresse.add(droiteFdAdresse, new ColumnData(.5));
1854
		principalFdAdresse.add(droiteFdAdresse, new ColumnData(.5));
1851
		fieldSetAdresse.add(principalFdAdresse);
1855
		fieldSetAdresse.add(principalFdAdresse);
1852
		
1856
		
1853
		identificationOnglet.add(fieldSetAdresse);
1857
		identificationOnglet.add(fieldSetAdresse);
1854
		
1858
		
1855
		//+-----------------------------------------------------------------------------------------------------------+
1859
		//+-----------------------------------------------------------------------------------------------------------+
1856
		// Fieldset TÉLÉPHONE et EMAIL
1860
		// Fieldset TÉLÉPHONE et EMAIL
1857
		LayoutContainer principalFdTelMail = new LayoutContainer();  
1861
		LayoutContainer principalFdTelMail = new LayoutContainer();  
1858
		principalFdTelMail.setLayout(new ColumnLayout());
1862
		principalFdTelMail.setLayout(new ColumnLayout());
1859
		principalFdTelMail.setSize(700, -1);
1863
		principalFdTelMail.setSize(700, -1);
1860
		
1864
		
1861
		LayoutContainer gaucheFdTelMail = new LayoutContainer();
1865
		LayoutContainer gaucheFdTelMail = new LayoutContainer();
1862
		gaucheFdTelMail.setLayout(creerFormLayout(60, LabelAlign.LEFT));
1866
		gaucheFdTelMail.setLayout(creerFormLayout(60, LabelAlign.LEFT));
1863
		
1867
		
1864
		LayoutContainer droiteFdTelMail = new LayoutContainer();
1868
		LayoutContainer droiteFdTelMail = new LayoutContainer();
1865
		droiteFdTelMail.setLayout(creerFormLayout(60, LabelAlign.LEFT));
1869
		droiteFdTelMail.setLayout(creerFormLayout(60, LabelAlign.LEFT));
1866
		
1870
		
1867
		FieldSet fieldSetTelMail = new FieldSet();
1871
		FieldSet fieldSetTelMail = new FieldSet();
1868
		fieldSetTelMail.setHeading("Communication");
1872
		fieldSetTelMail.setHeading("Communication");
1869
		fieldSetTelMail.setCollapsible(true);
1873
		fieldSetTelMail.setCollapsible(true);
1870
		
1874
		
1871
		fieldSetTelMail.setLayout(creerFormLayout(null, LabelAlign.LEFT));
1875
		fieldSetTelMail.setLayout(creerFormLayout(null, LabelAlign.LEFT));
1872
				
1876
				
1873
		telChp = new TextField<String>();
1877
		telChp = new TextField<String>();
1874
		telChp.setTabIndex(tabIndex++);
1878
		telChp.setTabIndex(tabIndex++);
1875
		telChp.setFieldLabel("Téléphone fixe");
1879
		telChp.setFieldLabel("Téléphone fixe");
1876
		gaucheFdTelMail.add(telChp, new FormData("95%"));
1880
		gaucheFdTelMail.add(telChp, new FormData("95%"));
1877
		
1881
		
1878
		faxChp = new TextField<String>();
1882
		faxChp = new TextField<String>();
1879
		faxChp.setTabIndex(tabIndex++);
1883
		faxChp.setTabIndex(tabIndex++);
1880
		faxChp.setFieldLabel("Fax");
1884
		faxChp.setFieldLabel("Fax");
1881
		droiteFdTelMail.add(faxChp, new FormData("95%"));
1885
		droiteFdTelMail.add(faxChp, new FormData("95%"));
1882
		
1886
		
1883
		emailChp = new TextField<String>();
1887
		emailChp = new TextField<String>();
1884
		emailChp.setTabIndex(tabIndex++);
1888
		emailChp.setTabIndex(tabIndex++);
1885
		emailChp.setFieldLabel("Courriel");
1889
		emailChp.setFieldLabel("Courriel");
1886
		emailChp.setToolTip("Saisir le courriel de l'organisation, pas de courriel individuel. Ex. : accueil@organisation.org");
1890
		emailChp.setToolTip("Saisir le courriel de l'organisation, pas de courriel individuel. Ex. : accueil@organisation.org");
1887
		gaucheFdTelMail.add(emailChp, new FormData("95%"));
1891
		gaucheFdTelMail.add(emailChp, new FormData("95%"));
1888
		
1892
		
1889
		urlChp = new TextField<String>();
1893
		urlChp = new TextField<String>();
1890
		urlChp.setTabIndex(tabIndex++);
1894
		urlChp.setTabIndex(tabIndex++);
1891
		urlChp.setFieldLabel("Site web");
1895
		urlChp.setFieldLabel("Site web");
1892
		droiteFdTelMail.add(urlChp, new FormData("95%"));
1896
		droiteFdTelMail.add(urlChp, new FormData("95%"));
1893
		
1897
		
1894
		principalFdTelMail.add(gaucheFdTelMail, new ColumnData(.5));
1898
		principalFdTelMail.add(gaucheFdTelMail, new ColumnData(.5));
1895
		principalFdTelMail.add(droiteFdTelMail, new ColumnData(.5));
1899
		principalFdTelMail.add(droiteFdTelMail, new ColumnData(.5));
1896
		fieldSetTelMail.add(principalFdTelMail);
1900
		fieldSetTelMail.add(principalFdTelMail);
1897
		
1901
		
1898
		identificationOnglet.add(fieldSetTelMail);
1902
		identificationOnglet.add(fieldSetTelMail);
1899
		
1903
		
1900
		return identificationOnglet;
1904
		return identificationOnglet;
1901
	}
1905
	}
1902
	
1906
	
1903
	public void obtenirListeRegionParPays(String strPays)	{
1907
	public void obtenirListeRegionParPays(String strPays)	{
1904
		mediateur.obtenirListeRegionsEtRafraichir(this, "region", strPays);
1908
		mediateur.obtenirListeRegionsEtRafraichir(this, "region", strPays);
1905
	}
1909
	}
1906
	
1910
	
1907
	private void mettreAJourRegion()	{
1911
	private void mettreAJourRegion()	{
1908
		//Met à jour la combo box en sélectionnant la valeur enregistrée pour la personne
1912
		//Met à jour la combo box en sélectionnant la valeur enregistrée pour la personne
1909
		if (identification.get("ce_truk_region") != null && comboRegion.getStore().getCount() > 0)	{
1913
		if (identification.get("ce_truk_region") != null && comboRegion.getStore().getCount() > 0)	{
1910
			Valeur valeurRegion = comboRegion.getStore().findModel("id_valeur", identification.get("ce_truk_region"));
1914
			Valeur valeurRegion = comboRegion.getStore().findModel("id_valeur", identification.get("ce_truk_region"));
1911
			if (valeurRegion!=null)	{
1915
			if (valeurRegion!=null)	{
1912
				comboRegion.setValue(valeurRegion);
1916
				comboRegion.setValue(valeurRegion);
1913
			} else if (identification.get("ce_truk_region").toString().startsWith("AUTRE##")) {
1917
			} else if (identification.get("ce_truk_region").toString().startsWith("AUTRE##")) {
1914
				comboRegion.setRawValue(identification.get("ce_truk_region").toString().replaceFirst("^AUTRE##", ""));
1918
				comboRegion.setRawValue(identification.get("ce_truk_region").toString().replaceFirst("^AUTRE##", ""));
1915
			}
1919
			}
1916
		}
1920
		}
1917
	}
1921
	}
1918
	
1922
	
1919
	private native String getTemplatePays() /*-{ 
1923
	private native String getTemplatePays() /*-{ 
1920
		return  [ 
1924
		return  [ 
1921
		'<tpl for=".">', 
1925
		'<tpl for=".">', 
1922
		'<div class="x-combo-list-item">{cmlv_nom} ({cmlv_abreviation})</div>', 
1926
		'<div class="x-combo-list-item">{cmlv_nom} ({cmlv_abreviation})</div>', 
1923
		'</tpl>' 
1927
		'</tpl>' 
1924
		].join(""); 
1928
		].join(""); 
1925
		}-*/;
1929
		}-*/;
1926
	
1930
	
1927
	private void peuplerCasesACocher(String donnees, CheckBoxGroup groupeCac, TextField<String> champAutre) {
1931
	private void peuplerCasesACocher(String donnees, CheckBoxGroup groupeCac, TextField<String> champAutre) {
1928
		String[] valeurs = donnees.split(";;");
1932
		String[] valeurs = donnees.split(";;");
1929
		for (int i = 0; i < valeurs.length; i++) {
1933
		for (int i = 0; i < valeurs.length; i++) {
1930
			if (valeurs[i].startsWith("AUTRE##")) {
1934
			if (valeurs[i].startsWith("AUTRE##")) {
1931
				champAutre.setValue(valeurs[i].replaceFirst("^AUTRE##", ""));
1935
				champAutre.setValue(valeurs[i].replaceFirst("^AUTRE##", ""));
1932
			} else {
1936
			} else {
1933
				//TODO : check : List<CheckBox> cases = groupeCac.getAll();
1937
				//TODO : check : List<CheckBox> cases = groupeCac.getAll();
1934
				List<Field<?>> cases = groupeCac.getAll();
1938
				List<Field<?>> cases = groupeCac.getAll();
1935
				for (int j = 0; j < cases.size(); j++) {
1939
				for (int j = 0; j < cases.size(); j++) {
1936
					if (cases.get(j).getId().equals("val-"+valeurs[i])) {
1940
					if (cases.get(j).getId().equals("val-"+valeurs[i])) {
1937
						((CheckBox) cases.get(j)).setValue(true);
1941
						((CheckBox) cases.get(j)).setValue(true);
1938
					}
1942
					}
1939
				}
1943
				}
1940
			}
1944
			}
1941
		}
1945
		}
1942
	}
1946
	}
1943
	
1947
	
1944
	private void peuplerBoutonsRadio(String valeur, RadioGroup groupeBr) {
1948
	private void peuplerBoutonsRadio(String valeur, RadioGroup groupeBr) {
1945
		//List<Radio> boutons = groupeBr.getAll();
1949
		//List<Radio> boutons = groupeBr.getAll();
1946
		List<Field<?>> boutons = groupeBr.getAll();
1950
		List<Field<?>> boutons = groupeBr.getAll();
1947
		String id = valeur+"_"+groupeBr.getName().replace("_grp", "");
1951
		String id = valeur+"_"+groupeBr.getName().replace("_grp", "");
1948
		for (int i = 0; i < boutons.size(); i++) {
1952
		for (int i = 0; i < boutons.size(); i++) {
1949
			if (boutons.get(i).getId().equals(id)) {
1953
			if (boutons.get(i).getId().equals(id)) {
1950
				((Radio) boutons.get(i)).setValue(true);
1954
				((Radio) boutons.get(i)).setValue(true);
1951
			}
1955
			}
1952
		}
1956
		}
1953
	}
1957
	}
1954
	
1958
	
1955
	private String creerChaineDenormalisee(List<CheckBox> liste) {
1959
	private String creerChaineDenormalisee(List<CheckBox> liste) {
1956
		String identifiants = "";
1960
		String identifiants = "";
1957
		if (liste != null) {
1961
		if (liste != null) {
1958
			int taille = liste.size();
1962
			int taille = liste.size();
1959
			for (int i = 0; i < taille; i++) {
1963
			for (int i = 0; i < taille; i++) {
1960
				CheckBox cac = liste.get(i);
1964
				CheckBox cac = liste.get(i);
1961
				if (cac.isEnabled()) {
1965
				if (cac.isEnabled()) {
1962
					identifiants = identifiants.concat(";;"+cac.getData("id"));
1966
					identifiants = identifiants.concat(";;"+cac.getData("id"));
1963
				}
1967
				}
1964
			}
1968
			}
1965
			identifiants.replaceFirst("^;;", "");
1969
			identifiants.replaceFirst("^;;", "");
1966
		}
1970
		}
1967
		return identifiants;
1971
		return identifiants;
1968
	}
1972
	}
1969
	
1973
	
1970
	public void afficherChampSupplementaire(Radio radioBtn) {
1974
	public void afficherChampSupplementaire(Radio radioBtn) {
1971
		//GWT.log("Nom btn : "+radioBtn.getName()+" - Nom group : "+radioBtn.getGroup().getName(), null);
1975
		//GWT.log("Nom btn : "+radioBtn.getName()+" - Nom group : "+radioBtn.getGroup().getName(), null);
1972
		// Valeur du bouton radio déclenchant l'affichage des composants cachés
1976
		// Valeur du bouton radio déclenchant l'affichage des composants cachés
1973
		String valeurPourAfficher = "oui";
1977
		String valeurPourAfficher = "oui";
1974
		
1978
		
1975
		// Construction de la liste des composants à afficher/cacher
1979
		// Construction de la liste des composants à afficher/cacher
1976
		String radioGroupeNom = radioBtn.getGroup().getName();
1980
		String radioGroupeNom = radioBtn.getGroup().getName();
1977
		ArrayList<Object> composants = new ArrayList<Object>();		
1981
		ArrayList<Object> composants = new ArrayList<Object>();		
1978
		if (radioGroupeNom.equals("action_mark_grp")) {
1982
		if (radioGroupeNom.equals("action_mark_grp")) {
1979
			composants.add(actionTrukCp);
1983
			composants.add(actionTrukCp);
1980
		} else if (radioGroupeNom.equals("future_action_mark_grp")) {
1984
		} else if (radioGroupeNom.equals("future_action_mark_grp")) {
1981
			composants.add(futureActionChp);
1985
			composants.add(futureActionChp);
1982
		} else if (radioGroupeNom.equals("sans_motif_acces_mark_grp")) {
1986
		} else if (radioGroupeNom.equals("sans_motif_acces_mark_grp")) {
1983
			composants.add(sansMotifAccesChp);
1987
			composants.add(sansMotifAccesChp);
1984
		} else if (radioGroupeNom.equals("avec_motif_acces_mark_grp")) {
1988
		} else if (radioGroupeNom.equals("avec_motif_acces_mark_grp")) {
1985
			composants.add(avecMotifAccesChp);
1989
			composants.add(avecMotifAccesChp);
1986
		} else if (radioGroupeNom.equals("recherche_mark_grp")) {
1990
		} else if (radioGroupeNom.equals("recherche_mark_grp")) {
1987
			composants.add(provenanceRechercheTrukCp);
1991
			composants.add(provenanceRechercheTrukCp);
1988
			composants.add(typeRechercheTrukCp);
1992
			composants.add(typeRechercheTrukCp);
1989
		} else if (radioGroupeNom.equals("formation_mark_grp")) {
1993
		} else if (radioGroupeNom.equals("formation_mark_grp")) {
1990
			composants.add(formationChp);
1994
			composants.add(formationChp);
1991
		} else if (radioGroupeNom.equals("collection_commune_mark_grp")) {
1995
		} else if (radioGroupeNom.equals("collection_commune_mark_grp")) {
1992
			composants.add(collectionAutreTrukCp);
1996
			composants.add(collectionAutreTrukCp);
1993
		} else if (radioGroupeNom.equals("restauration_mark_grp")) {
1997
		} else if (radioGroupeNom.equals("restauration_mark_grp")) {
1994
			composants.add(opRestauTrukCp);
1998
			composants.add(opRestauTrukCp);
1995
		} else if (radioGroupeNom.equals("traitement_mark_grp")) {
1999
		} else if (radioGroupeNom.equals("traitement_mark_grp")) {
1996
			composants.add(traitementTrukCp);
2000
			composants.add(traitementTrukCp);
1997
		} else if (radioGroupeNom.equals("echantillon_acquisition_mark_grp")) {
2001
		} else if (radioGroupeNom.equals("echantillon_acquisition_mark_grp")) {
1998
			composants.add(traitementAcquisitionMarkRGrpChp);
2002
			composants.add(traitementAcquisitionMarkRGrpChp);
1999
		} else if (radioGroupeNom.equals("traitement_acquisition_mark_grp")) {
2003
		} else if (radioGroupeNom.equals("traitement_acquisition_mark_grp")) {
2000
			composants.add(traitementAcquisitionMarkLabel);
2004
			composants.add(traitementAcquisitionMarkLabel);
2001
			composants.add(poisonTraitementTrukCp);
2005
			composants.add(poisonTraitementTrukCp);
2002
			composants.add(insecteTraitementTrukCp);
2006
			composants.add(insecteTraitementTrukCp);
2003
		} else if (radioGroupeNom.equals("materiel_conservation_ce_grp")) {
2007
		} else if (radioGroupeNom.equals("materiel_conservation_ce_grp")) {
2004
			composants.add(autreMaterielTrukCp);
2008
			composants.add(autreMaterielTrukCp);
2005
			valeurPourAfficher = "non";
2009
			valeurPourAfficher = "non";
2006
		}
2010
		}
2007
		
2011
		
2008
		// Nous affichons/cachons les composant de la liste
2012
		// Nous affichons/cachons les composant de la liste
2009
		final int nbreComposants = composants.size();
2013
		final int nbreComposants = composants.size();
2010
		//GWT.log("Id : "+radioBtn.getId()+" - Class : "+radioBtn.getClass().toString()+"- Taille : "+tailleMax, null);
2014
		//GWT.log("Id : "+radioBtn.getId()+" - Class : "+radioBtn.getClass().toString()+"- Taille : "+tailleMax, null);
2011
		//Window.alert("Radio grp nom : "+radioGroupeNom+" - Id btn : "+radioBtn.getId()+" - Class : "+radioBtn.getClass().toString()+"- Taille : "+tailleMax);
2015
		//Window.alert("Radio grp nom : "+radioGroupeNom+" - Id btn : "+radioBtn.getId()+" - Class : "+radioBtn.getClass().toString()+"- Taille : "+tailleMax);
2012
		for (int i = 0; i < nbreComposants; i++) {
2016
		for (int i = 0; i < nbreComposants; i++) {
2013
			// En fonction du type de bouton cliquer, on affiche ou cache les champs
2017
			// En fonction du type de bouton cliquer, on affiche ou cache les champs
2014
			String type = radioBtn.getBoxLabel().toLowerCase();
2018
			String type = radioBtn.getBoxLabel().toLowerCase();
2015
			//GWT.log(type, null);
2019
			//GWT.log(type, null);
2016
			if (radioBtn.getValue() == true) {
2020
			if (radioBtn.getValue() == true) {
2017
				if (type.equals(valeurPourAfficher)) {
2021
				if (type.equals(valeurPourAfficher)) {
2018
					((Component) composants.get(i)).show();
2022
					((Component) composants.get(i)).show();
2019
				} else {
2023
				} else {
2020
					((Component) composants.get(i)).hide();
2024
					((Component) composants.get(i)).hide();
2021
				}
2025
				}
2022
			}
2026
			}
2023
			// Si on a à faire à un ContentPanel, on l'actualise pour déclencher l'affichage
2027
			// Si on a à faire à un ContentPanel, on l'actualise pour déclencher l'affichage
2024
			if (composants.get(i) instanceof ContentPanel) {
2028
			if (composants.get(i) instanceof ContentPanel) {
2025
				((ContentPanel) composants.get(i)).layout();
2029
				((ContentPanel) composants.get(i)).layout();
2026
			}
2030
			}
2027
		}
2031
		}
2028
		
2032
		
2029
	}
2033
	}
2030
	
2034
	
2031
	public void rafraichir(Object nouvellesDonnees) {
2035
	public void rafraichir(Object nouvellesDonnees) {
2032
		
2036
		
2033
		
2037
		
2034
		try {
2038
		try {
2035
			if (nouvellesDonnees instanceof Information) {
2039
			if (nouvellesDonnees instanceof Information) {
2036
				Information info = (Information) nouvellesDonnees;
2040
				Information info = (Information) nouvellesDonnees;
2037
				rafraichirInformation(info);
2041
				rafraichirInformation(info);
2038
			} else if (nouvellesDonnees instanceof ValeurListe) {
2042
			} else if (nouvellesDonnees instanceof ValeurListe) {
2039
				ValeurListe listeValeurs = (ValeurListe) nouvellesDonnees;
2043
				ValeurListe listeValeurs = (ValeurListe) nouvellesDonnees;
2040
				rafraichirValeurListe(listeValeurs);
2044
				rafraichirValeurListe(listeValeurs);
2041
			} else {
2045
			} else {
2042
				GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
2046
				GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
2043
			}
2047
			}
2044
		} catch (Exception e) {
2048
		} catch (Exception e) {
2045
			GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), e);
2049
			GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), e);
2046
		}
2050
		}
2047
		
2051
		
2048
		controlerFermeture();
2052
		controlerFermeture();
2049
	}
2053
	}
2050
	
2054
	
2051
	public void rafraichirInformation(Information info) {
2055
	public void rafraichirInformation(Information info) {
2052
		if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
2056
		if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
2053
			GWT.log("MESSAGES:\n"+info.getMessages().toString(), null);
2057
			GWT.log("MESSAGES:\n"+info.getMessages().toString(), null);
2054
		}
2058
		}
2055
 
2059
 
2056
		
2060
		
2057
		if (info.getType().equals("modif_structure")) {
2061
		if (info.getType().equals("modif_structure")) {
2058
			InfoLogger.display("Modification d'une institution", info.toString());
2062
			InfoLogger.display("Modification d'une institution", info.toString());
2059
		} else if (info.getType().equals("ajout_structure")) {
2063
		} else if (info.getType().equals("ajout_structure")) {
2060
			if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
2064
			if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
2061
				String structureId = (String) info.getDonnee(0);
2065
				String structureId = (String) info.getDonnee(0);
2062
				InfoLogger.display("Ajout d'une Institution", "L'intitution '"+structureId+"' a bien été ajoutée");
2066
				InfoLogger.display("Ajout d'une Institution", "L'intitution '"+structureId+"' a bien été ajoutée");
2063
			
2067
			
2064
				// Suite à la récupération de l'id de l'institution nouvellement ajoutée nous ajoutons le personnel
2068
				// Suite à la récupération de l'id de l'institution nouvellement ajoutée nous ajoutons le personnel
2065
				mediateur.ajouterStructureAPersonne(this, structureId, personnelAjoute);
2069
				mediateur.ajouterStructureAPersonne(this, structureId, personnelAjoute);
2066
			} else {
2070
			} else {
2067
				InfoLogger.display("Ajout d'une Institution", info.toString());
2071
				InfoLogger.display("Ajout d'une Institution", info.toString());
2068
			}
2072
			}
2069
		} else if (info.getType().equals("modif_structure_a_personne")) {
2073
		} else if (info.getType().equals("modif_structure_a_personne")) {
2070
			InfoLogger.display("Modification du Personnel", info.toString());
2074
			InfoLogger.display("Modification du Personnel", info.toString());
2071
			GWT.log("Decompte:"+decompteRafraichissementPersonnel, null);
-
 
2072
			testerLancementRafraichirPersonnel();
2075
			testerLancementRafraichirPersonnel();
2073
		} else if (info.getType().equals("suppression_structure_a_personne")) {
2076
		} else if (info.getType().equals("suppression_structure_a_personne")) {
2074
			InfoLogger.display("Suppression du Personnel", info.toString());
2077
			InfoLogger.display("Suppression du Personnel", info.toString());
2075
			GWT.log("Decompte:"+decompteRafraichissementPersonnel, null);
-
 
2076
			testerLancementRafraichirPersonnel();
2078
			testerLancementRafraichirPersonnel();
2077
		} else if (info.getType().equals("ajout_structure_a_personne")) {
2079
		} else if (info.getType().equals("ajout_structure_a_personne")) {
2078
			InfoLogger.display("Ajout du Personnel", info.toString());
2080
			InfoLogger.display("Ajout du Personnel", info.toString());
2079
			GWT.log("Decompte:"+decompteRafraichissementPersonnel, null);
-
 
2080
			testerLancementRafraichirPersonnel();
2081
			testerLancementRafraichirPersonnel();
2081
		} else if (info.getType().equals("selection_structure")) {
2082
		} else if (info.getType().equals("selection_structure")) {
2082
			InfoLogger.display("Modification d'une institution", info.toString());
2083
			InfoLogger.display("Modification d'une institution", info.toString());
2083
			String titre = i18nC.titreModifFormStructurePanneau();
2084
			String titre = i18nC.titreModifFormStructurePanneau();
2084
			if (info.getDonnee(0) != null) {
2085
			if (info.getDonnee(0) != null) {
2085
				identification = (Structure) info.getDonnee(0);
2086
				identification = (Structure) info.getDonnee(0);
2086
				if (onglets.getSelectedItem().equals(identificationOnglet)) {
2087
				if (onglets.getSelectedItem().equals(identificationOnglet)) {
2087
					peuplerStructureIdentification();
2088
					peuplerStructureIdentification();
2088
				}
2089
				}
2089
				// Composition du titre
2090
				// Composition du titre
2090
				titre += " - ID : "+identification.getId();
2091
				titre += " - ID : "+identification.getId();
2091
			}
2092
			}
2092
			if (info.getDonnee(1) != null) {
2093
			if (info.getDonnee(1) != null) {
2093
				conservation = (StructureConservation) info.getDonnee(1);
2094
				conservation = (StructureConservation) info.getDonnee(1);
2094
				if (onglets.getSelectedItem().equals(conservationOnglet)) {
2095
				if (onglets.getSelectedItem().equals(conservationOnglet)) {
2095
					peuplerStructureConservation();
2096
					peuplerStructureConservation();
2096
				}
2097
				}
2097
			}
2098
			}
2098
			if (info.getDonnee(2) != null) {
2099
			if (info.getDonnee(2) != null) {
2099
				valorisation = (StructureValorisation) info.getDonnee(2);
2100
				valorisation = (StructureValorisation) info.getDonnee(2);
2100
				if (valorisation != null) {
2101
				if (valorisation != null) {
2101
					if (onglets.getSelectedItem().equals(valorisationOnglet)) {
2102
					if (onglets.getSelectedItem().equals(valorisationOnglet)) {
2102
						peuplerStructureValorisation();
2103
						peuplerStructureValorisation();
2103
					}
2104
					}
2104
				}
2105
				}
2105
			}
2106
			}
2106
		} else if (info.getType().equals("liste_structure_a_personne")) {
2107
		} else if (info.getType().equals("liste_structure_a_personne")) {
2107
			if (info.getDonnee(0) != null) {
2108
			if (info.getDonnee(0) != null) {
2108
				personnel = (StructureAPersonneListe) info.getDonnee(0);
2109
				personnel = (StructureAPersonneListe) info.getDonnee(0);
2109
				
2110
				
2110
				peuplerStructurePersonnel();
2111
				peuplerStructurePersonnel();
2111
				
2112
				
2112
				personnelOnglet.layout();
2113
				personnelOnglet.layout();
2113
				InfoLogger.display("Chargement du Personnel", "ok");
2114
				InfoLogger.display("Chargement du Personnel", "ok");
2114
 
2115
 
2115
				// Remise à zéro des modification dans la liste du personnel
2116
				// Remise à zéro des modification dans la liste du personnel
2116
				personnelModifie = new StructureAPersonneListe();
2117
				personnelModifie = new StructureAPersonneListe();
2117
				personnelAjoute = new StructureAPersonneListe();
2118
				personnelAjoute = new StructureAPersonneListe();
2118
				personnelSupprime = new StructureAPersonneListe();
2119
				personnelSupprime = new StructureAPersonneListe();
2119
			}
2120
			}
2120
		}
2121
		}
2121
	}
2122
	}
2122
	
2123
	
2123
	public void rafraichirValeurListe(ValeurListe listeValeurs) {
2124
	public void rafraichirValeurListe(ValeurListe listeValeurs) {
2124
		List<Valeur> liste = listeValeurs.toList();
2125
		List<Valeur> liste = listeValeurs.toList();
2125
 
2126
 
2126
		// Test pour savoir si la liste contient des éléments
2127
		// Test pour savoir si la liste contient des éléments
2127
		if (liste.size() > 0) {
2128
		if (liste.size() > 0) {
2128
			if (listeValeurs.getId().equals(config.getListeId("stpr"))) {
2129
			if (listeValeurs.getId().equals(config.getListeId("stpr"))) {
2129
				magazinLstpr.removeAll();
2130
				magazinLstpr.removeAll();
2130
				magazinLstpr.add(liste);
2131
				magazinLstpr.add(liste);
2131
				comboLstpr.setStore(magazinLstpr);
2132
				comboLstpr.setStore(magazinLstpr);
2132
			}
2133
			}
2133
			if (listeValeurs.getId().equals(config.getListeId("stpu"))) {
2134
			if (listeValeurs.getId().equals(config.getListeId("stpu"))) {
2134
				magazinLstpu.removeAll();
2135
				magazinLstpu.removeAll();
2135
				magazinLstpu.add(liste);
2136
				magazinLstpu.add(liste);
2136
				comboLstpu.setStore(magazinLstpu);
2137
				comboLstpu.setStore(magazinLstpu);
2137
			}
2138
			}
2138
			if (listeValeurs.getId().equals(config.getListeId("statut"))) {
2139
			if (listeValeurs.getId().equals(config.getListeId("statut"))) {
2139
				magazinLiStatut.removeAll();
2140
				magazinLiStatut.removeAll();
2140
				magazinLiStatut.add(liste);
2141
				magazinLiStatut.add(liste);
2141
				comboLiStatut.setStore(magazinLiStatut);
2142
				comboLiStatut.setStore(magazinLiStatut);
2142
			}
2143
			}
2143
			if (listeValeurs.getId().equals(config.getListeId("fonction"))) {
2144
			if (listeValeurs.getId().equals(config.getListeId("fonction"))) {
2144
				// FIXME : le store ne contient pas tout le temps les données, chose étrange.
2145
				// FIXME : le store ne contient pas tout le temps les données, chose étrange.
2145
				// On stocke donc les données dans une variables de la classe pour recharger le store si besoin.
2146
				// On stocke donc les données dans une variables de la classe pour recharger le store si besoin.
2146
				fonctionsListe = liste;
2147
				fonctionsListe = liste;
2147
				fonctionsMagazin.removeAll();
2148
				fonctionsMagazin.removeAll();
2148
				fonctionsMagazin.add(liste);
2149
				fonctionsMagazin.add(liste);
2149
				fonctionsCombo.setStore(fonctionsMagazin);
2150
				fonctionsCombo.setStore(fonctionsMagazin);
2150
			}
2151
			}
2151
			
2152
			
2152
			if (listeValeurs.getId().equals(config.getListeId("region"))) {
2153
			if (listeValeurs.getId().equals(config.getListeId("region"))) {
2153
				magazinRegion.removeAll();
2154
				magazinRegion.removeAll();
2154
				magazinRegion.add(liste);
2155
				magazinRegion.add(liste);
2155
				comboRegion.setStore(magazinRegion);
2156
				comboRegion.setStore(magazinRegion);
2156
				
2157
				
2157
				mettreAJourRegion();
2158
				mettreAJourRegion();
2158
			}
2159
			}
2159
			
2160
			
2160
			
2161
			
2161
			if (listeValeurs.getId().equals(config.getListeId("localStockage"))) {
2162
			if (listeValeurs.getId().equals(config.getListeId("localStockage"))) {
2162
				localStockageAutreChp = new TextField<String>();
2163
				localStockageAutreChp = new TextField<String>();
2163
				creerChoixMultipleCac(localStockageTrukCp, localStockageTrukCacGrpChp, listeValeurs, localStockageAutreChp);
2164
				creerChoixMultipleCac(localStockageTrukCp, localStockageTrukCacGrpChp, listeValeurs, localStockageAutreChp);
2164
			}
2165
			}
2165
			if (listeValeurs.getId().equals(config.getListeId("meubleStockage"))) {
2166
			if (listeValeurs.getId().equals(config.getListeId("meubleStockage"))) {
2166
				meubleStockageAutreChp = new TextField<String>();
2167
				meubleStockageAutreChp = new TextField<String>();
2167
				creerChoixMultipleCac(meubleStockageTrukCp, meubleStockageTrukCacGrpChp, listeValeurs, meubleStockageAutreChp);
2168
				creerChoixMultipleCac(meubleStockageTrukCp, meubleStockageTrukCacGrpChp, listeValeurs, meubleStockageAutreChp);
2168
			}
2169
			}
2169
			if (listeValeurs.getId().equals(config.getListeId("parametreStockage"))) {
2170
			if (listeValeurs.getId().equals(config.getListeId("parametreStockage"))) {
2170
				parametreStockageAutreChp = new TextField<String>();
2171
				parametreStockageAutreChp = new TextField<String>();
2171
				creerChoixMultipleCac(parametreStockageTrukCp, parametreStockageTrukCacGrpChp, listeValeurs, parametreStockageAutreChp);
2172
				creerChoixMultipleCac(parametreStockageTrukCp, parametreStockageTrukCacGrpChp, listeValeurs, parametreStockageAutreChp);
2172
			}
2173
			}
2173
			if (listeValeurs.getId().equals(config.getListeId("autreCollection"))) {
2174
			if (listeValeurs.getId().equals(config.getListeId("autreCollection"))) {
2174
				if (collectionAutreTrukCp != null && collectionAutreTrukCp.getItemByItemId("collectionAutreTrukCacGrpChp") == null) {
2175
				if (collectionAutreTrukCp != null && collectionAutreTrukCp.getItemByItemId("collectionAutreTrukCacGrpChp") == null) {
2175
					collectionAutreTrukCacGrpChp.setId("collectionAutreTrukCacGrpChp");
2176
					collectionAutreTrukCacGrpChp.setId("collectionAutreTrukCacGrpChp");
2176
					collectionAutreAutreChp = new TextField<String>();
2177
					collectionAutreAutreChp = new TextField<String>();
2177
					creerChoixMultipleCac(collectionAutreTrukCp, collectionAutreTrukCacGrpChp, listeValeurs, collectionAutreAutreChp);
2178
					creerChoixMultipleCac(collectionAutreTrukCp, collectionAutreTrukCacGrpChp, listeValeurs, collectionAutreAutreChp);
2178
				}
2179
				}
2179
				if (autreCollectionTrukCp != null && autreCollectionTrukCp.getItemByItemId("autreCollectionTrukCacGrpChp") == null) {
2180
				if (autreCollectionTrukCp != null && autreCollectionTrukCp.getItemByItemId("autreCollectionTrukCacGrpChp") == null) {
2180
					autreCollectionTrukCacGrpChp.setId("autreCollectionTrukCacGrpChp");
2181
					autreCollectionTrukCacGrpChp.setId("autreCollectionTrukCacGrpChp");
2181
					autreCollectionAutreChp = new TextField<String>();
2182
					autreCollectionAutreChp = new TextField<String>();
2182
					creerChoixMultipleCac(autreCollectionTrukCp, autreCollectionTrukCacGrpChp, listeValeurs, autreCollectionAutreChp);
2183
					creerChoixMultipleCac(autreCollectionTrukCp, autreCollectionTrukCacGrpChp, listeValeurs, autreCollectionAutreChp);
2183
				}
2184
				}
2184
			}
2185
			}
2185
			if (listeValeurs.getId().equals(config.getListeId("opRestau"))) {
2186
			if (listeValeurs.getId().equals(config.getListeId("opRestau"))) {
2186
				opRestauAutreChp = new TextField<String>();
2187
				opRestauAutreChp = new TextField<String>();
2187
				creerChoixMultipleCac(opRestauTrukCp, opRestauTrukCacGrpChp, listeValeurs, opRestauAutreChp);
2188
				creerChoixMultipleCac(opRestauTrukCp, opRestauTrukCacGrpChp, listeValeurs, opRestauAutreChp);
2188
			}
2189
			}
2189
			if (listeValeurs.getId().equals(config.getListeId("onep"))) {
2190
			if (listeValeurs.getId().equals(config.getListeId("onep"))) {
2190
				creerChoixUniqueBoutonRadio(materielConservationCeRGrpChp, listeValeurs);
2191
				creerChoixUniqueBoutonRadio(materielConservationCeRGrpChp, listeValeurs);
2191
				materielConservationCp.add(materielConservationCeRGrpChp);
2192
				materielConservationCp.add(materielConservationCeRGrpChp);
2192
				materielConservationCp.layout();
2193
				materielConservationCp.layout();
2193
			}
2194
			}
2194
			if (listeValeurs.getId().equals(config.getListeId("autreMateriel"))) {
2195
			if (listeValeurs.getId().equals(config.getListeId("autreMateriel"))) {
2195
				autreMaterielAutreChp = new TextField<String>();
2196
				autreMaterielAutreChp = new TextField<String>();
2196
				creerChoixMultipleCac(autreMaterielTrukCp, autreMaterielTrukCacGrpChp, listeValeurs, autreMaterielAutreChp);
2197
				creerChoixMultipleCac(autreMaterielTrukCp, autreMaterielTrukCacGrpChp, listeValeurs, autreMaterielAutreChp);
2197
			}
2198
			}
2198
			if (listeValeurs.getId().equals(config.getListeId("poisonTraitement"))) {
2199
			if (listeValeurs.getId().equals(config.getListeId("poisonTraitement"))) {
2199
				poisonTraitementAutreChp = new TextField<String>();
2200
				poisonTraitementAutreChp = new TextField<String>();
2200
				creerChoixMultipleCac(poisonTraitementTrukCp, poisonTraitementTrukCacGrpChp, listeValeurs, poisonTraitementAutreChp);
2201
				creerChoixMultipleCac(poisonTraitementTrukCp, poisonTraitementTrukCacGrpChp, listeValeurs, poisonTraitementAutreChp);
2201
			}
2202
			}
2202
			if (listeValeurs.getId().equals(config.getListeId("insecteTraitement"))) {
2203
			if (listeValeurs.getId().equals(config.getListeId("insecteTraitement"))) {
2203
				if (traitementTrukCp != null && traitementTrukCp.getItemByItemId("traitementTrukCacGrpChp") == null) {
2204
				if (traitementTrukCp != null && traitementTrukCp.getItemByItemId("traitementTrukCacGrpChp") == null) {
2204
					traitementTrukCacGrpChp.setId("traitementTrukCacGrpChp");
2205
					traitementTrukCacGrpChp.setId("traitementTrukCacGrpChp");
2205
					traitementAutreChp = new TextField<String>();
2206
					traitementAutreChp = new TextField<String>();
2206
					creerChoixMultipleCac(traitementTrukCp, traitementTrukCacGrpChp, listeValeurs, traitementAutreChp);
2207
					creerChoixMultipleCac(traitementTrukCp, traitementTrukCacGrpChp, listeValeurs, traitementAutreChp);
2207
				}
2208
				}
2208
				if (insecteTraitementTrukCp != null && insecteTraitementTrukCp.getItemByItemId("insecteTraitementTrukCacGrpChp") == null) {
2209
				if (insecteTraitementTrukCp != null && insecteTraitementTrukCp.getItemByItemId("insecteTraitementTrukCacGrpChp") == null) {
2209
					insecteTraitementTrukCacGrpChp.setId("insecteTraitementTrukCacGrpChp");
2210
					insecteTraitementTrukCacGrpChp.setId("insecteTraitementTrukCacGrpChp");
2210
					insecteTraitementAutreChp = new TextField<String>();
2211
					insecteTraitementAutreChp = new TextField<String>();
2211
					creerChoixMultipleCac(insecteTraitementTrukCp, insecteTraitementTrukCacGrpChp, listeValeurs, insecteTraitementAutreChp);
2212
					creerChoixMultipleCac(insecteTraitementTrukCp, insecteTraitementTrukCacGrpChp, listeValeurs, insecteTraitementAutreChp);
2212
				}
2213
				}
2213
			}
2214
			}
2214
			if (listeValeurs.getId().equals(config.getListeId("actionValorisation"))) {
2215
			if (listeValeurs.getId().equals(config.getListeId("actionValorisation"))) {
2215
				actionAutreChp = new TextField<String>();
2216
				actionAutreChp = new TextField<String>();
2216
				creerChoixMultipleCac(actionTrukCp, actionTrukCacGrpChp, listeValeurs, actionAutreChp);
2217
				creerChoixMultipleCac(actionTrukCp, actionTrukCacGrpChp, listeValeurs, actionAutreChp);
2217
			}
2218
			}
2218
			if (listeValeurs.getId().equals(config.getListeId("continentEtFr"))) {
2219
			if (listeValeurs.getId().equals(config.getListeId("continentEtFr"))) {
2219
				provenanceRechercheAutreChp = new TextField<String>();
2220
				provenanceRechercheAutreChp = new TextField<String>();
2220
				creerChoixMultipleCac(provenanceRechercheTrukCp, provenanceRechercheTrukCacGrpChp, listeValeurs, provenanceRechercheAutreChp);
2221
				creerChoixMultipleCac(provenanceRechercheTrukCp, provenanceRechercheTrukCacGrpChp, listeValeurs, provenanceRechercheAutreChp);
2221
			}
2222
			}
2222
			if (listeValeurs.getId().equals(config.getListeId("typeRecherche"))) {
2223
			if (listeValeurs.getId().equals(config.getListeId("typeRecherche"))) {
2223
				typeRechercheAutreChp = new TextField<String>();
2224
				typeRechercheAutreChp = new TextField<String>();
2224
				creerChoixMultipleCac(typeRechercheTrukCp, typeRechercheTrukCacGrpChp, listeValeurs, typeRechercheAutreChp);
2225
				creerChoixMultipleCac(typeRechercheTrukCp, typeRechercheTrukCacGrpChp, listeValeurs, typeRechercheAutreChp);
2225
			}
2226
			}
2226
			//GWT.log("La liste #"+listeValeurs.getId()+" a été reçue!", null);
2227
			//GWT.log("La liste #"+listeValeurs.getId()+" a été reçue!", null);
2227
		} else {
2228
		} else {
2228
			GWT.log("La liste #"+listeValeurs.getId()+" ne contient aucune valeurs!", null);
2229
			GWT.log("La liste #"+listeValeurs.getId()+" ne contient aucune valeurs!", null);
2229
		}
2230
		}
2230
	}
2231
	}
2231
	
2232
	
2232
	private void testerLancementRafraichirPersonnel() {
2233
	private void testerLancementRafraichirPersonnel() {
2233
		
2234
		
2234
		decompteRafraichissementPersonnel--;
2235
		decompteRafraichissementPersonnel--;
2235
		if (decompteRafraichissementPersonnel == 0) {
2236
		if (decompteRafraichissementPersonnel == 0) {
2236
			// Nous rechargeons la liste du Personnel
2237
			// Nous rechargeons la liste du Personnel
2237
			rafraichirPersonnel();
2238
			rafraichirPersonnel();
2238
		}		
2239
		}		
2239
	}
2240
	}
2240
	
2241
	
2241
	private void rafraichirPersonnel() {
2242
	private void rafraichirPersonnel() {
2242
		decompteRafraichissementPersonnel = 0;
2243
		decompteRafraichissementPersonnel = 0;
2243
		if (mode.equals(MODE_MODIFIER)) {
2244
		if (mode.equals(MODE_MODIFIER)) {
2244
			initialiserGrillePersonnelEnModification();
2245
			initialiserGrillePersonnelEnModification();
2245
		} else if (mode.equals(MODE_AJOUTER)) {
2246
		} else if (mode.equals(MODE_AJOUTER)) {
2246
			initialiserGrillePersonnelEnAjout();
2247
			initialiserGrillePersonnelEnAjout();
2247
		}
2248
		}
2248
	}
2249
	}
2249
	
2250
	
2250
	private void rafraichirPersonneExistante(String nom) {
2251
	private void rafraichirPersonneExistante(String nom) {
2251
		mediateur.selectionnerPersonneParNomComplet(this, null, nom+"%", null); 
2252
		mediateur.selectionnerPersonneParNomComplet(this, null, nom+"%", null); 
2252
	}
2253
	}
2253
	
2254
	
2254
	private void ajouterMembreAGrillePersonnel(StructureAPersonne personnel) {
2255
	private void ajouterMembreAGrillePersonnel(StructureAPersonne personnel) {
2255
		grillePersonnel.stopEditing();
2256
		grillePersonnel.stopEditing();
2256
		personnelGrilleMagazin.insert(personnel, 0);
2257
		personnelGrilleMagazin.insert(personnel, 0);
2257
		grillePersonnel.startEditing(0, 0);
2258
		grillePersonnel.startEditing(0, 0);
2258
	}
2259
	}
2259
	
2260
	
2260
	private void initialiserGrillePersonnelEnAjout() {
2261
	private void initialiserGrillePersonnelEnAjout() {
2261
		personnelGrilleMagazin.removeAll();
2262
		personnelGrilleMagazin.removeAll();
2262
		StructureAPersonne conservateurDesCollections = new StructureAPersonne(StructureAPersonne.FONCTION_CONSERVATEUR, StructureAPersonne.ROLE_EQUIPE, StructureAPersonne.ETAT_AJOUTE);
2263
		StructureAPersonne conservateurDesCollections = new StructureAPersonne(StructureAPersonne.FONCTION_CONSERVATEUR, StructureAPersonne.ROLE_EQUIPE, StructureAPersonne.ETAT_AJOUTE);
2263
		ajouterMembreAGrillePersonnel(conservateurDesCollections);
2264
		ajouterMembreAGrillePersonnel(conservateurDesCollections);
2264
		StructureAPersonne directeurDuPersonnel = new StructureAPersonne(StructureAPersonne.FONCTION_DIRECTEUR, StructureAPersonne.ROLE_EQUIPE, StructureAPersonne.ETAT_AJOUTE);
2265
		StructureAPersonne directeurDuPersonnel = new StructureAPersonne(StructureAPersonne.FONCTION_DIRECTEUR, StructureAPersonne.ROLE_EQUIPE, StructureAPersonne.ETAT_AJOUTE);
2265
		ajouterMembreAGrillePersonnel(directeurDuPersonnel);
2266
		ajouterMembreAGrillePersonnel(directeurDuPersonnel);
2266
		personnelOnglet.layout();
2267
		personnelOnglet.layout();
2267
	}
2268
	}
2268
	
2269
	
2269
	private void initialiserGrillePersonnelEnModification() {		
2270
	private void initialiserGrillePersonnelEnModification() {		
2270
		mediateur.selectionnerStructureAPersonne(this, identification.getId(), StructureAPersonne.ROLE_EQUIPE, null);			
2271
		mediateur.selectionnerStructureAPersonne(this, identification.getId(), StructureAPersonne.ROLE_EQUIPE, null);			
2271
	}
2272
	}
2272
}
2273
}