1 |
package org.tela_botanica.client.vues;
|
1 |
package org.tela_botanica.client.vues;
|
2 |
|
2 |
|
3 |
import java.util.ArrayList;
|
3 |
import java.util.ArrayList;
|
4 |
import java.util.Iterator;
|
4 |
import java.util.Iterator;
|
5 |
import java.util.List;
|
5 |
import java.util.List;
|
6 |
|
6 |
|
7 |
import org.tela_botanica.client.Modele;
|
7 |
import org.tela_botanica.client.Modele;
|
8 |
import org.tela_botanica.client.RegistreId;
|
8 |
import org.tela_botanica.client.RegistreId;
|
9 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
9 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
10 |
import org.tela_botanica.client.modeles.Configuration;
|
10 |
import org.tela_botanica.client.modeles.Configuration;
|
11 |
import org.tela_botanica.client.modeles.InterneValeur;
|
11 |
import org.tela_botanica.client.modeles.InterneValeur;
|
12 |
import org.tela_botanica.client.modeles.InterneValeurListe;
|
12 |
import org.tela_botanica.client.modeles.InterneValeurListe;
|
13 |
import org.tela_botanica.client.modeles.Personne;
|
13 |
import org.tela_botanica.client.modeles.Personne;
|
14 |
import org.tela_botanica.client.modeles.Valeur;
|
14 |
import org.tela_botanica.client.modeles.Valeur;
|
15 |
import org.tela_botanica.client.modeles.ValeurListe;
|
15 |
import org.tela_botanica.client.modeles.ValeurListe;
|
16 |
|
16 |
|
17 |
import com.extjs.gxt.ui.client.Registry;
|
17 |
import com.extjs.gxt.ui.client.Registry;
|
18 |
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
18 |
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
- |
|
19 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
19 |
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
|
20 |
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
|
20 |
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
|
21 |
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
|
21 |
import com.extjs.gxt.ui.client.event.SelectionListener;
|
22 |
import com.extjs.gxt.ui.client.event.SelectionListener;
|
22 |
import com.extjs.gxt.ui.client.event.ToolBarEvent;
|
23 |
import com.extjs.gxt.ui.client.event.ToolBarEvent;
|
23 |
import com.extjs.gxt.ui.client.store.ListStore;
|
24 |
import com.extjs.gxt.ui.client.store.ListStore;
|
24 |
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
25 |
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
25 |
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
26 |
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
26 |
import com.extjs.gxt.ui.client.widget.TabItem;
|
27 |
import com.extjs.gxt.ui.client.widget.TabItem;
|
27 |
import com.extjs.gxt.ui.client.widget.TabPanel;
|
28 |
import com.extjs.gxt.ui.client.widget.TabPanel;
|
28 |
import com.extjs.gxt.ui.client.widget.button.Button;
|
29 |
import com.extjs.gxt.ui.client.widget.button.Button;
|
29 |
import com.extjs.gxt.ui.client.widget.form.CheckBox;
|
30 |
import com.extjs.gxt.ui.client.widget.form.CheckBox;
|
30 |
import com.extjs.gxt.ui.client.widget.form.CheckBoxGroup;
|
31 |
import com.extjs.gxt.ui.client.widget.form.CheckBoxGroup;
|
31 |
import com.extjs.gxt.ui.client.widget.form.ComboBox;
|
32 |
import com.extjs.gxt.ui.client.widget.form.ComboBox;
|
32 |
import com.extjs.gxt.ui.client.widget.form.DateField;
|
33 |
import com.extjs.gxt.ui.client.widget.form.DateField;
|
33 |
import com.extjs.gxt.ui.client.widget.form.FieldSet;
|
34 |
import com.extjs.gxt.ui.client.widget.form.FieldSet;
|
34 |
import com.extjs.gxt.ui.client.widget.form.FormPanel;
|
35 |
import com.extjs.gxt.ui.client.widget.form.FormPanel;
|
35 |
import com.extjs.gxt.ui.client.widget.form.LabelField;
|
36 |
import com.extjs.gxt.ui.client.widget.form.LabelField;
|
36 |
import com.extjs.gxt.ui.client.widget.form.NumberField;
|
37 |
import com.extjs.gxt.ui.client.widget.form.NumberField;
|
37 |
import com.extjs.gxt.ui.client.widget.form.Radio;
|
38 |
import com.extjs.gxt.ui.client.widget.form.Radio;
|
38 |
import com.extjs.gxt.ui.client.widget.form.RadioGroup;
|
39 |
import com.extjs.gxt.ui.client.widget.form.RadioGroup;
|
39 |
import com.extjs.gxt.ui.client.widget.form.TextField;
|
40 |
import com.extjs.gxt.ui.client.widget.form.TextField;
|
40 |
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
|
41 |
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
|
41 |
import com.extjs.gxt.ui.client.widget.form.FormPanel.LabelAlign;
|
42 |
import com.extjs.gxt.ui.client.widget.form.FormPanel.LabelAlign;
|
42 |
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
|
43 |
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
|
43 |
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel;
|
44 |
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel;
|
44 |
import com.extjs.gxt.ui.client.widget.grid.CheckColumnConfig;
|
45 |
import com.extjs.gxt.ui.client.widget.grid.CheckColumnConfig;
|
45 |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
|
46 |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
|
46 |
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
|
47 |
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
|
47 |
import com.extjs.gxt.ui.client.widget.grid.EditorGrid;
|
48 |
import com.extjs.gxt.ui.client.widget.grid.EditorGrid;
|
48 |
import com.extjs.gxt.ui.client.widget.layout.ColumnData;
|
49 |
import com.extjs.gxt.ui.client.widget.layout.ColumnData;
|
49 |
import com.extjs.gxt.ui.client.widget.layout.ColumnLayout;
|
50 |
import com.extjs.gxt.ui.client.widget.layout.ColumnLayout;
|
50 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
51 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
51 |
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
|
52 |
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
|
52 |
import com.extjs.gxt.ui.client.widget.layout.FormData;
|
53 |
import com.extjs.gxt.ui.client.widget.layout.FormData;
|
53 |
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
|
54 |
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
|
- |
|
55 |
import com.extjs.gxt.ui.client.widget.tips.ToolTipConfig;
|
54 |
import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
|
56 |
import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
|
55 |
import com.extjs.gxt.ui.client.widget.toolbar.TextToolItem;
|
57 |
import com.extjs.gxt.ui.client.widget.toolbar.TextToolItem;
|
56 |
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
58 |
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
57 |
import com.google.gwt.core.client.GWT;
|
59 |
import com.google.gwt.core.client.GWT;
|
58 |
import com.google.gwt.i18n.client.DateTimeFormat;
|
60 |
import com.google.gwt.i18n.client.DateTimeFormat;
|
59 |
import com.google.gwt.i18n.client.NumberFormat;
|
61 |
import com.google.gwt.i18n.client.NumberFormat;
|
60 |
|
62 |
|
61 |
public class FormStructureVue extends LayoutContainer implements Rafraichissable {
|
63 |
public class FormStructureVue extends LayoutContainer implements Rafraichissable {
|
62 |
|
64 |
|
63 |
private Modele coelModele = null ;
|
65 |
private Modele coelModele = null ;
|
64 |
private ListStore<Valeur> magazinLstpr = null;
|
66 |
private ListStore<Valeur> magazinLstpr = null;
|
65 |
private ComboBox<Valeur> comboLstpr = null;
|
67 |
private ComboBox<Valeur> comboLstpr = null;
|
66 |
private ListStore<Valeur> magazinLstpu = null;
|
68 |
private ListStore<Valeur> magazinLstpu = null;
|
67 |
private ComboBox<Valeur> comboLstpu = null;
|
69 |
private ComboBox<Valeur> comboLstpu = null;
|
68 |
private ListStore<Valeur> magazinLiStatut = null;
|
70 |
private ListStore<Valeur> magazinLiStatut = null;
|
69 |
private ComboBox<Valeur> comboLiStatut = null;
|
71 |
private ComboBox<Valeur> comboLiStatut = null;
|
70 |
private ListStore<Valeur> magazinLiFonction = null;
|
72 |
private ListStore<Valeur> magazinLiFonction = null;
|
71 |
private ComboBox<Valeur> comboLiFonction = null;
|
73 |
private ComboBox<Valeur> comboLiFonction = null;
|
72 |
private ComboBox<InterneValeur> comboAcronyme = null;
|
74 |
private ComboBox<InterneValeur> comboAcronyme = null;
|
73 |
private TextField<String> ihChp = null;
|
75 |
private TextField<String> ihChp = null;
|
74 |
private TextField<String> mnhnChp = null;
|
76 |
private TextField<String> mnhnChp = null;
|
75 |
private ComboBox<InterneValeur> comboTypeStructure = null;
|
77 |
private ComboBox<InterneValeur> comboTypeStructure = null;
|
76 |
private TabItem personnelOnglet = null;
|
78 |
private TabItem personnelOnglet = null;
|
77 |
private EditorGrid<Personne> grillePersonnel = null;
|
79 |
private EditorGrid<Personne> grillePersonnel = null;
|
78 |
private ListStore<Personne> personnelGrilleMagazin = null;
|
80 |
private ListStore<Personne> personnelGrilleMagazin = null;
|
79 |
private LabelField nbreTotalPersonnelChp = null;
|
81 |
private LabelField nbreTotalPersonnelChp = null;
|
80 |
private TabItem conservationOnglet = null;
|
82 |
private TabItem conservationOnglet = null;
|
81 |
private CheckBoxGroup trukLocalStockageCacGrpChp = null;
|
83 |
private CheckBoxGroup trukLocalStockageCacGrpChp = null;
|
82 |
private ContentPanel trukLocalStockageCp = null;
|
84 |
private ContentPanel trukLocalStockageCp = null;
|
83 |
private CheckBoxGroup trukMeubleStockageCacGrpChp = null;
|
85 |
private CheckBoxGroup trukMeubleStockageCacGrpChp = null;
|
84 |
private ContentPanel trukMeubleStockageCp = null;
|
86 |
private ContentPanel trukMeubleStockageCp = null;
|
85 |
private CheckBoxGroup trukParametreStockageCacGrpChp = null;
|
87 |
private CheckBoxGroup trukParametreStockageCacGrpChp = null;
|
86 |
private ContentPanel trukParametreStockageCp = null;
|
88 |
private ContentPanel trukParametreStockageCp = null;
|
- |
|
89 |
private ContentPanel trukCollectionAutreCp = null;
|
- |
|
90 |
private CheckBoxGroup trukCollectionAutreCacGrpChp = null;
|
- |
|
91 |
private CheckBoxGroup trukOpRestauCacGrpChp = null;
|
- |
|
92 |
private ContentPanel trukOpRestauCp = null;
|
- |
|
93 |
private ContentPanel ceMaterielConservationCp = null;
|
- |
|
94 |
private CheckBoxGroup ceMaterielConservationCacGrpChp = null;
|
- |
|
95 |
private CheckBoxGroup trukAutreMaterielCacGrpChp = null;
|
- |
|
96 |
private ContentPanel trukAutreMaterielCp = null;
|
- |
|
97 |
private ContentPanel trukTraitementCp = null;
|
- |
|
98 |
private CheckBoxGroup trukTraitementCacGrpChp = null;
|
- |
|
99 |
private ContentPanel trukPoisonTraitementCp;
|
- |
|
100 |
private ContentPanel trukInsecteTraitementCp;
|
- |
|
101 |
private CheckBoxGroup trukInsecteTraitementCacGrpChp;
|
- |
|
102 |
private CheckBoxGroup trukPoisonTraitementCacGrpChp;
|
87 |
|
103 |
|
88 |
public FormStructureVue() {
|
104 |
public FormStructureVue() {
|
89 |
//+-----------------------------------------------------------------------------------------------------------+
|
105 |
//+-----------------------------------------------------------------------------------------------------------+
|
90 |
// Initialisation de variables
|
106 |
// Initialisation de variables
|
91 |
setLayout(new FitLayout());
|
107 |
setLayout(new FitLayout());
|
92 |
coelModele = Registry.get(RegistreId.MODELE);
|
108 |
coelModele = Registry.get(RegistreId.MODELE);
|
93 |
|
- |
|
94 |
// Création de la disposition : FIELDSET
|
- |
|
95 |
FormLayout layoutFieldset = new FormLayout();
|
- |
|
96 |
layoutFieldset.setLabelWidth(200);
|
- |
|
97 |
layoutFieldset.setPadding(4);
|
- |
|
98 |
|
109 |
|
99 |
//+-----------------------------------------------------------------------------------------------------------+
|
110 |
//+-----------------------------------------------------------------------------------------------------------+
|
100 |
// Création du panneau Formulaire
|
111 |
// Création du panneau du FORMULAIRE GÉNÉRAL
|
101 |
FormPanel panel = new FormPanel();
|
112 |
FormPanel panel = new FormPanel();
|
102 |
panel.setFrame(true);
|
113 |
panel.setFrame(true);
|
103 |
panel.setIconStyle("icone-form-ajouter");
|
114 |
panel.setIconStyle("icone-form-ajouter");
|
104 |
panel.setCollapsible(false);
|
115 |
panel.setCollapsible(false);
|
105 |
panel.setHeading("Ajout d'une institution");
|
116 |
panel.setHeading("Ajout d'une institution");
|
106 |
panel.setButtonAlign(HorizontalAlignment.CENTER);
|
117 |
panel.setButtonAlign(HorizontalAlignment.CENTER);
|
107 |
panel.setLayout(new FlowLayout());
|
118 |
panel.setLayout(new FlowLayout());
|
- |
|
119 |
|
108 |
|
120 |
//+-----------------------------------------------------------------------------------------------------------+
|
109 |
// Création des onglets
|
121 |
// Création des onglets
|
- |
|
122 |
TabPanel onglets = new TabPanel();
|
110 |
TabPanel onglets = new TabPanel();
|
123 |
// NOTE : pour faire apparaître les scrollBar il faut définir la hauteur du panneau d'onglets à 100% (autoHeight ne semble pas fonctionner)
|
111 |
onglets.setAutoHeight(true);
|
- |
|
112 |
//tabs.setDeferredRender(false);
|
124 |
onglets.setHeight("100%");
|
113 |
|
125 |
|
114 |
//+-----------------------------------------------------------------------------------------------------------+
|
126 |
//+-----------------------------------------------------------------------------------------------------------+
|
115 |
// Onlget formulaire IDENTIFICATION
|
127 |
// Onlget formulaire IDENTIFICATION
|
116 |
TabItem identificationOnglet = new TabItem();
|
- |
|
117 |
identificationOnglet.setText("Identification");
|
- |
|
118 |
identificationOnglet.setLayout(new FormLayout());
|
- |
|
119 |
|
- |
|
120 |
// Fieldset IDENTITÉ
|
- |
|
121 |
FieldSet fieldSetIdentite = new FieldSet();
|
- |
|
122 |
fieldSetIdentite.setHeading("Identité");
|
- |
|
123 |
fieldSetIdentite.setCollapsible(true);
|
- |
|
124 |
fieldSetIdentite.setLayout(layoutFieldset);
|
- |
|
125 |
|
- |
|
126 |
TextField<String> nomStructureChp = new TextField<String>();
|
- |
|
127 |
nomStructureChp.setFieldLabel("Nom de la structure");
|
- |
|
128 |
nomStructureChp.setAllowBlank(false);
|
- |
|
129 |
nomStructureChp.getMessages().setBlankText("Ce champ est obligatoire.");
|
- |
|
130 |
fieldSetIdentite.add(nomStructureChp, new FormData(450, 0));
|
- |
|
131 |
|
- |
|
132 |
// Création du sous-formulaire : Acronyme
|
- |
|
133 |
LayoutContainer ligne = new LayoutContainer();
|
- |
|
134 |
ligne.setLayout(new ColumnLayout());
|
- |
|
135 |
LayoutContainer gauche = new LayoutContainer();
|
- |
|
136 |
FormLayout layoutGauche = new FormLayout();
|
- |
|
137 |
layoutGauche.setLabelAlign(LabelAlign.LEFT);
|
- |
|
138 |
layoutGauche.setLabelWidth(200);
|
- |
|
139 |
layoutGauche.setPadding(0);
|
- |
|
140 |
gauche.setLayout(layoutGauche);
|
- |
|
141 |
LayoutContainer droite = new LayoutContainer();
|
- |
|
142 |
FormLayout layoutDroite = new FormLayout();
|
- |
|
143 |
layoutDroite.setLabelWidth(0);
|
- |
|
144 |
layoutDroite.setPadding(0);
|
- |
|
145 |
droite.setLayout(layoutDroite);
|
- |
|
146 |
|
- |
|
147 |
ListStore<InterneValeur> acronymes = new ListStore<InterneValeur>();
|
- |
|
148 |
acronymes.add(InterneValeurListe.getTypeAcronyme());
|
- |
|
149 |
|
- |
|
150 |
comboAcronyme = new ComboBox<InterneValeur>();
|
- |
|
151 |
comboAcronyme.setEmptyText("Sélectioner un type d'acronyme...");
|
- |
|
152 |
comboAcronyme.setFieldLabel("Acronymes");
|
- |
|
153 |
comboAcronyme.setDisplayField("nom");
|
- |
|
154 |
comboAcronyme.setStore(acronymes);
|
- |
|
155 |
comboAcronyme.setEditable(false);
|
- |
|
156 |
comboAcronyme.setTypeAhead(true);
|
- |
|
157 |
comboAcronyme.setTriggerAction(TriggerAction.ALL);
|
- |
|
158 |
comboAcronyme.addSelectionChangedListener(new SelectionChangedListener<InterneValeur>() {
|
- |
|
159 |
@Override
|
- |
|
160 |
public void selectionChanged(SelectionChangedEvent<InterneValeur> se) {
|
- |
|
161 |
String acronymeAbr = se.getSelectedItem().getAbr();
|
- |
|
162 |
if (acronymeAbr.equals("IH")) {
|
- |
|
163 |
mnhnChp.hide();
|
- |
|
164 |
ihChp.show();
|
- |
|
165 |
} else if (acronymeAbr.equals("MNHN")) {
|
- |
|
166 |
ihChp.hide();
|
- |
|
167 |
mnhnChp.show();
|
- |
|
168 |
} else if (acronymeAbr.equals("")) {
|
- |
|
169 |
ihChp.hide();
|
- |
|
170 |
mnhnChp.hide();
|
- |
|
171 |
comboAcronyme.clearSelections();
|
- |
|
172 |
}
|
- |
|
173 |
}
|
- |
|
174 |
});
|
- |
|
175 |
gauche.add(comboAcronyme);
|
- |
|
176 |
|
- |
|
177 |
ihChp = new TextField<String>();
|
- |
|
178 |
//ihChp.setEmptyText("Index Herbariorum");
|
- |
|
179 |
ihChp.setLabelSeparator("");
|
- |
|
180 |
ihChp.setToolTip("Index Herbariorum : herbier de plus de 5000 échantillons");
|
- |
|
181 |
ihChp.hide();
|
- |
|
182 |
droite.add(ihChp);
|
- |
|
183 |
|
- |
|
184 |
mnhnChp = new TextField<String>();
|
- |
|
185 |
//mnhnChp.setEmptyText("MNHN");
|
- |
|
186 |
mnhnChp.setLabelSeparator("");
|
- |
|
187 |
mnhnChp.setToolTip("Acronyme MNHN : herbier de moins de 5000 échantillons");
|
- |
|
188 |
mnhnChp.hide();
|
- |
|
189 |
droite.add(mnhnChp);
|
- |
|
190 |
|
- |
|
191 |
ligne.add(gauche, new ColumnData(0.5));
|
- |
|
192 |
ligne.add(droite, new ColumnData(0.5));
|
- |
|
193 |
fieldSetIdentite.add(ligne);
|
- |
|
194 |
|
- |
|
195 |
// Création du sous-formulaire : Type de Structure
|
- |
|
196 |
LayoutContainer ligneTs = new LayoutContainer();
|
- |
|
197 |
ligneTs.setLayout(new ColumnLayout());
|
- |
|
198 |
|
- |
|
199 |
LayoutContainer gaucheTs = new LayoutContainer();
|
- |
|
200 |
layoutGauche = new FormLayout();
|
- |
|
201 |
layoutGauche.setLabelAlign(LabelAlign.LEFT);
|
- |
|
202 |
layoutGauche.setLabelWidth(200);
|
- |
|
203 |
layoutGauche.setPadding(0);
|
- |
|
204 |
gaucheTs.setLayout(layoutGauche);
|
- |
|
205 |
|
- |
|
206 |
LayoutContainer droiteTs = new LayoutContainer();
|
- |
|
207 |
layoutDroite = new FormLayout();
|
- |
|
208 |
layoutDroite.setLabelWidth(0);
|
- |
|
209 |
layoutDroite.setPadding(0);
|
- |
|
210 |
droiteTs.setLayout(layoutDroite);
|
- |
|
211 |
|
- |
|
212 |
ListStore<InterneValeur> typesStructure = new ListStore<InterneValeur>();
|
- |
|
213 |
typesStructure.add(InterneValeurListe.getTypeStructure());
|
- |
|
214 |
|
- |
|
215 |
this.comboTypeStructure = new ComboBox<InterneValeur>();
|
- |
|
216 |
comboTypeStructure.setEmptyText("Sélectioner un type de structure...");
|
- |
|
217 |
comboTypeStructure.setFieldLabel("Statut des structures");
|
- |
|
218 |
comboTypeStructure.setDisplayField("nom");
|
- |
|
219 |
comboTypeStructure.setStore(typesStructure);
|
- |
|
220 |
comboTypeStructure.setEditable(false);
|
- |
|
221 |
comboTypeStructure.setTypeAhead(true);
|
- |
|
222 |
comboTypeStructure.setTriggerAction(TriggerAction.ALL);
|
- |
|
223 |
comboTypeStructure.addSelectionChangedListener(new SelectionChangedListener<InterneValeur>() {
|
- |
|
224 |
@Override
|
- |
|
225 |
public void selectionChanged(SelectionChangedEvent<InterneValeur> se) {
|
- |
|
226 |
String typeAbr = se.getSelectedItem().getAbr();
|
- |
|
227 |
if (typeAbr.equals("stpu")) {
|
- |
|
228 |
comboLstpr.hide();
|
- |
|
229 |
comboLstpu.show();
|
- |
|
230 |
} else if (typeAbr.equals("stpr")) {
|
- |
|
231 |
comboLstpu.hide();
|
- |
|
232 |
comboLstpr.show();
|
- |
|
233 |
} else if (typeAbr.equals("")) {
|
- |
|
234 |
comboLstpr.hide();
|
- |
|
235 |
comboLstpu.hide();
|
- |
|
236 |
comboTypeStructure.clearSelections();
|
- |
|
237 |
}
|
- |
|
238 |
}
|
- |
|
239 |
});
|
- |
|
240 |
gaucheTs.add(comboTypeStructure);
|
- |
|
241 |
|
- |
|
242 |
coelModele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("stpu"));
|
- |
|
243 |
magazinLstpu = new ListStore<Valeur>();
|
- |
|
244 |
magazinLstpu.add(new ArrayList<Valeur>());
|
- |
|
245 |
comboLstpu = new ComboBox<Valeur>();
|
- |
|
246 |
//comboLstpu.setFieldLabel("Statut des structures publiques");
|
- |
|
247 |
comboLstpu.setLabelSeparator("");
|
- |
|
248 |
comboLstpu.setDisplayField("nom");
|
- |
|
249 |
comboLstpu.setEditable(false);
|
- |
|
250 |
comboLstpu.setTriggerAction(TriggerAction.ALL);
|
- |
|
251 |
comboLstpu.setStore(magazinLstpu);
|
- |
|
252 |
comboLstpu.hide();
|
- |
|
253 |
droiteTs.add(comboLstpu);
|
- |
|
254 |
|
- |
|
255 |
coelModele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("stpr"));
|
- |
|
256 |
magazinLstpr = new ListStore<Valeur>();
|
- |
|
257 |
magazinLstpr.add(new ArrayList<Valeur>());
|
- |
|
258 |
comboLstpr = new ComboBox<Valeur>();
|
- |
|
259 |
//comboLstpr.setFieldLabel("Statut des structures privées");
|
- |
|
260 |
comboLstpr.setLabelSeparator("");
|
- |
|
261 |
comboLstpr.setDisplayField("nom");
|
- |
|
262 |
comboLstpr.setEditable(false);
|
- |
|
263 |
comboLstpr.setTriggerAction(TriggerAction.ALL);
|
- |
|
264 |
comboLstpr.setStore(magazinLstpr);
|
- |
|
265 |
comboLstpr.hide();
|
- |
|
266 |
droiteTs.add(comboLstpr);
|
- |
|
267 |
|
- |
|
268 |
ligneTs.add(gaucheTs, new ColumnData(0.5));
|
- |
|
269 |
ligneTs.add(droiteTs, new ColumnData(0.5));
|
- |
|
270 |
fieldSetIdentite.add(ligneTs);
|
- |
|
271 |
|
- |
|
272 |
DateField dateFondationChp = new DateField();
|
- |
|
273 |
dateFondationChp.setFieldLabel("Date de fondation");
|
- |
|
274 |
dateFondationChp.getPropertyEditor().getFormat();
|
- |
|
275 |
dateFondationChp.getPropertyEditor().setFormat(DateTimeFormat.getFormat("dd/MM/yyyy"));
|
- |
|
276 |
dateFondationChp.getMessages().setInvalidText("La valeur saisie n'est pas une date valide. La date doit être au format «jj/mm/aaaa».");
|
- |
|
277 |
fieldSetIdentite.add(dateFondationChp);
|
- |
|
278 |
|
- |
|
279 |
identificationOnglet.add(fieldSetIdentite);
|
- |
|
280 |
|
- |
|
281 |
// Fieldset ADRESSE
|
- |
|
282 |
LayoutContainer principalFdAdresse = new LayoutContainer();
|
- |
|
283 |
principalFdAdresse.setLayout(new ColumnLayout());
|
- |
|
284 |
|
- |
|
285 |
LayoutContainer gaucheFdAdresse = new LayoutContainer();
|
- |
|
286 |
layoutGauche = new FormLayout();
|
- |
|
287 |
layoutGauche.setLabelAlign(LabelAlign.LEFT);
|
- |
|
288 |
layoutGauche.setLabelWidth(100);
|
- |
|
289 |
layoutGauche.setPadding(0);
|
- |
|
290 |
gaucheFdAdresse.setLayout(layoutGauche);
|
- |
|
291 |
|
- |
|
292 |
LayoutContainer droiteFdAdresse = new LayoutContainer();
|
- |
|
293 |
layoutDroite = new FormLayout();
|
- |
|
294 |
layoutDroite.setLabelAlign(LabelAlign.LEFT);
|
- |
|
295 |
layoutDroite.setLabelWidth(100);
|
- |
|
296 |
layoutDroite.setPadding(0);
|
- |
|
297 |
droiteFdAdresse.setLayout(layoutDroite);
|
- |
|
298 |
|
- |
|
299 |
FieldSet fieldSetAdresse = new FieldSet();
|
- |
|
300 |
fieldSetAdresse.setHeading("Adresse");
|
- |
|
301 |
fieldSetAdresse.setCollapsible(true);
|
- |
|
302 |
|
- |
|
303 |
layoutFieldset = new FormLayout();
|
- |
|
304 |
layoutFieldset.setLabelWidth(100);
|
- |
|
305 |
layoutFieldset.setPadding(4);
|
- |
|
306 |
fieldSetAdresse.setLayout(layoutFieldset);
|
- |
|
307 |
|
- |
|
308 |
TextField<String> adrChp = new TextField<String>();
|
- |
|
309 |
adrChp.setFieldLabel("Adresse");
|
- |
|
310 |
fieldSetAdresse.add(adrChp, new FormData(550, 0));
|
- |
|
311 |
|
- |
|
312 |
TextField<String> cpChp = new TextField<String>();
|
- |
|
313 |
cpChp.setFieldLabel("Code postal");
|
- |
|
314 |
gaucheFdAdresse.add(cpChp);
|
- |
|
315 |
|
- |
|
316 |
TextField<String> villeChp = new TextField<String>();
|
- |
|
317 |
villeChp.setFieldLabel("Ville");
|
- |
|
318 |
droiteFdAdresse.add(villeChp);
|
- |
|
319 |
|
- |
|
320 |
TextField<String> regionChp = new TextField<String>();
|
- |
|
321 |
regionChp.setFieldLabel("Région");
|
- |
|
322 |
gaucheFdAdresse.add(regionChp);
|
- |
|
323 |
|
- |
|
324 |
TextField<String> paysChp = new TextField<String>();
|
- |
|
325 |
paysChp.setFieldLabel("Pays");
|
- |
|
326 |
droiteFdAdresse.add(paysChp);
|
- |
|
327 |
|
- |
|
328 |
principalFdAdresse.add(gaucheFdAdresse, new ColumnData(.5));
|
- |
|
329 |
principalFdAdresse.add(droiteFdAdresse, new ColumnData(.5));
|
- |
|
330 |
fieldSetAdresse.add(principalFdAdresse);
|
- |
|
331 |
identificationOnglet.add(fieldSetAdresse);
|
- |
|
332 |
|
- |
|
333 |
// Fieldset TÉLÉPHONE et EMAIL
|
- |
|
334 |
|
- |
|
335 |
LayoutContainer principalFdTelMail = new LayoutContainer();
|
- |
|
336 |
principalFdTelMail.setLayout(new ColumnLayout());
|
- |
|
337 |
|
- |
|
338 |
LayoutContainer gaucheFdTelMail = new LayoutContainer();
|
- |
|
339 |
gaucheFdTelMail.setLayout(creerFormLayout(100, LabelAlign.LEFT, 0));
|
- |
|
340 |
|
- |
|
341 |
LayoutContainer droiteFdTelMail = new LayoutContainer();
|
- |
|
342 |
droiteFdTelMail.setLayout(creerFormLayout(100, LabelAlign.LEFT, 0));
|
- |
|
343 |
|
- |
|
344 |
FieldSet fieldSetTelMail = new FieldSet();
|
- |
|
345 |
fieldSetTelMail.setHeading("Communication");
|
- |
|
346 |
fieldSetTelMail.setCollapsible(true);
|
- |
|
347 |
|
- |
|
348 |
fieldSetTelMail.setLayout(creerFormLayout(200, LabelAlign.LEFT, 4));
|
- |
|
349 |
|
- |
|
350 |
TextField<String> telChp = new TextField<String>();
|
- |
|
351 |
telChp.setFieldLabel("Téléphone");
|
- |
|
352 |
gaucheFdTelMail.add(telChp);
|
- |
|
353 |
|
- |
|
354 |
TextField<String> faxChp = new TextField<String>();
|
- |
|
355 |
faxChp.setFieldLabel("Fax");
|
- |
|
356 |
droiteFdTelMail.add(faxChp);
|
- |
|
357 |
|
- |
|
358 |
TextField<String> emailChp = new TextField<String>();
|
- |
|
359 |
emailChp.setFieldLabel("Courriel");
|
- |
|
360 |
emailChp.setToolTip("Saisir le courriel de l'organisation, pas de courriel individuel. Ex. : accueil@organisation.org");
|
- |
|
361 |
gaucheFdTelMail.add(emailChp);
|
- |
|
362 |
|
- |
|
363 |
TextField<String> urlChp = new TextField<String>();
|
- |
|
364 |
urlChp.setFieldLabel("Site web");
|
- |
|
365 |
droiteFdTelMail.add(urlChp);
|
- |
|
366 |
|
- |
|
367 |
principalFdTelMail.add(gaucheFdTelMail, new ColumnData(.5));
|
- |
|
368 |
principalFdTelMail.add(droiteFdTelMail, new ColumnData(.5));
|
- |
|
369 |
fieldSetTelMail.add(principalFdTelMail);
|
- |
|
370 |
identificationOnglet.add(fieldSetTelMail);
|
- |
|
371 |
|
- |
|
372 |
onglets.add(identificationOnglet);
|
128 |
onglets.add(creerOngletIdentification());
|
373 |
|
129 |
|
374 |
//+-----------------------------------------------------------------------------------------------------------+
|
130 |
//+-----------------------------------------------------------------------------------------------------------+
|
375 |
// Onlget formulaire PERSONNEL
|
131 |
// Onlget formulaire PERSONNEL
|
376 |
onglets.add(creerOngletPersonnel());
|
132 |
onglets.add(creerOngletPersonnel());
|
377 |
|
133 |
|
378 |
//+-----------------------------------------------------------------------------------------------------------+
|
134 |
//+-----------------------------------------------------------------------------------------------------------+
|
379 |
// Onlget formulaire CONSERVATION
|
135 |
// Onlget formulaire CONSERVATION
|
380 |
onglets.add(creerOngletConservation());
|
136 |
onglets.add(creerOngletConservation());
|
381 |
onglets.setSelection(conservationOnglet);
|
137 |
onglets.setSelection(conservationOnglet);
|
382 |
|
138 |
|
383 |
//+-----------------------------------------------------------------------------------------------------------+
|
139 |
//+-----------------------------------------------------------------------------------------------------------+
|
384 |
// Onlget formulaire VALORISATION
|
140 |
// Onlget formulaire VALORISATION
|
385 |
TabItem valorisationOnglet = new TabItem();
|
141 |
TabItem valorisationOnglet = new TabItem();
|
386 |
valorisationOnglet.setText("Valorisation");
|
142 |
valorisationOnglet.setText("Valorisation");
|
387 |
valorisationOnglet.setLayout(new FormLayout());
|
143 |
valorisationOnglet.setLayout(new FormLayout());
|
388 |
|
- |
|
389 |
|
- |
|
390 |
onglets.add(valorisationOnglet);
|
144 |
onglets.add(valorisationOnglet);
|
391 |
|
145 |
|
392 |
//+-----------------------------------------------------------------------------------------------------------+
|
146 |
//+-----------------------------------------------------------------------------------------------------------+
|
393 |
// Gestion du FORMULAIRE GÉNÉRAL
|
147 |
// Gestion du FORMULAIRE GÉNÉRAL
|
394 |
|
148 |
|
395 |
// Ajout des onglets
|
149 |
// Ajout des onglets
|
396 |
panel.add(onglets);
|
150 |
panel.add(onglets);
|
397 |
|
151 |
|
398 |
// Ajout des boutons au panneau formulaire
|
152 |
// Ajout des boutons au panneau formulaire
|
399 |
Button annulerBtn = new Button("Annuler");
|
153 |
Button annulerBtn = new Button("Annuler");
|
400 |
panel.addButton(annulerBtn);
|
154 |
panel.addButton(annulerBtn);
|
401 |
Button validerBtn = new Button("Valider");
|
155 |
Button validerBtn = new Button("Valider");
|
402 |
panel.addButton(validerBtn);
|
156 |
panel.addButton(validerBtn);
|
403 |
|
157 |
|
404 |
// Ajout du panneau Formulaire à la disposition générale
|
158 |
// Ajout du panneau Formulaire à la disposition générale
|
405 |
add(panel);
|
159 |
add(panel);
|
406 |
}
|
160 |
}
|
407 |
|
161 |
|
408 |
private TabItem creerOngletConservation() {
|
162 |
private TabItem creerOngletConservation() {
|
409 |
conservationOnglet = new TabItem();
|
163 |
conservationOnglet = new TabItem();
|
410 |
conservationOnglet.setText("Conservation");
|
164 |
conservationOnglet.setText("Conservation");
|
- |
|
165 |
conservationOnglet.setScrollMode(Scroll.AUTO);
|
411 |
conservationOnglet.setLayout(creerFormLayout(650, LabelAlign.TOP, null));
|
166 |
conservationOnglet.setLayout(creerFormLayout(650, LabelAlign.TOP, null));
|
412 |
|
167 |
|
413 |
RadioGroup markFormationRGrpChp = new RadioGroup("mark_formation_grp");
|
168 |
RadioGroup markFormationRGrpChp = new RadioGroup("mark_formation_grp");
|
414 |
markFormationRGrpChp.setFieldLabel("Le personnel s'occupant des collections a-t-il suivi des formations en conservations ?");
|
169 |
markFormationRGrpChp.setFieldLabel("Le personnel s'occupant des collections a-t-il suivi des formations en conservations ?");
|
415 |
creerChoixUniqueBr(markFormationRGrpChp, "mark_formation");
|
170 |
creerChoixUniqueBr(markFormationRGrpChp, "mark_formation");
|
416 |
conservationOnglet.add(markFormationRGrpChp);
|
171 |
conservationOnglet.add(markFormationRGrpChp);
|
417 |
|
172 |
|
418 |
TextField<String> formationChp = new TextField<String>();
|
173 |
TextField<String> formationChp = new TextField<String>();
|
419 |
formationChp.setFieldLabel("Lesquelles ?");
|
174 |
formationChp.setFieldLabel("Lesquelles ?");
|
420 |
conservationOnglet.add(formationChp);
|
175 |
conservationOnglet.add(formationChp);
|
421 |
|
176 |
|
422 |
RadioGroup markInteretFormationRGrpChp = new RadioGroup("mark_interet_formation_grp");
|
177 |
RadioGroup markInteretFormationRGrpChp = new RadioGroup("mark_interet_formation_grp");
|
423 |
markInteretFormationRGrpChp.setFieldLabel("Seriez vous intéressé par une formation à la conservation et à la restauration d'herbier ?");
|
178 |
markInteretFormationRGrpChp.setFieldLabel("Seriez vous intéressé par une formation à la conservation et à la restauration d'herbier ?");
|
424 |
creerChoixUniqueBr(markInteretFormationRGrpChp, "mark_interet_formation_grp");
|
179 |
creerChoixUniqueBr(markInteretFormationRGrpChp, "mark_interet_formation_grp");
|
425 |
conservationOnglet.add(markInteretFormationRGrpChp);
|
180 |
conservationOnglet.add(markInteretFormationRGrpChp);
|
426 |
|
181 |
|
427 |
trukLocalStockageCp = creerChoixMultipleCp("localStockage");
|
182 |
trukLocalStockageCp = creerChoixMultipleCp("localStockage");
|
428 |
conservationOnglet.add(trukLocalStockageCp);
|
183 |
conservationOnglet.add(trukLocalStockageCp);
|
429 |
|
184 |
|
430 |
trukMeubleStockageCp = creerChoixMultipleCp("meubleStockage");
|
185 |
trukMeubleStockageCp = creerChoixMultipleCp("meubleStockage");
|
431 |
conservationOnglet.add(trukMeubleStockageCp);
|
186 |
conservationOnglet.add(trukMeubleStockageCp);
|
432 |
|
187 |
|
433 |
trukParametreStockageCp = creerChoixMultipleCp("parametreStockage");
|
188 |
trukParametreStockageCp = creerChoixMultipleCp("parametreStockage");
|
434 |
conservationOnglet.add(trukParametreStockageCp);
|
189 |
conservationOnglet.add(trukParametreStockageCp);
|
435 |
|
190 |
|
436 |
RadioGroup markCollectionCommuneRGrpChp = new RadioGroup("mark_collection_commune_grp");
|
191 |
RadioGroup markCollectionCommuneRGrpChp = new RadioGroup("mark_collection_commune_grp");
|
437 |
markCollectionCommuneRGrpChp.setFieldLabel("Les collections botaniques sont-elles conservées avec d'autres collections dans les mêmes locaux (problème de conservation en commun) ?");
|
192 |
markCollectionCommuneRGrpChp.setFieldLabel("Les collections botaniques sont-elles conservées avec d'autres collections dans les mêmes locaux (problème de conservation en commun) ?");
|
438 |
creerChoixUniqueBr(markCollectionCommuneRGrpChp, "mark_collection_commune");
|
193 |
creerChoixUniqueBr(markCollectionCommuneRGrpChp, "mark_collection_commune");
|
439 |
conservationOnglet.add(markCollectionCommuneRGrpChp);
|
194 |
conservationOnglet.add(markCollectionCommuneRGrpChp);
|
- |
|
195 |
|
- |
|
196 |
trukCollectionAutreCp = creerChoixMultipleCp("autreCollection");
|
- |
|
197 |
conservationOnglet.add(trukCollectionAutreCp);
|
- |
|
198 |
|
- |
|
199 |
RadioGroup markAccesControleRGrpChp = new RadioGroup("mark_acces_controle_grp");
|
- |
|
200 |
markAccesControleRGrpChp.setFieldLabel("L'accès à vos collections botanique est-il contrôlé (ex. : manipulation réservées à des personnes compétentes) ?");
|
- |
|
201 |
creerChoixUniqueBr(markAccesControleRGrpChp, "mark_acces_controle");
|
- |
|
202 |
conservationOnglet.add(markAccesControleRGrpChp);
|
- |
|
203 |
|
- |
|
204 |
RadioGroup markRestaurationRGrpChp = new RadioGroup("restauration_grp");
|
- |
|
205 |
markRestaurationRGrpChp.setFieldLabel("Effectuez vous des opérations de restauration ou de remise en état de vos collections botaniques ?");
|
- |
|
206 |
creerChoixUniqueBr(markRestaurationRGrpChp, "mark_restauration");
|
- |
|
207 |
conservationOnglet.add(markRestaurationRGrpChp);
|
- |
|
208 |
|
- |
|
209 |
trukOpRestauCp = creerChoixMultipleCp("opRestau");
|
- |
|
210 |
conservationOnglet.add(trukOpRestauCp);
|
- |
|
211 |
|
- |
|
212 |
ceMaterielConservationCp = creerChoixMultipleCp("onep");
|
- |
|
213 |
conservationOnglet.add(ceMaterielConservationCp);
|
- |
|
214 |
|
- |
|
215 |
trukAutreMaterielCp = creerChoixMultipleCp("autreMateriel");
|
- |
|
216 |
conservationOnglet.add(trukAutreMaterielCp);
|
- |
|
217 |
|
- |
|
218 |
RadioGroup markTraitementRGrpChp = new RadioGroup("traitement_grp");
|
- |
|
219 |
markTraitementRGrpChp.setFieldLabel("Réalisez vous actuellement des traitements globaux contre les insectes ?");
|
- |
|
220 |
creerChoixUniqueBr(markTraitementRGrpChp, "mark_traitement");
|
- |
|
221 |
conservationOnglet.add(markTraitementRGrpChp);
|
- |
|
222 |
|
- |
|
223 |
trukTraitementCp = creerChoixMultipleCp("insecteTraitement");
|
- |
|
224 |
conservationOnglet.add(trukTraitementCp);
|
- |
|
225 |
|
- |
|
226 |
RadioGroup markCollectionAcquisitionRGrpChp = new RadioGroup("collection_acquisition_grp");
|
- |
|
227 |
markCollectionAcquisitionRGrpChp.setFieldLabel("Actuellement, vos collections botaniques s'accroissent-elles de nouvelles acquisitions ?");
|
- |
|
228 |
creerChoixUniqueBr(markCollectionAcquisitionRGrpChp, "mark_collection_acquisition");
|
- |
|
229 |
conservationOnglet.add(markCollectionAcquisitionRGrpChp);
|
- |
|
230 |
|
- |
|
231 |
RadioGroup markEchantillonAcquisitionRGrpChp = new RadioGroup("echantillon_acquisition_grp");
|
- |
|
232 |
markEchantillonAcquisitionRGrpChp.setFieldLabel("Actuellement, mettez vous en herbier de nouveaux échantillons ?");
|
- |
|
233 |
creerChoixUniqueBr(markEchantillonAcquisitionRGrpChp, "mark_echantillon_acquisition");
|
- |
|
234 |
conservationOnglet.add(markEchantillonAcquisitionRGrpChp);
|
- |
|
235 |
|
- |
|
236 |
RadioGroup markTraitementAcquisitionRGrpChp = new RadioGroup("traitement_acquisition_grp");
|
- |
|
237 |
markTraitementAcquisitionRGrpChp.setFieldLabel("Si oui, faites-vous un traitement contre les insectes avant l'intégration dans vos collections ?");
|
- |
|
238 |
creerChoixUniqueBr(markTraitementAcquisitionRGrpChp, "mark_traitement_acquisition");
|
- |
|
239 |
conservationOnglet.add(markTraitementAcquisitionRGrpChp);
|
- |
|
240 |
|
- |
|
241 |
LabelField question = new LabelField();
|
- |
|
242 |
question.setFieldLabel("Si oui, lesquels ?");
|
- |
|
243 |
conservationOnglet.add(question);
|
- |
|
244 |
|
- |
|
245 |
trukPoisonTraitementCp = creerChoixMultipleCp("poisonTraitement");
|
- |
|
246 |
conservationOnglet.add(trukPoisonTraitementCp);
|
- |
|
247 |
|
- |
|
248 |
trukInsecteTraitementCp = creerChoixMultipleCp("insecteTraitement");
|
- |
|
249 |
conservationOnglet.add(trukInsecteTraitementCp);
|
440 |
|
250 |
|
441 |
return conservationOnglet;
|
251 |
return conservationOnglet;
|
442 |
}
|
252 |
}
|
443 |
|
253 |
|
444 |
|
254 |
|
445 |
private TabItem creerOngletPersonnel() {
|
255 |
private TabItem creerOngletPersonnel() {
|
446 |
personnelOnglet = new TabItem();
|
256 |
personnelOnglet = new TabItem();
|
447 |
personnelOnglet.setText("Personnel");
|
257 |
personnelOnglet.setText("Personnel");
|
448 |
FormLayout personnelOngletLayout = new FormLayout();
|
- |
|
449 |
personnelOngletLayout.setLabelWidth(400);
|
258 |
personnelOnglet.setScrollMode(Scroll.AUTO);
|
450 |
personnelOnglet.setLayout(personnelOngletLayout);
|
259 |
personnelOnglet.setLayout(creerFormLayout(400, LabelAlign.LEFT, null));
|
451 |
|
260 |
|
452 |
NumberField nbreTotalPersonneStructureChp = new NumberField();
|
261 |
NumberField nbreTotalPersonneStructureChp = new NumberField();
|
453 |
nbreTotalPersonneStructureChp.setFieldLabel("Nombre de personne travaillant dans l'institution");
|
262 |
nbreTotalPersonneStructureChp.setFieldLabel("Nombre de personne travaillant dans l'institution");
|
454 |
nbreTotalPersonneStructureChp.setFormat(NumberFormat.getFormat("#"));
|
263 |
nbreTotalPersonneStructureChp.setFormat(NumberFormat.getFormat("#"));
|
455 |
nbreTotalPersonneStructureChp.setToolTip("Ce champ doit contenir un nombre");
|
264 |
nbreTotalPersonneStructureChp.setToolTip("Ce champ doit contenir un nombre");
|
456 |
personnelOnglet.add(nbreTotalPersonneStructureChp);
|
265 |
personnelOnglet.add(nbreTotalPersonneStructureChp);
|
457 |
|
266 |
|
458 |
personnelOnglet.add(this.creerGrillePersonnel());
|
267 |
personnelOnglet.add(this.creerGrillePersonnel());
|
459 |
|
268 |
|
460 |
nbreTotalPersonnelChp = new LabelField();
|
269 |
nbreTotalPersonnelChp = new LabelField();
|
461 |
nbreTotalPersonnelChp.setFieldLabel("Nombre de personne travaillant sur les collections");
|
270 |
nbreTotalPersonnelChp.setFieldLabel("Nombre de personne travaillant sur les collections");
|
462 |
nbreTotalPersonnelChp.setLabelSeparator(":");
|
271 |
nbreTotalPersonnelChp.setLabelSeparator(":");
|
463 |
nbreTotalPersonnelChp.setValue(""+grillePersonnel.getStore().getCount());
|
272 |
nbreTotalPersonnelChp.setValue(""+grillePersonnel.getStore().getCount());
|
464 |
personnelOnglet.add(nbreTotalPersonnelChp);
|
273 |
personnelOnglet.add(nbreTotalPersonnelChp);
|
465 |
|
274 |
|
466 |
return personnelOnglet;
|
275 |
return personnelOnglet;
|
467 |
}
|
276 |
}
|
468 |
|
277 |
|
469 |
private ContentPanel creerGrillePersonnel() {
|
278 |
private ContentPanel creerGrillePersonnel() {
|
470 |
|
279 |
|
471 |
List<Personne> personnes = new ArrayList<Personne>();
|
280 |
List<Personne> personnes = new ArrayList<Personne>();
|
472 |
personnes.add(new Personne(Valeur.FONCTION_DIRECTEUR));
|
281 |
personnes.add(new Personne(Valeur.FONCTION_DIRECTEUR));
|
473 |
personnes.add(new Personne(Valeur.FONCTION_CONSERVATEUR));
|
282 |
personnes.add(new Personne(Valeur.FONCTION_CONSERVATEUR));
|
474 |
|
283 |
|
475 |
personnelGrilleMagazin = new ListStore<Personne>();
|
284 |
personnelGrilleMagazin = new ListStore<Personne>();
|
476 |
personnelGrilleMagazin.add(personnes);
|
285 |
personnelGrilleMagazin.add(personnes);
|
477 |
|
286 |
|
478 |
List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
|
287 |
List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
|
479 |
|
288 |
|
480 |
CheckBoxSelectionModel<Personne> sm = new CheckBoxSelectionModel<Personne>();
|
289 |
CheckBoxSelectionModel<Personne> sm = new CheckBoxSelectionModel<Personne>();
|
481 |
configs.add(sm.getColumn());
|
290 |
configs.add(sm.getColumn());
|
482 |
|
291 |
|
483 |
ColumnConfig column = new ColumnConfig("ce_truk_fonction", "Fonction", 100);
|
292 |
ColumnConfig column = new ColumnConfig("ce_truk_fonction", "Fonction", 100);
|
484 |
coelModele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("fonction"));
|
293 |
coelModele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("fonction"));
|
485 |
magazinLiFonction = new ListStore<Valeur>();
|
294 |
magazinLiFonction = new ListStore<Valeur>();
|
486 |
magazinLiFonction.add(new ArrayList<Valeur>());
|
295 |
magazinLiFonction.add(new ArrayList<Valeur>());
|
487 |
|
296 |
|
488 |
comboLiFonction = new ComboBox<Valeur>();
|
297 |
comboLiFonction = new ComboBox<Valeur>();
|
489 |
comboLiFonction.setTriggerAction(TriggerAction.ALL);
|
298 |
comboLiFonction.setTriggerAction(TriggerAction.ALL);
|
490 |
comboLiFonction.setEditable(true);
|
299 |
comboLiFonction.setEditable(true);
|
491 |
comboLiFonction.setDisplayField("nom");
|
300 |
comboLiFonction.setDisplayField("nom");
|
492 |
//comboLiStatut.setEmptyText("Sélectionez une fonction...");
|
301 |
//comboLiStatut.setEmptyText("Sélectionez une fonction...");
|
493 |
comboLiFonction.setStore(magazinLiFonction);
|
302 |
comboLiFonction.setStore(magazinLiFonction);
|
494 |
|
303 |
|
495 |
CellEditor fonctionEditor = new CellEditor(comboLiFonction) {
|
304 |
CellEditor fonctionEditor = new CellEditor(comboLiFonction) {
|
496 |
@Override
|
305 |
@Override
|
497 |
public Object preProcessValue(Object value) {
|
306 |
public Object preProcessValue(Object value) {
|
498 |
if (value == null) {
|
307 |
if (value == null) {
|
499 |
return value;
|
308 |
return value;
|
500 |
}
|
309 |
}
|
501 |
//GWT.log("pre : "+value.toString(), null);
|
310 |
//GWT.log("pre : "+value.toString(), null);
|
502 |
return comboLiFonction.getStore().findModel("nom", (String) value);
|
311 |
return comboLiFonction.getStore().findModel("nom", (String) value);
|
503 |
}
|
312 |
}
|
504 |
|
313 |
|
505 |
@Override
|
314 |
@Override
|
506 |
public Object postProcessValue(Object value) {
|
315 |
public Object postProcessValue(Object value) {
|
507 |
if (value == null) {
|
316 |
if (value == null) {
|
508 |
return value;
|
317 |
return value;
|
509 |
}
|
318 |
}
|
510 |
//GWT.log("post : "+value.toString(), null);
|
319 |
//GWT.log("post : "+value.toString(), null);
|
511 |
return ((Valeur) value).get("nom");
|
320 |
return ((Valeur) value).get("nom");
|
512 |
}
|
321 |
}
|
513 |
};
|
322 |
};
|
514 |
column.setEditor(fonctionEditor);
|
323 |
column.setEditor(fonctionEditor);
|
515 |
configs.add(column);
|
324 |
configs.add(column);
|
516 |
|
325 |
|
517 |
column = new ColumnConfig();
|
326 |
column = new ColumnConfig();
|
518 |
column.setId("prenom");
|
327 |
column.setId("prenom");
|
519 |
column.setHeader("Prénom");
|
328 |
column.setHeader("Prénom");
|
520 |
column.setWidth(100);
|
329 |
column.setWidth(100);
|
521 |
TextField<String> prenomChp = new TextField<String>();
|
330 |
TextField<String> prenomChp = new TextField<String>();
|
522 |
prenomChp.setAllowBlank(false);
|
331 |
prenomChp.setAllowBlank(false);
|
523 |
prenomChp.getMessages().setBlankText("Ce champ est obligatoire.");
|
332 |
prenomChp.getMessages().setBlankText("Ce champ est obligatoire.");
|
524 |
prenomChp.setAutoValidate(true);
|
333 |
prenomChp.setAutoValidate(true);
|
525 |
column.setEditor(new CellEditor(prenomChp));
|
334 |
column.setEditor(new CellEditor(prenomChp));
|
526 |
configs.add(column);
|
335 |
configs.add(column);
|
527 |
|
336 |
|
528 |
column = new ColumnConfig();
|
337 |
column = new ColumnConfig();
|
529 |
column.setId("nom");
|
338 |
column.setId("nom");
|
530 |
column.setHeader("Nom");
|
339 |
column.setHeader("Nom");
|
531 |
column.setWidth(100);
|
340 |
column.setWidth(100);
|
532 |
TextField<String> nomChp = new TextField<String>();
|
341 |
TextField<String> nomChp = new TextField<String>();
|
533 |
nomChp.setAllowBlank(false);
|
342 |
nomChp.setAllowBlank(false);
|
534 |
nomChp.getMessages().setBlankText("Ce champ est obligatoire.");
|
343 |
nomChp.getMessages().setBlankText("Ce champ est obligatoire.");
|
535 |
nomChp.setAutoValidate(true);
|
344 |
nomChp.setAutoValidate(true);
|
536 |
column.setEditor(new CellEditor(nomChp));
|
345 |
column.setEditor(new CellEditor(nomChp));
|
537 |
configs.add(column);
|
346 |
configs.add(column);
|
538 |
|
347 |
|
539 |
column = new ColumnConfig("tel", "Téléphone", 100);
|
348 |
column = new ColumnConfig("tel", "Téléphone", 100);
|
540 |
TextField<String> telChp = new TextField<String>();
|
349 |
TextField<String> telChp = new TextField<String>();
|
541 |
column.setEditor(new CellEditor(telChp));
|
350 |
column.setEditor(new CellEditor(telChp));
|
542 |
configs.add(column);
|
351 |
configs.add(column);
|
543 |
|
352 |
|
544 |
column = new ColumnConfig("fax", "Fax", 100);
|
353 |
column = new ColumnConfig("fax", "Fax", 100);
|
545 |
TextField<String> faxChp = new TextField<String>();
|
354 |
TextField<String> faxChp = new TextField<String>();
|
546 |
column.setEditor(new CellEditor(faxChp));
|
355 |
column.setEditor(new CellEditor(faxChp));
|
547 |
configs.add(column);
|
356 |
configs.add(column);
|
548 |
|
357 |
|
549 |
column = new ColumnConfig("courriel", "Courriel", 100);
|
358 |
column = new ColumnConfig("courriel", "Courriel", 100);
|
550 |
TextField<String> emailChp = new TextField<String>();
|
359 |
TextField<String> emailChp = new TextField<String>();
|
551 |
column.setEditor(new CellEditor(emailChp));
|
360 |
column.setEditor(new CellEditor(emailChp));
|
552 |
configs.add(column);
|
361 |
configs.add(column);
|
553 |
|
362 |
|
554 |
coelModele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("statut"));
|
363 |
coelModele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("statut"));
|
555 |
magazinLiStatut = new ListStore<Valeur>();
|
364 |
magazinLiStatut = new ListStore<Valeur>();
|
556 |
magazinLiStatut.add(new ArrayList<Valeur>());
|
365 |
magazinLiStatut.add(new ArrayList<Valeur>());
|
557 |
|
366 |
|
558 |
comboLiStatut = new ComboBox<Valeur>();
|
367 |
comboLiStatut = new ComboBox<Valeur>();
|
559 |
comboLiStatut.setTriggerAction(TriggerAction.ALL);
|
368 |
comboLiStatut.setTriggerAction(TriggerAction.ALL);
|
560 |
comboLiStatut.setEditable(false);
|
369 |
comboLiStatut.setEditable(false);
|
561 |
comboLiStatut.setDisplayField("nom");
|
370 |
comboLiStatut.setDisplayField("nom");
|
562 |
comboLiStatut.setEmptyText("Sélectionez un statut...");
|
371 |
comboLiStatut.setEmptyText("Sélectionez un statut...");
|
563 |
comboLiStatut.setStore(magazinLiStatut);
|
372 |
comboLiStatut.setStore(magazinLiStatut);
|
564 |
|
373 |
|
565 |
CellEditor statutEditor = new CellEditor(comboLiStatut) {
|
374 |
CellEditor statutEditor = new CellEditor(comboLiStatut) {
|
566 |
@Override
|
375 |
@Override
|
567 |
public Object preProcessValue(Object value) {
|
376 |
public Object preProcessValue(Object value) {
|
568 |
if (value == null) {
|
377 |
if (value == null) {
|
569 |
return value;
|
378 |
return value;
|
570 |
}
|
379 |
}
|
571 |
//GWT.log("pre : "+value.toString(), null);
|
380 |
//GWT.log("pre : "+value.toString(), null);
|
572 |
return comboLiStatut.getStore().findModel("nom", (String) value);
|
381 |
return comboLiStatut.getStore().findModel("nom", (String) value);
|
573 |
}
|
382 |
}
|
574 |
|
383 |
|
575 |
@Override
|
384 |
@Override
|
576 |
public Object postProcessValue(Object value) {
|
385 |
public Object postProcessValue(Object value) {
|
577 |
if (value == null) {
|
386 |
if (value == null) {
|
578 |
return value;
|
387 |
return value;
|
579 |
}
|
388 |
}
|
580 |
//GWT.log("post : "+value.toString(), null);
|
389 |
//GWT.log("post : "+value.toString(), null);
|
581 |
return ((Valeur) value).get("nom");
|
390 |
return ((Valeur) value).get("nom");
|
582 |
}
|
391 |
}
|
583 |
};
|
392 |
};
|
584 |
column = new ColumnConfig("statut", "Statut", 100);
|
393 |
column = new ColumnConfig("statut", "Statut", 100);
|
585 |
column.setEditor(statutEditor);
|
394 |
column.setEditor(statutEditor);
|
586 |
configs.add(column);
|
395 |
configs.add(column);
|
587 |
|
396 |
|
588 |
column = new ColumnConfig("tps_w", "Temps travail", 100);
|
397 |
column = new ColumnConfig("tps_w", "Temps travail", 100);
|
589 |
column.setNumberFormat(NumberFormat.getFormat("##"));
|
398 |
column.setNumberFormat(NumberFormat.getFormat("##"));
|
590 |
NumberField tpsWChp = new NumberField();
|
399 |
NumberField tpsWChp = new NumberField();
|
591 |
tpsWChp.setFormat(NumberFormat.getFormat("##"));
|
400 |
tpsWChp.setFormat(NumberFormat.getFormat("##"));
|
592 |
tpsWChp.setToolTip("Ce champ doit contenir un nombre");
|
401 |
tpsWChp.setToolTip("Ce champ doit contenir un nombre");
|
593 |
column.setEditor(new CellEditor(tpsWChp));
|
402 |
column.setEditor(new CellEditor(tpsWChp));
|
594 |
configs.add(column);
|
403 |
configs.add(column);
|
595 |
|
404 |
|
596 |
column = new ColumnConfig("specialites", "Spécialités botaniques", 150);
|
405 |
column = new ColumnConfig("specialites", "Spécialités botaniques", 150);
|
597 |
TextField<String> speChp = new TextField<String>();
|
406 |
TextField<String> speChp = new TextField<String>();
|
598 |
column.setEditor(new CellEditor(speChp));
|
407 |
column.setEditor(new CellEditor(speChp));
|
599 |
configs.add(column);
|
408 |
configs.add(column);
|
600 |
|
409 |
|
601 |
CheckColumnConfig checkColumn = new CheckColumnConfig("mark_contact", "Contact ?", 60);
|
410 |
CheckColumnConfig checkColumn = new CheckColumnConfig("mark_contact", "Contact ?", 60);
|
602 |
configs.add(checkColumn);
|
411 |
configs.add(checkColumn);
|
603 |
|
412 |
|
604 |
ContentPanel cp = new ContentPanel();
|
413 |
ContentPanel cp = new ContentPanel();
|
605 |
cp.setHeading("Personnes travaillant sur les collections");
|
414 |
cp.setHeading("Personnes travaillant sur les collections");
|
606 |
cp.setIconStyle("icone-table");
|
415 |
cp.setIconStyle("icone-table");
|
- |
|
416 |
cp.setScrollMode(Scroll.AUTO);
|
607 |
cp.setLayout(new FitLayout());
|
417 |
cp.setLayout(new FitLayout());
|
- |
|
418 |
cp.setSize(1100, 200);
|
608 |
cp.setFrame(true);
|
419 |
cp.setFrame(true);
|
609 |
|
420 |
|
610 |
ToolBar toolBar = new ToolBar();
|
421 |
ToolBar toolBar = new ToolBar();
|
611 |
|
422 |
|
612 |
TextToolItem ajouterPersonnelBtn = new TextToolItem("Ajouter", "icone-vcard-ajouter");
|
423 |
TextToolItem ajouterPersonnelBtn = new TextToolItem("Ajouter", "icone-vcard-ajouter");
|
613 |
ajouterPersonnelBtn.addSelectionListener(new SelectionListener<ToolBarEvent>() {
|
424 |
ajouterPersonnelBtn.addSelectionListener(new SelectionListener<ToolBarEvent>() {
|
614 |
@Override
|
425 |
@Override
|
615 |
public void componentSelected(ToolBarEvent ce) {
|
426 |
public void componentSelected(ToolBarEvent ce) {
|
616 |
Personne personne = new Personne();
|
427 |
Personne personne = new Personne();
|
617 |
grillePersonnel.stopEditing();
|
428 |
grillePersonnel.stopEditing();
|
618 |
personnelGrilleMagazin.insert(personne, 0);
|
429 |
personnelGrilleMagazin.insert(personne, 0);
|
619 |
grillePersonnel.startEditing(0, 0);
|
430 |
grillePersonnel.startEditing(0, 0);
|
620 |
// Mise à jour du nombre de personnel travaillant sur les collections
|
431 |
// Mise à jour du nombre de personnel travaillant sur les collections
|
621 |
nbreTotalPersonnelChp.setValue(""+grillePersonnel.getStore().getCount());
|
432 |
nbreTotalPersonnelChp.setValue(""+grillePersonnel.getStore().getCount());
|
622 |
// Activation du bouton supprimer si la grille contient un élément
|
433 |
// Activation du bouton supprimer si la grille contient un élément
|
623 |
if (grillePersonnel.getStore().getCount() > 0) {
|
434 |
if (grillePersonnel.getStore().getCount() > 0) {
|
624 |
ce.component.enable();
|
435 |
ce.component.enable();
|
625 |
}
|
436 |
}
|
626 |
}
|
437 |
}
|
627 |
});
|
438 |
});
|
628 |
toolBar.add(ajouterPersonnelBtn);
|
439 |
toolBar.add(ajouterPersonnelBtn);
|
629 |
toolBar.add(new SeparatorToolItem());
|
440 |
toolBar.add(new SeparatorToolItem());
|
630 |
TextToolItem supprimerPersonnelBtn = new TextToolItem("Supprimer", "icone-vcard-supprimer");
|
441 |
TextToolItem supprimerPersonnelBtn = new TextToolItem("Supprimer", "icone-vcard-supprimer");
|
631 |
supprimerPersonnelBtn.addSelectionListener(new SelectionListener<ToolBarEvent>() {
|
442 |
supprimerPersonnelBtn.addSelectionListener(new SelectionListener<ToolBarEvent>() {
|
632 |
@Override
|
443 |
@Override
|
633 |
public void componentSelected(ToolBarEvent ce) {
|
444 |
public void componentSelected(ToolBarEvent ce) {
|
634 |
grillePersonnel.getStore().remove(grillePersonnel.getStore().getAt(0));
|
445 |
grillePersonnel.getStore().remove(grillePersonnel.getStore().getAt(0));
|
635 |
// Mise à jour du nombre de personnel travaillant sur les collections
|
446 |
// Mise à jour du nombre de personnel travaillant sur les collections
|
636 |
nbreTotalPersonnelChp.setValue(""+grillePersonnel.getStore().getCount());
|
447 |
nbreTotalPersonnelChp.setValue(""+grillePersonnel.getStore().getCount());
|
637 |
// Désactivation du bouton supprimer si la grille contient plus d'élément
|
448 |
// Désactivation du bouton supprimer si la grille contient plus d'élément
|
638 |
if (grillePersonnel.getStore().getCount() == 0) {
|
449 |
if (grillePersonnel.getStore().getCount() == 0) {
|
639 |
ce.item.disable();
|
450 |
ce.item.disable();
|
640 |
}
|
451 |
}
|
641 |
}
|
452 |
}
|
642 |
});
|
453 |
});
|
643 |
toolBar.add(supprimerPersonnelBtn);
|
454 |
toolBar.add(supprimerPersonnelBtn);
|
644 |
cp.setTopComponent(toolBar);
|
455 |
cp.setTopComponent(toolBar);
|
645 |
|
456 |
|
646 |
ColumnModel cm = new ColumnModel(configs);
|
457 |
ColumnModel cm = new ColumnModel(configs);
|
647 |
|
458 |
|
648 |
grillePersonnel = new EditorGrid<Personne>(personnelGrilleMagazin, cm);
|
459 |
grillePersonnel = new EditorGrid<Personne>(personnelGrilleMagazin, cm);
|
649 |
grillePersonnel.setBorders(true);
|
460 |
grillePersonnel.setBorders(true);
|
650 |
grillePersonnel.setSelectionModel(sm);
|
461 |
grillePersonnel.setSelectionModel(sm);
|
651 |
grillePersonnel.addPlugin(sm);
|
462 |
grillePersonnel.addPlugin(sm);
|
652 |
grillePersonnel.addPlugin(checkColumn);
|
463 |
grillePersonnel.addPlugin(checkColumn);
|
653 |
grillePersonnel.setSize(1010, 400);
|
464 |
grillePersonnel.setAutoExpandColumn("specialites");
|
654 |
|
465 |
|
655 |
cp.add(grillePersonnel);
|
466 |
cp.add(grillePersonnel);
|
656 |
return cp;
|
467 |
return cp;
|
657 |
}
|
468 |
}
|
- |
|
469 |
|
- |
|
470 |
private TabItem creerOngletIdentification() {
|
- |
|
471 |
//+-----------------------------------------------------------------------------------------------------------+
|
- |
|
472 |
// Onlget formulaire IDENTIFICATION
|
- |
|
473 |
TabItem identificationOnglet = new TabItem();
|
- |
|
474 |
identificationOnglet.setText("Identification");
|
- |
|
475 |
identificationOnglet.setLayout(new FormLayout());
|
- |
|
476 |
|
- |
|
477 |
//+-----------------------------------------------------------------------------------------------------------+
|
- |
|
478 |
// Fieldset IDENTITÉ
|
- |
|
479 |
FieldSet fieldSetIdentite = new FieldSet();
|
- |
|
480 |
fieldSetIdentite.setHeading("Identité");
|
- |
|
481 |
fieldSetIdentite.setCollapsible(true);
|
- |
|
482 |
fieldSetIdentite.setLayout(creerFormLayout(200, LabelAlign.LEFT, 4));
|
- |
|
483 |
|
- |
|
484 |
TextField<String> nomStructureChp = new TextField<String>();
|
- |
|
485 |
nomStructureChp.setFieldLabel("Nom de la structure");
|
- |
|
486 |
nomStructureChp.setAllowBlank(false);
|
- |
|
487 |
nomStructureChp.getMessages().setBlankText("Ce champ est obligatoire.");
|
- |
|
488 |
fieldSetIdentite.add(nomStructureChp, new FormData(450, 0));
|
- |
|
489 |
|
- |
|
490 |
// Création du sous-formulaire : Acronyme
|
- |
|
491 |
LayoutContainer ligne = new LayoutContainer();
|
- |
|
492 |
ligne.setLayout(new ColumnLayout());
|
- |
|
493 |
LayoutContainer gauche = new LayoutContainer();
|
- |
|
494 |
gauche.setLayout(creerFormLayout(200, LabelAlign.LEFT, 0));
|
- |
|
495 |
LayoutContainer droite = new LayoutContainer();
|
- |
|
496 |
droite.setLayout(creerFormLayout(0, null, 0));
|
- |
|
497 |
|
- |
|
498 |
ListStore<InterneValeur> acronymes = new ListStore<InterneValeur>();
|
- |
|
499 |
acronymes.add(InterneValeurListe.getTypeAcronyme());
|
- |
|
500 |
|
- |
|
501 |
comboAcronyme = new ComboBox<InterneValeur>();
|
- |
|
502 |
comboAcronyme.setEmptyText("Sélectioner un type d'acronyme...");
|
- |
|
503 |
comboAcronyme.setFieldLabel("Acronymes");
|
- |
|
504 |
comboAcronyme.setDisplayField("nom");
|
- |
|
505 |
comboAcronyme.setStore(acronymes);
|
- |
|
506 |
comboAcronyme.setEditable(false);
|
- |
|
507 |
comboAcronyme.setTypeAhead(true);
|
- |
|
508 |
comboAcronyme.setTriggerAction(TriggerAction.ALL);
|
- |
|
509 |
comboAcronyme.addSelectionChangedListener(new SelectionChangedListener<InterneValeur>() {
|
- |
|
510 |
@Override
|
- |
|
511 |
public void selectionChanged(SelectionChangedEvent<InterneValeur> se) {
|
- |
|
512 |
String acronymeAbr = se.getSelectedItem().getAbr();
|
- |
|
513 |
if (acronymeAbr.equals("IH")) {
|
- |
|
514 |
mnhnChp.hide();
|
- |
|
515 |
ihChp.show();
|
- |
|
516 |
} else if (acronymeAbr.equals("MNHN")) {
|
- |
|
517 |
ihChp.hide();
|
- |
|
518 |
mnhnChp.show();
|
- |
|
519 |
} else if (acronymeAbr.equals("")) {
|
- |
|
520 |
ihChp.hide();
|
- |
|
521 |
mnhnChp.hide();
|
- |
|
522 |
comboAcronyme.clearSelections();
|
- |
|
523 |
}
|
- |
|
524 |
}
|
- |
|
525 |
});
|
- |
|
526 |
gauche.add(comboAcronyme);
|
- |
|
527 |
|
- |
|
528 |
ihChp = new TextField<String>();
|
- |
|
529 |
//ihChp.setEmptyText("Index Herbariorum");
|
- |
|
530 |
ihChp.setLabelSeparator("");
|
- |
|
531 |
ihChp.setToolTip("Index Herbariorum : herbier de plus de 5000 échantillons");
|
- |
|
532 |
ihChp.hide();
|
- |
|
533 |
droite.add(ihChp);
|
- |
|
534 |
|
- |
|
535 |
mnhnChp = new TextField<String>();
|
- |
|
536 |
//mnhnChp.setEmptyText("MNHN");
|
- |
|
537 |
mnhnChp.setLabelSeparator("");
|
- |
|
538 |
mnhnChp.setToolTip("Acronyme MNHN : herbier de moins de 5000 échantillons");
|
- |
|
539 |
mnhnChp.hide();
|
- |
|
540 |
droite.add(mnhnChp);
|
- |
|
541 |
|
- |
|
542 |
ligne.add(gauche, new ColumnData(0.5));
|
- |
|
543 |
ligne.add(droite, new ColumnData(0.5));
|
- |
|
544 |
fieldSetIdentite.add(ligne);
|
- |
|
545 |
|
- |
|
546 |
// Création du sous-formulaire : Type de Structure
|
- |
|
547 |
LayoutContainer ligneTs = new LayoutContainer();
|
- |
|
548 |
ligneTs.setLayout(new ColumnLayout());
|
- |
|
549 |
|
- |
|
550 |
LayoutContainer gaucheTs = new LayoutContainer();
|
- |
|
551 |
gaucheTs.setLayout(creerFormLayout(200, LabelAlign.LEFT, 0));
|
- |
|
552 |
|
- |
|
553 |
LayoutContainer droiteTs = new LayoutContainer();
|
- |
|
554 |
droiteTs.setLayout(creerFormLayout(0, null, 0));
|
- |
|
555 |
|
- |
|
556 |
ListStore<InterneValeur> typesStructure = new ListStore<InterneValeur>();
|
- |
|
557 |
typesStructure.add(InterneValeurListe.getTypeStructure());
|
- |
|
558 |
|
- |
|
559 |
this.comboTypeStructure = new ComboBox<InterneValeur>();
|
- |
|
560 |
comboTypeStructure.setEmptyText("Sélectioner un type de structure...");
|
- |
|
561 |
comboTypeStructure.setFieldLabel("Statut des structures");
|
- |
|
562 |
comboTypeStructure.setDisplayField("nom");
|
- |
|
563 |
comboTypeStructure.setStore(typesStructure);
|
- |
|
564 |
comboTypeStructure.setEditable(false);
|
- |
|
565 |
comboTypeStructure.setTypeAhead(true);
|
- |
|
566 |
comboTypeStructure.setTriggerAction(TriggerAction.ALL);
|
- |
|
567 |
comboTypeStructure.addSelectionChangedListener(new SelectionChangedListener<InterneValeur>() {
|
- |
|
568 |
@Override
|
- |
|
569 |
public void selectionChanged(SelectionChangedEvent<InterneValeur> se) {
|
- |
|
570 |
String typeAbr = se.getSelectedItem().getAbr();
|
- |
|
571 |
if (typeAbr.equals("stpu")) {
|
- |
|
572 |
comboLstpr.hide();
|
- |
|
573 |
comboLstpu.show();
|
- |
|
574 |
} else if (typeAbr.equals("stpr")) {
|
- |
|
575 |
comboLstpu.hide();
|
- |
|
576 |
comboLstpr.show();
|
- |
|
577 |
} else if (typeAbr.equals("")) {
|
- |
|
578 |
comboLstpr.hide();
|
- |
|
579 |
comboLstpu.hide();
|
- |
|
580 |
comboTypeStructure.clearSelections();
|
- |
|
581 |
}
|
- |
|
582 |
}
|
- |
|
583 |
});
|
- |
|
584 |
gaucheTs.add(comboTypeStructure);
|
- |
|
585 |
|
- |
|
586 |
coelModele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("stpu"));
|
- |
|
587 |
magazinLstpu = new ListStore<Valeur>();
|
- |
|
588 |
magazinLstpu.add(new ArrayList<Valeur>());
|
- |
|
589 |
comboLstpu = new ComboBox<Valeur>();
|
- |
|
590 |
//comboLstpu.setFieldLabel("Statut des structures publiques");
|
- |
|
591 |
comboLstpu.setLabelSeparator("");
|
- |
|
592 |
comboLstpu.setDisplayField("nom");
|
- |
|
593 |
comboLstpu.setEditable(false);
|
- |
|
594 |
comboLstpu.setTriggerAction(TriggerAction.ALL);
|
- |
|
595 |
comboLstpu.setStore(magazinLstpu);
|
- |
|
596 |
comboLstpu.hide();
|
- |
|
597 |
droiteTs.add(comboLstpu);
|
- |
|
598 |
|
- |
|
599 |
coelModele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("stpr"));
|
- |
|
600 |
magazinLstpr = new ListStore<Valeur>();
|
- |
|
601 |
magazinLstpr.add(new ArrayList<Valeur>());
|
- |
|
602 |
comboLstpr = new ComboBox<Valeur>();
|
- |
|
603 |
//comboLstpr.setFieldLabel("Statut des structures privées");
|
- |
|
604 |
comboLstpr.setLabelSeparator("");
|
- |
|
605 |
comboLstpr.setDisplayField("nom");
|
- |
|
606 |
comboLstpr.setEditable(false);
|
- |
|
607 |
comboLstpr.setTriggerAction(TriggerAction.ALL);
|
- |
|
608 |
comboLstpr.setStore(magazinLstpr);
|
- |
|
609 |
comboLstpr.hide();
|
- |
|
610 |
droiteTs.add(comboLstpr);
|
- |
|
611 |
|
- |
|
612 |
ligneTs.add(gaucheTs, new ColumnData(0.5));
|
- |
|
613 |
ligneTs.add(droiteTs, new ColumnData(0.5));
|
- |
|
614 |
fieldSetIdentite.add(ligneTs);
|
- |
|
615 |
|
- |
|
616 |
DateField dateFondationChp = new DateField();
|
- |
|
617 |
dateFondationChp.setFieldLabel("Date de fondation");
|
- |
|
618 |
dateFondationChp.getPropertyEditor().getFormat();
|
- |
|
619 |
dateFondationChp.getPropertyEditor().setFormat(DateTimeFormat.getFormat("dd/MM/yyyy"));
|
- |
|
620 |
dateFondationChp.getMessages().setInvalidText("La valeur saisie n'est pas une date valide. La date doit être au format «jj/mm/aaaa».");
|
- |
|
621 |
fieldSetIdentite.add(dateFondationChp);
|
- |
|
622 |
|
- |
|
623 |
identificationOnglet.add(fieldSetIdentite);
|
- |
|
624 |
|
- |
|
625 |
//+-----------------------------------------------------------------------------------------------------------+
|
- |
|
626 |
// Fieldset ADRESSE
|
- |
|
627 |
LayoutContainer principalFdAdresse = new LayoutContainer();
|
- |
|
628 |
principalFdAdresse.setLayout(new ColumnLayout());
|
- |
|
629 |
|
- |
|
630 |
LayoutContainer gaucheFdAdresse = new LayoutContainer();
|
- |
|
631 |
gaucheFdAdresse.setLayout(creerFormLayout(100, LabelAlign.LEFT, 0));
|
- |
|
632 |
|
- |
|
633 |
LayoutContainer droiteFdAdresse = new LayoutContainer();
|
- |
|
634 |
droiteFdAdresse.setLayout(creerFormLayout(100, LabelAlign.LEFT, 0));
|
- |
|
635 |
|
- |
|
636 |
FieldSet fieldSetAdresse = new FieldSet();
|
- |
|
637 |
fieldSetAdresse.setHeading("Adresse");
|
- |
|
638 |
fieldSetAdresse.setCollapsible(true);
|
- |
|
639 |
|
- |
|
640 |
fieldSetAdresse.setLayout(creerFormLayout(100, LabelAlign.LEFT, 4));
|
- |
|
641 |
|
- |
|
642 |
TextField<String> adrChp = new TextField<String>();
|
- |
|
643 |
adrChp.setFieldLabel("Adresse");
|
- |
|
644 |
fieldSetAdresse.add(adrChp, new FormData(550, 0));
|
- |
|
645 |
|
- |
|
646 |
TextField<String> cpChp = new TextField<String>();
|
- |
|
647 |
cpChp.setFieldLabel("Code postal");
|
- |
|
648 |
gaucheFdAdresse.add(cpChp);
|
- |
|
649 |
|
- |
|
650 |
TextField<String> villeChp = new TextField<String>();
|
- |
|
651 |
villeChp.setFieldLabel("Ville");
|
- |
|
652 |
droiteFdAdresse.add(villeChp);
|
- |
|
653 |
|
- |
|
654 |
TextField<String> regionChp = new TextField<String>();
|
- |
|
655 |
regionChp.setFieldLabel("Région");
|
- |
|
656 |
gaucheFdAdresse.add(regionChp);
|
- |
|
657 |
|
- |
|
658 |
TextField<String> paysChp = new TextField<String>();
|
- |
|
659 |
paysChp.setFieldLabel("Pays");
|
- |
|
660 |
droiteFdAdresse.add(paysChp);
|
- |
|
661 |
|
- |
|
662 |
principalFdAdresse.add(gaucheFdAdresse, new ColumnData(.5));
|
- |
|
663 |
principalFdAdresse.add(droiteFdAdresse, new ColumnData(.5));
|
- |
|
664 |
fieldSetAdresse.add(principalFdAdresse);
|
- |
|
665 |
identificationOnglet.add(fieldSetAdresse);
|
- |
|
666 |
|
- |
|
667 |
//+-----------------------------------------------------------------------------------------------------------+
|
- |
|
668 |
// Fieldset TÉLÉPHONE et EMAIL
|
- |
|
669 |
LayoutContainer principalFdTelMail = new LayoutContainer();
|
- |
|
670 |
principalFdTelMail.setLayout(new ColumnLayout());
|
- |
|
671 |
|
- |
|
672 |
LayoutContainer gaucheFdTelMail = new LayoutContainer();
|
- |
|
673 |
gaucheFdTelMail.setLayout(creerFormLayout(100, LabelAlign.LEFT, 0));
|
- |
|
674 |
|
- |
|
675 |
LayoutContainer droiteFdTelMail = new LayoutContainer();
|
- |
|
676 |
droiteFdTelMail.setLayout(creerFormLayout(100, LabelAlign.LEFT, 0));
|
- |
|
677 |
|
- |
|
678 |
FieldSet fieldSetTelMail = new FieldSet();
|
- |
|
679 |
fieldSetTelMail.setHeading("Communication");
|
- |
|
680 |
fieldSetTelMail.setCollapsible(true);
|
- |
|
681 |
|
- |
|
682 |
fieldSetTelMail.setLayout(creerFormLayout(200, LabelAlign.LEFT, 4));
|
- |
|
683 |
|
- |
|
684 |
TextField<String> telChp = new TextField<String>();
|
- |
|
685 |
telChp.setFieldLabel("Téléphone");
|
- |
|
686 |
gaucheFdTelMail.add(telChp);
|
- |
|
687 |
|
- |
|
688 |
TextField<String> faxChp = new TextField<String>();
|
- |
|
689 |
faxChp.setFieldLabel("Fax");
|
- |
|
690 |
droiteFdTelMail.add(faxChp);
|
- |
|
691 |
|
- |
|
692 |
TextField<String> emailChp = new TextField<String>();
|
- |
|
693 |
emailChp.setFieldLabel("Courriel");
|
- |
|
694 |
emailChp.setToolTip("Saisir le courriel de l'organisation, pas de courriel individuel. Ex. : accueil@organisation.org");
|
- |
|
695 |
gaucheFdTelMail.add(emailChp);
|
- |
|
696 |
|
- |
|
697 |
TextField<String> urlChp = new TextField<String>();
|
- |
|
698 |
urlChp.setFieldLabel("Site web");
|
- |
|
699 |
droiteFdTelMail.add(urlChp);
|
- |
|
700 |
|
- |
|
701 |
principalFdTelMail.add(gaucheFdTelMail, new ColumnData(.5));
|
- |
|
702 |
principalFdTelMail.add(droiteFdTelMail, new ColumnData(.5));
|
- |
|
703 |
fieldSetTelMail.add(principalFdTelMail);
|
- |
|
704 |
identificationOnglet.add(fieldSetTelMail);
|
- |
|
705 |
|
- |
|
706 |
return identificationOnglet;
|
- |
|
707 |
}
|
658 |
|
708 |
|
- |
|
709 |
/** Méthode simplifiant la création de FormLayout.
|
659 |
/** Méthode simplifiant la création de FormLayout.
|
710 |
* Chacun des paramètres peut prendre la valeur null pour utiliser la valeur par défaut.
|
660 |
*
|
711 |
*
|
661 |
* @param labelWidth largeur des labels
|
712 |
* @param labelWidth largeur des labels.
|
662 |
* @param labelAlign alignement des labels
|
713 |
* @param labelAlign alignement des labels
|
663 |
* @param padding padding du layout
|
714 |
* @param padding padding du layout
|
664 |
* @return
|
715 |
* @return
|
665 |
*/
|
716 |
*/
|
666 |
private FormLayout creerFormLayout(Integer labelWidth, LabelAlign labelAlign, Integer padding) {
|
717 |
private FormLayout creerFormLayout(Integer labelWidth, LabelAlign labelAlign, Integer padding) {
|
667 |
FormLayout formLayout = new FormLayout();
|
718 |
FormLayout formLayout = new FormLayout();
|
- |
|
719 |
if (labelWidth != null) {
|
668 |
formLayout.setLabelWidth(labelWidth);
|
720 |
formLayout.setLabelWidth(labelWidth);
|
- |
|
721 |
}
|
- |
|
722 |
if (labelAlign != null) {
|
669 |
formLayout.setLabelAlign(labelAlign);
|
723 |
formLayout.setLabelAlign(labelAlign);
|
- |
|
724 |
}
|
670 |
if (padding != null) {
|
725 |
if (padding != null) {
|
671 |
formLayout.setPadding(padding);
|
726 |
formLayout.setPadding(padding);
|
672 |
}
|
727 |
}
|
673 |
return formLayout;
|
728 |
return formLayout;
|
674 |
}
|
729 |
}
|
675 |
|
730 |
|
676 |
/** Méthode simplifiant la création de bouton radio oui/non
|
731 |
/** Méthode simplifiant la création de bouton radio oui/non
|
677 |
*
|
732 |
*
|
678 |
* @param listeNom nom de la liste de valeur
|
733 |
* @param listeNom nom de la liste de valeur
|
679 |
* @return
|
734 |
* @return
|
680 |
*/
|
735 |
*/
|
681 |
private void creerChoixUniqueBr(RadioGroup radioGroup, String attributNom ) {
|
736 |
private void creerChoixUniqueBr(RadioGroup radioGroup, String attributNom ) {
|
682 |
Radio ouiRadio = new Radio();
|
737 |
Radio ouiRadio = new Radio();
|
683 |
ouiRadio.setName(attributNom);
|
738 |
ouiRadio.setName(attributNom);
|
684 |
ouiRadio.setBoxLabel("Oui");
|
739 |
ouiRadio.setBoxLabel("Oui");
|
685 |
//ouiRadio.setValue(true);
|
740 |
//ouiRadio.setValue(true);
|
686 |
|
741 |
|
687 |
Radio nonRadio = new Radio();
|
742 |
Radio nonRadio = new Radio();
|
688 |
nonRadio.setName(attributNom);
|
743 |
nonRadio.setName(attributNom);
|
689 |
nonRadio.setBoxLabel("Non");
|
744 |
nonRadio.setBoxLabel("Non");
|
690 |
|
745 |
|
691 |
radioGroup.add(ouiRadio);
|
746 |
radioGroup.add(ouiRadio);
|
692 |
radioGroup.add(nonRadio);
|
747 |
radioGroup.add(nonRadio);
|
693 |
}
|
748 |
}
|
694 |
|
749 |
|
695 |
/** Méthode simplifiant la création de choix multiple sous forme de case à cocher.
|
750 |
/** Méthode simplifiant la création de choix multiple sous forme de case à cocher.
|
696 |
* Apelle un service retournant la liste des valeurs représentant les cases à cocher.
|
751 |
* Apelle un service retournant la liste des valeurs représentant les cases à cocher.
|
697 |
* Ajoute ou pas un champ "Autre".
|
752 |
* Ajoute ou pas un champ "Autre".
|
698 |
*
|
753 |
*
|
699 |
* @param listeNom nom de la liste de valeur
|
754 |
* @param listeNom nom de la liste de valeur
|
700 |
* @return
|
755 |
* @return
|
701 |
*/
|
756 |
*/
|
702 |
private ContentPanel creerChoixMultipleCp(String listeNom) {
|
757 |
private ContentPanel creerChoixMultipleCp(String listeNom) {
|
703 |
coelModele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(listeNom));
|
758 |
coelModele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(listeNom));
|
704 |
ContentPanel cp = new ContentPanel();
|
759 |
ContentPanel cp = new ContentPanel();
|
705 |
cp.setLayout(creerFormLayout(650, LabelAlign.TOP, 0));
|
760 |
cp.setLayout(creerFormLayout(650, LabelAlign.TOP, 0));
|
706 |
cp.setWidth("100%");
|
- |
|
707 |
cp.setHeaderVisible(false);
|
761 |
cp.setHeaderVisible(false);
|
708 |
return cp;
|
762 |
return cp;
|
709 |
}
|
763 |
}
|
710 |
|
764 |
|
711 |
/** Méthode simplifiant la création de choix multiple sous forme de case à cocher.
|
765 |
/** Méthode simplifiant la création de choix multiple sous forme de case à cocher.
|
712 |
* Apelle un service retournant la liste des valeurs représentant les cases à cocher.
|
766 |
* Apelle un service retournant la liste des valeurs représentant les cases à cocher.
|
713 |
* Ajoute ou pas un champ "Autre".
|
767 |
* Ajoute ou pas un champ "Autre".
|
714 |
*
|
768 |
*
|
715 |
* @param cp panneau conteant le groupe de case à cocher
|
769 |
* @param cp panneau conteant le groupe de case à cocher
|
716 |
* @param cacGroup le groupe de case à cocher
|
770 |
* @param cacGroup le groupe de case à cocher
|
717 |
* @param labelTxt le texte du champ
|
771 |
* @param labelTxt le texte du champ
|
718 |
* @param listeValeurs la liste de valeurs à transformer en case à cocher
|
772 |
* @param listeValeurs la liste de valeurs à transformer en case à cocher
|
719 |
* @param boolAutreChp booléen indiquant si oui ou non le champ autre doit apparaître
|
773 |
* @param boolAutreChp booléen indiquant si oui ou non le champ autre doit apparaître
|
720 |
* @return
|
774 |
* @return
|
721 |
*/
|
775 |
*/
|
722 |
private void creerChoixMultipleCac(ContentPanel cp, CheckBoxGroup cacGroupe, String labelTxt, ValeurListe listeValeurs, Boolean boolAutreChp) {
|
776 |
private void creerChoixMultipleCac(ContentPanel cp, CheckBoxGroup cacGroupe, String labelTxt, ValeurListe listeValeurs, Boolean boolAutreChp) {
|
723 |
cacGroupe.setFieldLabel(labelTxt);
|
777 |
cacGroupe.setFieldLabel(labelTxt);
|
- |
|
778 |
cacGroupe.setAutoWidth(true);
|
724 |
for (Iterator<String> it = listeValeurs.keySet().iterator(); it.hasNext();) {
|
779 |
for (Iterator<String> it = listeValeurs.keySet().iterator(); it.hasNext();) {
|
725 |
String nom = listeValeurs.get(it.next()).get("nom");
|
780 |
String nom = listeValeurs.get(it.next()).get("nom");
|
726 |
CheckBox cac = new CheckBox();
|
781 |
CheckBox cac = new CheckBox();
|
- |
|
782 |
// TODO : supprimer le code ci-dessous si inutile
|
- |
|
783 |
/*
|
727 |
GWT.log("Taille '"+nom+"' : "+nom.length(), null);
|
784 |
//GWT.log("Taille '"+nom+"' : "+nom.length(), null);
|
728 |
// Calcul de la largeur de la checkbox en fonction de la taille du label
|
785 |
// Calcul de la largeur de la checkbox en fonction de la taille du label
|
729 |
int largeur = nom.length()*10;
|
786 |
int largeur = nom.length()*10;
|
730 |
if (nom.length() > 15) {
|
787 |
if (nom.length() > 15) {
|
731 |
largeur = 170;
|
788 |
largeur = 170;
|
732 |
}
|
789 |
}
|
733 |
if (nom.length() > 25) {
|
790 |
if (nom.length() > 25) {
|
734 |
largeur = 250;
|
791 |
largeur = 250;
|
735 |
}
|
792 |
}
|
736 |
cac.setWidth(largeur);
|
793 |
cac.setWidth(largeur);
|
- |
|
794 |
*/
|
737 |
cac.setBoxLabel(nom);
|
795 |
cac.setBoxLabel(nom);
|
738 |
cacGroupe.add(cac);
|
796 |
cacGroupe.add(cac);
|
739 |
}
|
797 |
}
|
740 |
cp.add(cacGroupe);
|
798 |
cp.add(cacGroupe);
|
741 |
|
799 |
|
742 |
if (boolAutreChp == true) {
|
800 |
if (boolAutreChp == true) {
|
743 |
ContentPanel autreCp = new ContentPanel();
|
801 |
ContentPanel autreCp = new ContentPanel();
|
744 |
autreCp.setLayout(creerFormLayout(75, LabelAlign.TOP, 0));
|
802 |
autreCp.setLayout(creerFormLayout(75, LabelAlign.TOP, 0));
|
745 |
autreCp.setHeaderVisible(false);
|
803 |
autreCp.setHeaderVisible(false);
|
746 |
TextField<String> autreTrukLocalStockageChp = new TextField<String>();
|
804 |
TextField<String> autreTrukLocalStockageChp = new TextField<String>();
|
747 |
autreTrukLocalStockageChp.setFieldLabel("Autre");
|
805 |
autreTrukLocalStockageChp.setFieldLabel("Autre");
|
748 |
autreTrukLocalStockageChp.setLabelStyle("font-weight:normal;");
|
806 |
autreTrukLocalStockageChp.setLabelStyle("font-weight:normal;");
|
749 |
autreTrukLocalStockageChp.setWidth(300);
|
807 |
autreTrukLocalStockageChp.setWidth(300);
|
750 |
autreCp.add(autreTrukLocalStockageChp);
|
808 |
autreCp.add(autreTrukLocalStockageChp);
|
751 |
cp.add(autreCp);
|
809 |
cp.add(autreCp);
|
752 |
}
|
810 |
}
|
753 |
|
811 |
|
754 |
cp.layout();
|
812 |
cp.layout();
|
755 |
}
|
813 |
}
|
756 |
|
814 |
|
757 |
public void rafraichir(Object nouvelleDonnees) {
|
815 |
public void rafraichir(Object nouvelleDonnees) {
|
758 |
if (nouvelleDonnees instanceof ValeurListe) {
|
816 |
if (nouvelleDonnees instanceof ValeurListe) {
|
759 |
ValeurListe listeValeurs = (ValeurListe) nouvelleDonnees;
|
817 |
ValeurListe listeValeurs = (ValeurListe) nouvelleDonnees;
|
760 |
|
818 |
|
761 |
List<Valeur> liste = new ArrayList<Valeur>();
|
819 |
List<Valeur> liste = new ArrayList<Valeur>();
|
762 |
for (Iterator<String> it = listeValeurs.keySet().iterator(); it.hasNext();) {
|
820 |
for (Iterator<String> it = listeValeurs.keySet().iterator(); it.hasNext();) {
|
763 |
liste.add(listeValeurs.get(it.next()));
|
821 |
liste.add(listeValeurs.get(it.next()));
|
764 |
}
|
822 |
}
|
765 |
// Test pour savoir si la liste contient des éléments
|
823 |
// Test pour savoir si la liste contient des éléments
|
766 |
if (liste.size() > 0) {
|
824 |
if (liste.size() > 0) {
|
767 |
Configuration config = (Configuration) Registry.get(RegistreId.CONFIG);
|
825 |
Configuration config = (Configuration) Registry.get(RegistreId.CONFIG);
|
768 |
if (listeValeurs.getId().equals(config.getListeId("stpr"))) {
|
826 |
if (listeValeurs.getId().equals(config.getListeId("stpr"))) {
|
769 |
magazinLstpr.removeAll();
|
827 |
magazinLstpr.removeAll();
|
770 |
magazinLstpr.add(liste);
|
828 |
magazinLstpr.add(liste);
|
771 |
comboLstpr.setStore(magazinLstpr);
|
829 |
comboLstpr.setStore(magazinLstpr);
|
772 |
}
|
830 |
}
|
773 |
if (listeValeurs.getId().equals(config.getListeId("stpu"))) {
|
831 |
if (listeValeurs.getId().equals(config.getListeId("stpu"))) {
|
774 |
magazinLstpu.removeAll();
|
832 |
magazinLstpu.removeAll();
|
775 |
magazinLstpu.add(liste);
|
833 |
magazinLstpu.add(liste);
|
776 |
comboLstpu.setStore(magazinLstpu);
|
834 |
comboLstpu.setStore(magazinLstpu);
|
777 |
}
|
835 |
}
|
778 |
if (listeValeurs.getId().equals(config.getListeId("statut"))) {
|
836 |
if (listeValeurs.getId().equals(config.getListeId("statut"))) {
|
779 |
magazinLiStatut.removeAll();
|
837 |
magazinLiStatut.removeAll();
|
780 |
magazinLiStatut.add(liste);
|
838 |
magazinLiStatut.add(liste);
|
781 |
comboLiStatut.setStore(magazinLiStatut);
|
839 |
comboLiStatut.setStore(magazinLiStatut);
|
782 |
}
|
840 |
}
|
783 |
if (listeValeurs.getId().equals(config.getListeId("fonction"))) {
|
841 |
if (listeValeurs.getId().equals(config.getListeId("fonction"))) {
|
784 |
magazinLiFonction.removeAll();
|
842 |
magazinLiFonction.removeAll();
|
785 |
magazinLiFonction.add(liste);
|
843 |
magazinLiFonction.add(liste);
|
786 |
comboLiFonction.setStore(magazinLiFonction);
|
844 |
comboLiFonction.setStore(magazinLiFonction);
|
787 |
}
|
845 |
}
|
788 |
if (listeValeurs.getId().equals(config.getListeId("localStockage"))) {
|
846 |
if (listeValeurs.getId().equals(config.getListeId("localStockage"))) {
|
789 |
trukLocalStockageCacGrpChp = new CheckBoxGroup();
|
847 |
trukLocalStockageCacGrpChp = new CheckBoxGroup();
|
790 |
String labelTxt = "Avez vous des locaux spécifiques de stockage des collections botaniques ?";
|
848 |
String labelTxt = "Avez vous des locaux spécifiques de stockage des collections botaniques ?";
|
791 |
creerChoixMultipleCac(trukLocalStockageCp, trukLocalStockageCacGrpChp, labelTxt, listeValeurs, true);
|
849 |
creerChoixMultipleCac(trukLocalStockageCp, trukLocalStockageCacGrpChp, labelTxt, listeValeurs, true);
|
792 |
}
|
850 |
}
|
793 |
if (listeValeurs.getId().equals(config.getListeId("meubleStockage"))) {
|
851 |
if (listeValeurs.getId().equals(config.getListeId("meubleStockage"))) {
|
- |
|
852 |
trukMeubleStockageCp.setToolTip(new ToolTipConfig("Rayonnages mobiles", "rayonnages sur rails pouvant être déplacés, manuellement ou automatiquement, de façon à utiliser l'espace ordinairement occupé par les allées de desserte entre travées."));
|
794 |
trukMeubleStockageCacGrpChp = new CheckBoxGroup();
|
853 |
trukMeubleStockageCacGrpChp = new CheckBoxGroup();
|
795 |
String labelTxt = "Avez vous des meubles spécifiques au stockage des collections botaniques ?";
|
854 |
String labelTxt = "Avez vous des meubles spécifiques au stockage des collections botaniques ?";
|
796 |
creerChoixMultipleCac(trukMeubleStockageCp, trukMeubleStockageCacGrpChp, labelTxt, listeValeurs, true);
|
855 |
creerChoixMultipleCac(trukMeubleStockageCp, trukMeubleStockageCacGrpChp, labelTxt, listeValeurs, true);
|
797 |
}
|
856 |
}
|
798 |
if (listeValeurs.getId().equals(config.getListeId("parametreStockage"))) {
|
857 |
if (listeValeurs.getId().equals(config.getListeId("parametreStockage"))) {
|
799 |
trukParametreStockageCacGrpChp = new CheckBoxGroup();
|
858 |
trukParametreStockageCacGrpChp = new CheckBoxGroup();
|
800 |
String labelTxt = "Quels paramètres maîtrisez vous ?";
|
859 |
String labelTxt = "Quels paramètres maîtrisez vous ?";
|
801 |
creerChoixMultipleCac(trukParametreStockageCp, trukParametreStockageCacGrpChp, labelTxt, listeValeurs, true);
|
860 |
creerChoixMultipleCac(trukParametreStockageCp, trukParametreStockageCacGrpChp, labelTxt, listeValeurs, true);
|
802 |
}
|
861 |
}
|
- |
|
862 |
if (listeValeurs.getId().equals(config.getListeId("autreCollection"))) {
|
- |
|
863 |
trukCollectionAutreCacGrpChp = new CheckBoxGroup();
|
- |
|
864 |
String labelTxt = "Si oui, lesquelles ?";
|
- |
|
865 |
creerChoixMultipleCac(trukCollectionAutreCp, trukCollectionAutreCacGrpChp, labelTxt, listeValeurs, true);
|
- |
|
866 |
}
|
- |
|
867 |
if (listeValeurs.getId().equals(config.getListeId("opRestau"))) {
|
- |
|
868 |
trukOpRestauCacGrpChp = new CheckBoxGroup();
|
- |
|
869 |
String labelTxt = "Si oui, lesquelles ?";
|
- |
|
870 |
creerChoixMultipleCac(trukOpRestauCp, trukOpRestauCacGrpChp, labelTxt, listeValeurs, true);
|
- |
|
871 |
}
|
- |
|
872 |
if (listeValeurs.getId().equals(config.getListeId("onep"))) {
|
- |
|
873 |
ceMaterielConservationCacGrpChp = new CheckBoxGroup();
|
- |
|
874 |
String labelTxt = "Utilisez vous du matériel de conservation ?";
|
- |
|
875 |
ceMaterielConservationCp.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..."));
|
- |
|
876 |
creerChoixMultipleCac(ceMaterielConservationCp, ceMaterielConservationCacGrpChp, labelTxt, listeValeurs, true);
|
- |
|
877 |
}
|
- |
|
878 |
if (listeValeurs.getId().equals(config.getListeId("autreMateriel"))) {
|
- |
|
879 |
trukAutreMaterielCacGrpChp = new CheckBoxGroup();
|
- |
|
880 |
String labelTxt = "Si non, qu'utilisez vous comme matériel ?";
|
- |
|
881 |
creerChoixMultipleCac(trukAutreMaterielCp, trukAutreMaterielCacGrpChp, labelTxt, listeValeurs, true);
|
- |
|
882 |
}
|
- |
|
883 |
if (listeValeurs.getId().equals(config.getListeId("poisonTraitement"))) {
|
- |
|
884 |
trukPoisonTraitementCacGrpChp = new CheckBoxGroup();
|
- |
|
885 |
String labelTxt = "Empoisonnement";
|
- |
|
886 |
trukPoisonTraitementCacGrpChp.setLabelStyle("font-weight:normal;text-decoration:underline;");
|
- |
|
887 |
trukPoisonTraitementCacGrpChp.setLabelSeparator("");
|
- |
|
888 |
creerChoixMultipleCac(trukPoisonTraitementCp, trukPoisonTraitementCacGrpChp, labelTxt, listeValeurs, true);
|
- |
|
889 |
}
|
- |
|
890 |
if (listeValeurs.getId().equals(config.getListeId("insecteTraitement"))) {
|
- |
|
891 |
if (trukTraitementCp.isRendered() && trukTraitementCp.getItemByItemId("trukTraitementCacGrpChp") == null) {
|
- |
|
892 |
trukTraitementCacGrpChp = new CheckBoxGroup();
|
- |
|
893 |
trukTraitementCacGrpChp.setId("trukTraitementCacGrpChp");
|
- |
|
894 |
creerChoixMultipleCac(trukTraitementCp, trukTraitementCacGrpChp, "Si oui, lesquels ?", listeValeurs, true);
|
- |
|
895 |
}
|
- |
|
896 |
if (trukInsecteTraitementCp.isRendered() && trukInsecteTraitementCp.getItemByItemId("trukInsecteTraitementCacGrpChp") == null) {
|
- |
|
897 |
trukInsecteTraitementCacGrpChp = new CheckBoxGroup();
|
- |
|
898 |
trukInsecteTraitementCacGrpChp.setId("trukInsecteTraitementCacGrpChp");
|
- |
|
899 |
trukInsecteTraitementCacGrpChp.setLabelStyle("font-weight:normal;text-decoration:underline;");
|
- |
|
900 |
trukInsecteTraitementCacGrpChp.setLabelSeparator("");
|
- |
|
901 |
creerChoixMultipleCac(trukInsecteTraitementCp, trukInsecteTraitementCacGrpChp, "Désinsectisation", listeValeurs, true);
|
- |
|
902 |
}
|
- |
|
903 |
}
|
803 |
GWT.log("La liste #"+listeValeurs.getId()+" a été reçue!", null);
|
904 |
//GWT.log("La liste #"+listeValeurs.getId()+" a été reçue!", null);
|
804 |
} else {
|
905 |
} else {
|
805 |
GWT.log("La liste #"+listeValeurs.getId()+" ne contient aucune valeurs!", null);
|
906 |
GWT.log("La liste #"+listeValeurs.getId()+" ne contient aucune valeurs!", null);
|
806 |
}
|
907 |
}
|
807 |
}
|
908 |
}
|
808 |
}
|
909 |
}
|
809 |
|
910 |
|
810 |
}
|
911 |
}
|