Subversion Repositories eFlore/Applications.coel

Rev

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

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