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.ComposantId;
|
7 |
import org.tela_botanica.client.ComposantId;
|
8 |
import org.tela_botanica.client.Mediateur;
|
8 |
import org.tela_botanica.client.Mediateur;
|
9 |
import org.tela_botanica.client.Modele;
|
9 |
import org.tela_botanica.client.Modele;
|
10 |
import org.tela_botanica.client.RegistreId;
|
10 |
import org.tela_botanica.client.RegistreId;
|
11 |
import org.tela_botanica.client.i18n.Constantes;
|
11 |
import org.tela_botanica.client.i18n.Constantes;
|
12 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
12 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
13 |
import org.tela_botanica.client.modeles.Configuration;
|
13 |
import org.tela_botanica.client.modeles.Configuration;
|
14 |
import org.tela_botanica.client.modeles.Information;
|
14 |
import org.tela_botanica.client.modeles.Information;
|
15 |
import org.tela_botanica.client.modeles.InterneValeur;
|
15 |
import org.tela_botanica.client.modeles.InterneValeur;
|
16 |
import org.tela_botanica.client.modeles.InterneValeurListe;
|
16 |
import org.tela_botanica.client.modeles.InterneValeurListe;
|
17 |
import org.tela_botanica.client.modeles.Personne;
|
17 |
import org.tela_botanica.client.modeles.Personne;
|
18 |
import org.tela_botanica.client.modeles.Structure;
|
18 |
import org.tela_botanica.client.modeles.Structure;
|
- |
|
19 |
import org.tela_botanica.client.modeles.StructureConservation;
|
19 |
import org.tela_botanica.client.modeles.Valeur;
|
20 |
import org.tela_botanica.client.modeles.Valeur;
|
20 |
import org.tela_botanica.client.modeles.ValeurListe;
|
21 |
import org.tela_botanica.client.modeles.ValeurListe;
|
21 |
|
22 |
|
22 |
import com.extjs.gxt.ui.client.Events;
|
23 |
import com.extjs.gxt.ui.client.Events;
|
23 |
import com.extjs.gxt.ui.client.Registry;
|
24 |
import com.extjs.gxt.ui.client.Registry;
|
24 |
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
25 |
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
25 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
26 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
26 |
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
27 |
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
27 |
import com.extjs.gxt.ui.client.event.Listener;
|
28 |
import com.extjs.gxt.ui.client.event.Listener;
|
28 |
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
|
29 |
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
|
29 |
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
|
30 |
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
|
30 |
import com.extjs.gxt.ui.client.event.SelectionListener;
|
31 |
import com.extjs.gxt.ui.client.event.SelectionListener;
|
31 |
import com.extjs.gxt.ui.client.event.ToolBarEvent;
|
32 |
import com.extjs.gxt.ui.client.event.ToolBarEvent;
|
32 |
import com.extjs.gxt.ui.client.store.ListStore;
|
33 |
import com.extjs.gxt.ui.client.store.ListStore;
|
33 |
import com.extjs.gxt.ui.client.store.Store;
|
34 |
import com.extjs.gxt.ui.client.store.Store;
|
34 |
import com.extjs.gxt.ui.client.widget.Component;
|
35 |
import com.extjs.gxt.ui.client.widget.Component;
|
35 |
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
36 |
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
36 |
import com.extjs.gxt.ui.client.widget.Info;
|
37 |
import com.extjs.gxt.ui.client.widget.Info;
|
37 |
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
38 |
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
38 |
import com.extjs.gxt.ui.client.widget.TabItem;
|
39 |
import com.extjs.gxt.ui.client.widget.TabItem;
|
39 |
import com.extjs.gxt.ui.client.widget.TabPanel;
|
40 |
import com.extjs.gxt.ui.client.widget.TabPanel;
|
- |
|
41 |
import com.extjs.gxt.ui.client.widget.WidgetComponent;
|
40 |
import com.extjs.gxt.ui.client.widget.button.Button;
|
42 |
import com.extjs.gxt.ui.client.widget.button.Button;
|
41 |
import com.extjs.gxt.ui.client.widget.form.CheckBox;
|
43 |
import com.extjs.gxt.ui.client.widget.form.CheckBox;
|
42 |
import com.extjs.gxt.ui.client.widget.form.CheckBoxGroup;
|
44 |
import com.extjs.gxt.ui.client.widget.form.CheckBoxGroup;
|
43 |
import com.extjs.gxt.ui.client.widget.form.ComboBox;
|
45 |
import com.extjs.gxt.ui.client.widget.form.ComboBox;
|
44 |
import com.extjs.gxt.ui.client.widget.form.DateField;
|
46 |
import com.extjs.gxt.ui.client.widget.form.DateField;
|
45 |
import com.extjs.gxt.ui.client.widget.form.Field;
|
47 |
import com.extjs.gxt.ui.client.widget.form.Field;
|
46 |
import com.extjs.gxt.ui.client.widget.form.FieldSet;
|
48 |
import com.extjs.gxt.ui.client.widget.form.FieldSet;
|
47 |
import com.extjs.gxt.ui.client.widget.form.FormPanel;
|
49 |
import com.extjs.gxt.ui.client.widget.form.FormPanel;
|
48 |
import com.extjs.gxt.ui.client.widget.form.HiddenField;
|
50 |
import com.extjs.gxt.ui.client.widget.form.HiddenField;
|
49 |
import com.extjs.gxt.ui.client.widget.form.LabelField;
|
51 |
import com.extjs.gxt.ui.client.widget.form.LabelField;
|
50 |
import com.extjs.gxt.ui.client.widget.form.NumberField;
|
52 |
import com.extjs.gxt.ui.client.widget.form.NumberField;
|
51 |
import com.extjs.gxt.ui.client.widget.form.Radio;
|
53 |
import com.extjs.gxt.ui.client.widget.form.Radio;
|
52 |
import com.extjs.gxt.ui.client.widget.form.RadioGroup;
|
54 |
import com.extjs.gxt.ui.client.widget.form.RadioGroup;
|
53 |
import com.extjs.gxt.ui.client.widget.form.TextArea;
|
55 |
import com.extjs.gxt.ui.client.widget.form.TextArea;
|
54 |
import com.extjs.gxt.ui.client.widget.form.TextField;
|
56 |
import com.extjs.gxt.ui.client.widget.form.TextField;
|
55 |
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
|
57 |
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
|
56 |
import com.extjs.gxt.ui.client.widget.form.FormPanel.LabelAlign;
|
58 |
import com.extjs.gxt.ui.client.widget.form.FormPanel.LabelAlign;
|
57 |
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
|
59 |
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
|
58 |
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel;
|
60 |
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel;
|
59 |
import com.extjs.gxt.ui.client.widget.grid.CheckColumnConfig;
|
61 |
import com.extjs.gxt.ui.client.widget.grid.CheckColumnConfig;
|
60 |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
|
62 |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
|
61 |
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
|
63 |
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
|
62 |
import com.extjs.gxt.ui.client.widget.grid.EditorGrid;
|
64 |
import com.extjs.gxt.ui.client.widget.grid.EditorGrid;
|
63 |
import com.extjs.gxt.ui.client.widget.layout.ColumnData;
|
65 |
import com.extjs.gxt.ui.client.widget.layout.ColumnData;
|
64 |
import com.extjs.gxt.ui.client.widget.layout.ColumnLayout;
|
66 |
import com.extjs.gxt.ui.client.widget.layout.ColumnLayout;
|
65 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
67 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
66 |
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
|
68 |
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
|
67 |
import com.extjs.gxt.ui.client.widget.layout.FormData;
|
69 |
import com.extjs.gxt.ui.client.widget.layout.FormData;
|
68 |
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
|
70 |
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
|
69 |
import com.extjs.gxt.ui.client.widget.tips.ToolTipConfig;
|
71 |
import com.extjs.gxt.ui.client.widget.tips.ToolTipConfig;
|
70 |
import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
|
72 |
import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
|
71 |
import com.extjs.gxt.ui.client.widget.toolbar.TextToolItem;
|
73 |
import com.extjs.gxt.ui.client.widget.toolbar.TextToolItem;
|
72 |
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
74 |
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
73 |
import com.google.gwt.core.client.GWT;
|
75 |
import com.google.gwt.core.client.GWT;
|
74 |
import com.google.gwt.i18n.client.DateTimeFormat;
|
76 |
import com.google.gwt.i18n.client.DateTimeFormat;
|
75 |
import com.google.gwt.i18n.client.NumberFormat;
|
77 |
import com.google.gwt.i18n.client.NumberFormat;
|
76 |
import com.google.gwt.user.client.Window;
|
78 |
import com.google.gwt.user.client.Window;
|
- |
|
79 |
import com.google.gwt.user.client.ui.HTML;
|
- |
|
80 |
import com.google.gwt.user.client.ui.Widget;
|
77 |
|
81 |
|
78 |
public class FormStructureVue extends LayoutContainer implements Rafraichissable {
|
82 |
public class FormStructureVue extends LayoutContainer implements Rafraichissable {
|
79 |
|
83 |
|
80 |
private Constantes i18nC = null;
|
84 |
private Constantes i18nC = null;
|
81 |
private Mediateur mediateur = null;
|
85 |
private Mediateur mediateur = null;
|
82 |
private Modele modele = null ;
|
86 |
private Modele modele = null ;
|
83 |
|
87 |
|
84 |
private String mode = "AJOUT";
|
88 |
private String mode = "AJOUT";
|
85 |
private FormPanel structureFormPanneau;
|
89 |
private FormPanel structureFormPanneau;
|
86 |
private int tabIndex = 100;
|
90 |
private int tabIndex = 100;
|
87 |
|
91 |
|
88 |
private ListStore<Valeur> magazinLstpr = null;
|
92 |
private ListStore<Valeur> magazinLstpr = null;
|
89 |
private ComboBox<Valeur> comboLstpr = null;
|
93 |
private ComboBox<Valeur> comboLstpr = null;
|
90 |
private ListStore<Valeur> magazinLstpu = null;
|
94 |
private ListStore<Valeur> magazinLstpu = null;
|
91 |
private ComboBox<Valeur> comboLstpu = null;
|
95 |
private ComboBox<Valeur> comboLstpu = null;
|
92 |
private ListStore<Valeur> magazinLiStatut = null;
|
96 |
private ListStore<Valeur> magazinLiStatut = null;
|
93 |
private ComboBox<Valeur> comboLiStatut = null;
|
97 |
private ComboBox<Valeur> comboLiStatut = null;
|
94 |
private ListStore<Valeur> magazinLiFonction = null;
|
98 |
private ListStore<Valeur> magazinLiFonction = null;
|
95 |
private ComboBox<Valeur> comboLiFonction = null;
|
99 |
private ComboBox<Valeur> comboLiFonction = null;
|
96 |
private ComboBox<InterneValeur> comboAcronyme = null;
|
100 |
private ComboBox<InterneValeur> comboAcronyme = null;
|
97 |
private TextField<String> ihChp = null;
|
101 |
private TextField<String> ihChp = null;
|
98 |
private TextField<String> mnhnChp = null;
|
102 |
private TextField<String> mnhnChp = null;
|
99 |
private ComboBox<InterneValeur> comboTypeStructure = null;
|
103 |
private ComboBox<InterneValeur> comboTypeStructure = null;
|
100 |
private TabItem personnelOnglet = null;
|
104 |
private TabItem personnelOnglet = null;
|
101 |
private EditorGrid<Personne> grillePersonnel = null;
|
105 |
private EditorGrid<Personne> grillePersonnel = null;
|
102 |
private ListStore<Personne> personnelGrilleMagazin = null;
|
106 |
private ListStore<Personne> personnelGrilleMagazin = null;
|
103 |
private LabelField nbreTotalPersonnelChp = null;
|
107 |
private LabelField nbreTotalPersonnelChp = null;
|
104 |
private TabItem conservationOnglet = null;
|
108 |
private TabItem conservationOnglet = null;
|
105 |
private CheckBoxGroup localStockageTrukCacGrpChp = null;
|
109 |
private CheckBoxGroup localStockageTrukCacGrpChp = null;
|
106 |
private ContentPanel localStockageTrukCp = null;
|
110 |
private ContentPanel localStockageTrukCp = null;
|
107 |
private CheckBoxGroup meubleStockageTrukCacGrpChp = null;
|
111 |
private CheckBoxGroup meubleStockageTrukCacGrpChp = null;
|
108 |
private ContentPanel meubleStockageTrukCp = null;
|
112 |
private ContentPanel meubleStockageTrukCp = null;
|
109 |
private CheckBoxGroup parametreStockageTrukCacGrpChp = null;
|
113 |
private CheckBoxGroup parametreStockageTrukCacGrpChp = null;
|
110 |
private ContentPanel parametreStockageTrukCp = null;
|
114 |
private ContentPanel parametreStockageTrukCp = null;
|
111 |
private ContentPanel collectionAutreTrukCp = null;
|
115 |
private ContentPanel collectionAutreTrukCp = null;
|
112 |
private CheckBoxGroup collectionAutreTrukCacGrpChp = null;
|
116 |
private CheckBoxGroup collectionAutreTrukCacGrpChp = null;
|
113 |
private CheckBoxGroup opRestauTrukCacGrpChp = null;
|
117 |
private CheckBoxGroup opRestauTrukCacGrpChp = null;
|
114 |
private ContentPanel opRestauTrukCp = null;
|
118 |
private ContentPanel opRestauTrukCp = null;
|
115 |
private CheckBoxGroup autreMaterielTrukCacGrpChp = null;
|
119 |
private CheckBoxGroup autreMaterielTrukCacGrpChp = null;
|
116 |
private ContentPanel autreMaterielTrukCp = null;
|
120 |
private ContentPanel autreMaterielTrukCp = null;
|
117 |
private ContentPanel traitementTrukCp = null;
|
121 |
private ContentPanel traitementTrukCp = null;
|
118 |
private CheckBoxGroup traitementTrukCacGrpChp = null;
|
122 |
private CheckBoxGroup traitementTrukCacGrpChp = null;
|
119 |
private ContentPanel poisonTraitementTrukCp = null;
|
123 |
private ContentPanel poisonTraitementTrukCp = null;
|
120 |
private ContentPanel insecteTraitementTrukCp = null;
|
124 |
private ContentPanel insecteTraitementTrukCp = null;
|
121 |
private CheckBoxGroup insecteTraitementTrukCacGrpChp = null;
|
125 |
private CheckBoxGroup insecteTraitementTrukCacGrpChp = null;
|
122 |
private CheckBoxGroup poisonTraitementTrukCacGrpChp = null;
|
126 |
private CheckBoxGroup poisonTraitementTrukCacGrpChp = null;
|
123 |
private TabItem valorisationOnglet = null;
|
127 |
private TabItem valorisationOnglet = null;
|
124 |
private ContentPanel actionTrukCp = null;
|
128 |
private ContentPanel actionTrukCp = null;
|
125 |
private CheckBoxGroup actionTrukCacGrpChp = null;
|
129 |
private CheckBoxGroup actionTrukCacGrpChp = null;
|
126 |
private ContentPanel autreCollectionTrukCp = null;
|
130 |
private ContentPanel autreCollectionTrukCp = null;
|
127 |
private CheckBoxGroup autreCollectionTrukCacGrpChp = null;
|
131 |
private CheckBoxGroup autreCollectionTrukCacGrpChp = null;
|
128 |
private ContentPanel provenanceRechercheTrukCp = null;
|
132 |
private ContentPanel provenanceRechercheTrukCp = null;
|
129 |
private CheckBoxGroup provenanceRechercheTrukCacGrpChp = null;
|
133 |
private CheckBoxGroup provenanceRechercheTrukCacGrpChp = null;
|
130 |
private CheckBoxGroup typeRechercheTrukCacGrpChp = null;
|
134 |
private CheckBoxGroup typeRechercheTrukCacGrpChp = null;
|
131 |
private ContentPanel typeRechercheTrukCp = null;
|
135 |
private ContentPanel typeRechercheTrukCp = null;
|
132 |
private TextField<String> futureActionChp = null;
|
136 |
private TextField<String> futureActionChp = null;
|
133 |
private TextField<String> sansMotifAccesChp = null;
|
137 |
private TextField<String> sansMotifAccesChp = null;
|
134 |
private TextField<String> avecMotifAccesChp = null;
|
138 |
private TextField<String> avecMotifAccesChp = null;
|
135 |
private TextField<String> formationChp = null;
|
139 |
private TextField<String> formationChp = null;
|
136 |
private RadioGroup traitementAcquisitionMarkRGrpChp = null;
|
140 |
private RadioGroup traitementAcquisitionMarkRGrpChp = null;
|
137 |
private LabelField traitementAcquisitionMarkLabel = null;
|
141 |
private LabelField traitementAcquisitionMarkLabel = null;
|
138 |
private RadioGroup materielConservationCeRGrpChp = null;
|
142 |
private RadioGroup materielConservationCeRGrpChp = null;
|
139 |
|
143 |
|
140 |
private RadioGroup actionMarkRGrpChp;
|
144 |
private RadioGroup actionMarkRGrpChp;
|
141 |
private TextField<String> nomStructureChp;
|
145 |
private TextField<String> nomStructureChp;
|
142 |
private DateField dateFondationChp;
|
146 |
private DateField dateFondationChp;
|
143 |
private TextArea adrChp;
|
147 |
private TextArea adrChp;
|
144 |
private TextField<String> cpChp;
|
148 |
private TextField<String> cpChp;
|
145 |
private TextField<String> villeChp;
|
149 |
private TextField<String> villeChp;
|
146 |
private TextField<String> regionChp;
|
150 |
private TextField<String> regionChp;
|
147 |
private TextField<String> telChp;
|
151 |
private TextField<String> telChp;
|
148 |
private TextField<String> faxChp;
|
152 |
private TextField<String> faxChp;
|
149 |
private TextField<String> emailChp;
|
153 |
private TextField<String> emailChp;
|
150 |
private TextField<String> urlChp;
|
154 |
private TextField<String> urlChp;
|
151 |
private ListStore<Valeur> magazinPays;
|
155 |
private ListStore<Valeur> magazinPays;
|
152 |
private ComboBox<Valeur> comboPays;
|
156 |
private ComboBox<Valeur> comboPays;
|
153 |
private HiddenField<String> idStructureChp;
|
157 |
private HiddenField<String> idStructureChp;
|
- |
|
158 |
private RadioGroup formationMarkRGrpChp;
|
- |
|
159 |
private RadioGroup interetFormationMarkRGrpChp;
|
- |
|
160 |
private RadioGroup collectionCommuneMarkRGrpChp;
|
- |
|
161 |
private RadioGroup accesControleMarkRGrpChp;
|
- |
|
162 |
private RadioGroup restaurationMarkRGrpChp;
|
- |
|
163 |
private RadioGroup traitementMarkRGrpChp;
|
- |
|
164 |
private RadioGroup collectionAcquisitionMarkRGrpChp;
|
- |
|
165 |
private RadioGroup echantillonAcquisitionMarkRGrpChp;
|
- |
|
166 |
private NumberField nbreTotalPersonneStructureChp;
|
- |
|
167 |
private TextField<String> localStockageAutreChp;
|
- |
|
168 |
private TextField<String> meubleStockageAutreChp;
|
- |
|
169 |
private TextField<String> parametreStockageAutreChp;
|
- |
|
170 |
private TextField<String> collectionAutreAutreChp;
|
- |
|
171 |
private TextField<String> autreCollectionAutreChp;
|
- |
|
172 |
private TextField<String> opRestauAutreChp;
|
- |
|
173 |
private TextField<String> autreMaterielAutreChp;
|
- |
|
174 |
private TextField<String> poisonTraitementAutreChp;
|
- |
|
175 |
private TextField<String> traitementAutreChp;
|
- |
|
176 |
private TextField<String> insecteTraitementAutreChp;
|
- |
|
177 |
private TextField<String> actionAutreChp;
|
- |
|
178 |
private TextField<String> provenanceRechercheAutreChp;
|
- |
|
179 |
private TextField<String> typeRecherche;
|
- |
|
180 |
private RadioGroup futureActionMarkRGrpChp;
|
- |
|
181 |
private RadioGroup rechercheMarkRGrpChp;
|
- |
|
182 |
private RadioGroup sansMotifAccesMarkRGrpChp;
|
- |
|
183 |
private RadioGroup avecMotifAccesMarkRGrpChp;
|
- |
|
184 |
private TextField<String> publicationChp;
|
- |
|
185 |
private ContentPanel materielConservationCp;
|
154 |
|
186 |
|
155 |
public FormStructureVue() {
|
187 |
public FormStructureVue() {
|
156 |
//+-----------------------------------------------------------------------------------------------------------+
|
188 |
//+-----------------------------------------------------------------------------------------------------------+
|
157 |
// Initialisation de variables
|
189 |
// Initialisation de variables
|
158 |
i18nC = GWT.create(Constantes.class);
|
190 |
i18nC = GWT.create(Constantes.class);
|
159 |
setLayout(new FitLayout());
|
191 |
setLayout(new FitLayout());
|
160 |
modele = Registry.get(RegistreId.MODELE);
|
192 |
modele = Registry.get(RegistreId.MODELE);
|
161 |
mediateur = Registry.get(RegistreId.MEDIATEUR);
|
193 |
mediateur = Registry.get(RegistreId.MEDIATEUR);
|
162 |
|
194 |
|
163 |
//+-----------------------------------------------------------------------------------------------------------+
|
195 |
//+-----------------------------------------------------------------------------------------------------------+
|
164 |
// Création du panneau du FORMULAIRE GÉNÉRAL
|
196 |
// Création du panneau du FORMULAIRE GÉNÉRAL
|
165 |
structureFormPanneau = new FormPanel();
|
197 |
structureFormPanneau = new FormPanel();
|
166 |
structureFormPanneau.setFrame(true);
|
198 |
structureFormPanneau.setFrame(true);
|
167 |
structureFormPanneau.setIconStyle("icone-form-ajouter");
|
199 |
structureFormPanneau.setIconStyle("icone-form-ajouter");
|
168 |
structureFormPanneau.setCollapsible(false);
|
200 |
structureFormPanneau.setCollapsible(false);
|
169 |
structureFormPanneau.setHeading(i18nC.titreAjoutFormStructurePanneau());
|
201 |
structureFormPanneau.setHeading(i18nC.titreAjoutFormStructurePanneau());
|
170 |
structureFormPanneau.setButtonAlign(HorizontalAlignment.CENTER);
|
202 |
structureFormPanneau.setButtonAlign(HorizontalAlignment.CENTER);
|
171 |
structureFormPanneau.setLayout(new FlowLayout());
|
203 |
structureFormPanneau.setLayout(new FlowLayout());
|
172 |
|
204 |
|
173 |
//+-----------------------------------------------------------------------------------------------------------+
|
205 |
//+-----------------------------------------------------------------------------------------------------------+
|
174 |
// Création des onglets
|
206 |
// Création des onglets
|
175 |
TabPanel onglets = new TabPanel();
|
207 |
TabPanel onglets = new TabPanel();
|
176 |
// NOTE : pour faire apparaître les scrollBar il faut définir la hauteur du panneau d'onglets à 100% (autoHeight ne semble pas fonctionner)
|
208 |
// NOTE : pour faire apparaître les scrollBar il faut définir la hauteur du panneau d'onglets à 100% (autoHeight ne semble pas fonctionner)
|
177 |
onglets.setHeight("100%");
|
209 |
onglets.setHeight("100%");
|
178 |
|
210 |
|
179 |
//+-----------------------------------------------------------------------------------------------------------+
|
211 |
//+-----------------------------------------------------------------------------------------------------------+
|
180 |
// Onlget formulaire IDENTIFICATION
|
212 |
// Onlget formulaire IDENTIFICATION
|
181 |
onglets.add(creerOngletIdentification());
|
213 |
onglets.add(creerOngletIdentification());
|
182 |
|
214 |
|
183 |
//+-----------------------------------------------------------------------------------------------------------+
|
215 |
//+-----------------------------------------------------------------------------------------------------------+
|
184 |
// Onlget formulaire PERSONNEL
|
216 |
// Onlget formulaire PERSONNEL
|
185 |
onglets.add(creerOngletPersonnel());
|
217 |
onglets.add(creerOngletPersonnel());
|
186 |
|
218 |
|
187 |
//+-----------------------------------------------------------------------------------------------------------+
|
219 |
//+-----------------------------------------------------------------------------------------------------------+
|
188 |
// Onlget formulaire CONSERVATION
|
220 |
// Onlget formulaire CONSERVATION
|
189 |
onglets.add(creerOngletConservation());
|
221 |
onglets.add(creerOngletConservation());
|
190 |
|
222 |
|
191 |
//+-----------------------------------------------------------------------------------------------------------+
|
223 |
//+-----------------------------------------------------------------------------------------------------------+
|
192 |
// Onlget formulaire VALORISATION
|
224 |
// Onlget formulaire VALORISATION
|
193 |
onglets.add(creerOngletValorisation());
|
225 |
onglets.add(creerOngletValorisation());
|
194 |
|
226 |
|
195 |
//+-----------------------------------------------------------------------------------------------------------+
|
227 |
//+-----------------------------------------------------------------------------------------------------------+
|
196 |
// Gestion du FORMULAIRE GÉNÉRAL
|
228 |
// Gestion du FORMULAIRE GÉNÉRAL
|
197 |
|
229 |
|
198 |
// Sélection de l'onglet par défaut
|
230 |
// Sélection de l'onglet par défaut
|
199 |
//onglets.setSelection(valorisationOnglet);
|
231 |
onglets.setSelection(conservationOnglet);
|
200 |
// Ajout des onglets au formulaire général
|
232 |
// Ajout des onglets au formulaire général
|
201 |
structureFormPanneau.add(onglets);
|
233 |
structureFormPanneau.add(onglets);
|
202 |
|
234 |
|
203 |
// Ajout des boutons au panneau formulaire
|
235 |
// Ajout des boutons au panneau formulaire
|
204 |
Button annulerBtn = new Button("Annuler");
|
236 |
Button annulerBtn = new Button("Annuler");
|
205 |
annulerBtn.addSelectionListener(new SelectionListener<ComponentEvent>() {
|
237 |
annulerBtn.addSelectionListener(new SelectionListener<ComponentEvent>() {
|
206 |
|
238 |
|
207 |
@Override
|
239 |
@Override
|
208 |
public void componentSelected(ComponentEvent ce) {
|
240 |
public void componentSelected(ComponentEvent ce) {
|
209 |
mediateur.clicMenu("Institutions");
|
241 |
mediateur.clicMenu("Institutions");
|
210 |
}
|
242 |
}
|
211 |
|
243 |
|
212 |
});
|
244 |
});
|
213 |
structureFormPanneau.addButton(annulerBtn);
|
245 |
structureFormPanneau.addButton(annulerBtn);
|
214 |
Button validerBtn = new Button("Valider");
|
246 |
Button validerBtn = new Button("Valider");
|
215 |
validerBtn.addSelectionListener(new SelectionListener<ComponentEvent>() {
|
247 |
validerBtn.addSelectionListener(new SelectionListener<ComponentEvent>() {
|
216 |
|
248 |
|
217 |
@Override
|
249 |
@Override
|
218 |
public void componentSelected(ComponentEvent ce) {
|
250 |
public void componentSelected(ComponentEvent ce) {
|
219 |
soumettreFormulaire();
|
251 |
soumettreFormulaire();
|
220 |
}
|
252 |
}
|
221 |
|
253 |
|
222 |
});
|
254 |
});
|
223 |
structureFormPanneau.addButton(validerBtn);
|
255 |
structureFormPanneau.addButton(validerBtn);
|
224 |
|
256 |
|
225 |
// Ajout du panneau Formulaire à la disposition générale
|
257 |
// Ajout du panneau Formulaire à la disposition générale
|
226 |
add(structureFormPanneau);
|
258 |
add(structureFormPanneau);
|
227 |
}
|
259 |
}
|
228 |
|
260 |
|
229 |
private void soumettreFormulaire() {
|
261 |
private void soumettreFormulaire() {
|
230 |
GWT.log("Soumission du formulaire", null);
|
262 |
GWT.log("Soumission du formulaire", null);
|
231 |
Structure structure = collecterDonnees();
|
263 |
Structure structure = collecterDonneesIdentification();
|
- |
|
264 |
StructureConservation conservation = collecterDonneesConservation();
|
232 |
if (mode == "AJOUT") {
|
265 |
if (mode == "AJOUT") {
|
233 |
//mediateur.ajouterStructure(this, structure);
|
266 |
//mediateur.ajouterStructure(this, structure);
|
234 |
GWT.log("Structure non ajouté :"+structure.toString(), null);
|
- |
|
235 |
} else if (mode == "MODIF") {
|
267 |
} else if (mode == "MODIF") {
|
236 |
mediateur.modifierStructure(this, structure);
|
268 |
mediateur.modifierStructure(this, structure, conservation);
|
237 |
}
|
269 |
}
|
- |
|
270 |
//GWT.log("Info Structure envoyées :\n"+structure.toString(), null);
|
238 |
}
|
271 |
}
|
- |
|
272 |
|
- |
|
273 |
private StructureConservation collecterDonneesConservation() {
|
- |
|
274 |
// Création de l'objet
|
- |
|
275 |
StructureConservation conservation = new StructureConservation();
|
- |
|
276 |
|
- |
|
277 |
if (formationMarkRGrpChp.getValue() != null) {
|
- |
|
278 |
conservation.setFormationMark(formationMarkRGrpChp.getValue().getValueAttribute());
|
- |
|
279 |
}
|
- |
|
280 |
conservation.setFormation(formationChp.getValue());
|
- |
|
281 |
if (interetFormationMarkRGrpChp.getValue() != null) {
|
- |
|
282 |
conservation.setFormationInteret(interetFormationMarkRGrpChp.getValue().getValueAttribute());
|
- |
|
283 |
}
|
- |
|
284 |
conservation.setStockageLocal(creerTruk(localStockageTrukCacGrpChp.getValues()));
|
- |
|
285 |
if (localStockageAutreChp.getValue() != null) {
|
- |
|
286 |
conservation.setStockageLocal("AUTRE", localStockageAutreChp.getValue());
|
- |
|
287 |
}
|
- |
|
288 |
|
- |
|
289 |
// Retour de l'objet
|
- |
|
290 |
GWT.log(conservation.toString(), null);
|
- |
|
291 |
return conservation;
|
- |
|
292 |
}
|
- |
|
293 |
|
- |
|
294 |
private void peuplerStructureConservation(StructureConservation strCons) {
|
- |
|
295 |
Radio radioBtn = new Radio();
|
- |
|
296 |
radioBtn.setId(strCons.getFormationMark()+"_"+formationMarkRGrpChp.getName());
|
- |
|
297 |
formationMarkRGrpChp.get(formationMarkRGrpChp.getAll().indexOf(radioBtn)).setValue((strCons.getFormationMark().equals("1") ? true : false));
|
- |
|
298 |
|
- |
|
299 |
}
|
239 |
|
300 |
|
- |
|
301 |
private Structure collecterDonneesIdentification() {
|
240 |
private Structure collecterDonnees() {
|
302 |
// IDENTIFICATION
|
241 |
Structure structure = new Structure();
|
303 |
Structure structure = new Structure();
|
242 |
structure.setId(idStructureChp.getValue());
|
304 |
structure.setId(idStructureChp.getValue());
|
243 |
structure.setNom(nomStructureChp.getValue());
|
305 |
structure.setNom(nomStructureChp.getValue());
|
244 |
// Récupération de l'acronyme (= identifiant alternatif)
|
306 |
// Récupération de l'acronyme (= identifiant alternatif)
|
245 |
structure.setIdAlternatif(null);
|
307 |
structure.setIdAlternatif(null);
|
246 |
if (comboAcronyme.getValue() != null) {
|
308 |
if (comboAcronyme.getValue() != null) {
|
247 |
String typeAcronyme = comboAcronyme.getValue().getAbr();
|
309 |
String typeAcronyme = comboAcronyme.getValue().getAbr();
|
248 |
GWT.log("Acronyme : "+typeAcronyme, null);
|
310 |
GWT.log("Acronyme : "+typeAcronyme, null);
|
249 |
if (typeAcronyme == "IH") {
|
311 |
if (typeAcronyme == "IH") {
|
250 |
structure.setIdAlternatif(typeAcronyme+"##"+ihChp.getValue());
|
312 |
structure.setIdAlternatif(typeAcronyme+"##"+ihChp.getValue());
|
251 |
} else if (typeAcronyme == "MNHN") {
|
313 |
} else if (typeAcronyme == "MNHN") {
|
252 |
structure.setIdAlternatif(typeAcronyme+"##"+mnhnChp.getValue());
|
314 |
structure.setIdAlternatif(typeAcronyme+"##"+mnhnChp.getValue());
|
253 |
}
|
315 |
}
|
254 |
}
|
316 |
}
|
255 |
// Récupération statut de la structure
|
317 |
// Récupération statut de la structure
|
256 |
structure.setTypePublic(null);
|
318 |
structure.setTypePublic(null);
|
257 |
structure.setTypePrive(null);
|
319 |
structure.setTypePrive(null);
|
258 |
if (comboTypeStructure.getValue() != null) {
|
320 |
if (comboTypeStructure.getValue() != null) {
|
259 |
String typeStructure = comboTypeStructure.getValue().getAbr();
|
321 |
String typeStructure = comboTypeStructure.getValue().getAbr();
|
260 |
GWT.log("Statut : "+typeStructure, null);
|
322 |
GWT.log("Statut : "+typeStructure, null);
|
261 |
if (typeStructure == "stpu") {
|
323 |
if (typeStructure == "stpu" && comboLstpu.getValue() != null) {
|
262 |
structure.setTypePublic(comboLstpu.getValue().getId());
|
324 |
structure.setTypePublic(comboLstpu.getValue().getId());
|
263 |
} else if (typeStructure == "stpr") {
|
325 |
} else if (typeStructure == "stpr" && comboLstpr.getValue() != null) {
|
264 |
structure.setTypePrive(comboLstpr.getValue().getId());
|
326 |
structure.setTypePrive(comboLstpr.getValue().getId());
|
265 |
}
|
327 |
}
|
266 |
}
|
328 |
}
|
267 |
structure.setDateFondation(dateFondationChp.getValue());
|
329 |
structure.setDateFondation(dateFondationChp.getValue());
|
268 |
|
330 |
|
269 |
structure.setAdresse(adrChp.getValue());
|
331 |
structure.setAdresse(adrChp.getValue());
|
270 |
structure.setCodePostal(cpChp.getValue());
|
332 |
structure.setCodePostal(cpChp.getValue());
|
271 |
structure.setVille(villeChp.getValue());
|
333 |
structure.setVille(villeChp.getValue());
|
272 |
structure.setRegion(regionChp.getValue());
|
334 |
structure.setRegion(regionChp.getValue());
|
273 |
structure.setPays(null);
|
335 |
structure.setPays(null);
|
274 |
if (comboPays.getValue() != null) {
|
336 |
if (comboPays.getValue() != null) {
|
275 |
structure.setPays(comboPays.getValue().getAbreviation());
|
337 |
structure.setPays(comboPays.getValue().getAbreviation());
|
276 |
} else if (comboPays.getRawValue() != "") {
|
338 |
} else if (comboPays.getRawValue() != "") {
|
277 |
structure.setPays(comboPays.getRawValue());
|
339 |
structure.setPays(comboPays.getRawValue());
|
278 |
}
|
340 |
}
|
279 |
|
341 |
|
280 |
structure.setTelephone(telChp.getValue());
|
342 |
structure.setTelephone(telChp.getValue());
|
281 |
structure.setFax(faxChp.getValue());
|
343 |
structure.setFax(faxChp.getValue());
|
282 |
structure.setCourriel(emailChp.getValue());
|
344 |
structure.setCourriel(emailChp.getValue());
|
283 |
structure.setUrl(urlChp.getValue());
|
345 |
structure.setUrl(Structure.URL_SITE, urlChp.getValue());
|
- |
|
346 |
|
- |
|
347 |
// CONSERVATION
|
284 |
|
348 |
|
285 |
return structure;
|
349 |
return structure;
|
286 |
}
|
350 |
}
|
287 |
|
351 |
|
288 |
private void peuplerFormulaire(Structure str) {
|
352 |
private void peuplerStructure(Structure str) {
|
289 |
idStructureChp.setValue(str.getId());
|
353 |
idStructureChp.setValue(str.getId());
|
- |
|
354 |
nomStructureChp.setValue(str.getNom());
|
- |
|
355 |
if (!str.getIdAlternatif().isEmpty()) {
|
- |
|
356 |
String[] acronyme = str.getIdAlternatif().split("##");
|
- |
|
357 |
if (acronyme[0].matches("^IH$")) {
|
- |
|
358 |
comboAcronyme.setValue(InterneValeurListe.getTypeAcronymeIH());
|
- |
|
359 |
ihChp.setValue(acronyme[1]);
|
- |
|
360 |
} else if (acronyme[0].matches("^MNHN$")) {
|
- |
|
361 |
comboAcronyme.setValue(InterneValeurListe.getTypeAcronymeMNHN());
|
- |
|
362 |
mnhnChp.setValue(acronyme[1]);
|
- |
|
363 |
}
|
290 |
nomStructureChp.setValue(str.getNom());
|
364 |
}
|
291 |
if (!str.getTypePrive().isEmpty()) {
|
365 |
if (!str.getTypePrive().isEmpty()) {
|
292 |
if (str.getTypePrive().matches("^[0-9]+$")) {
|
366 |
if (str.getTypePrive().matches("^[0-9]+$")) {
|
293 |
comboTypeStructure.setValue(InterneValeurListe.getTypePrivee());
|
367 |
comboTypeStructure.setValue(InterneValeurListe.getTypePrivee());
|
294 |
comboLstpr.setValue(comboLstpr.getStore().findModel("id_valeur", str.getTypePrive()));
|
368 |
comboLstpr.setValue(comboLstpr.getStore().findModel("id_valeur", str.getTypePrive()));
|
295 |
}
|
369 |
}
|
296 |
} else if (!str.getTypePublic().isEmpty()) {
|
370 |
} else if (!str.getTypePublic().isEmpty()) {
|
297 |
if (str.getTypePublic().matches("^[0-9]+$")) {
|
371 |
if (str.getTypePublic().matches("^[0-9]+$")) {
|
298 |
comboTypeStructure.setValue(InterneValeurListe.getTypePublique());
|
372 |
comboTypeStructure.setValue(InterneValeurListe.getTypePublique());
|
299 |
comboLstpu.setValue(comboLstpu.getStore().findModel("id_valeur", str.getTypePublic()));
|
373 |
comboLstpu.setValue(comboLstpu.getStore().findModel("id_valeur", str.getTypePublic()));
|
300 |
}
|
374 |
}
|
301 |
}
|
375 |
}
|
302 |
dateFondationChp.setValue(str.getDateFondation());
|
376 |
dateFondationChp.setValue(str.getDateFondation());
|
303 |
|
377 |
|
304 |
adrChp.setValue(str.getAdresse());
|
378 |
adrChp.setValue(str.getAdresse());
|
305 |
cpChp.setValue(str.getCodePostal());
|
379 |
cpChp.setValue(str.getCodePostal());
|
- |
|
380 |
GWT.log("Classe :"+this.getClass(), null);
|
306 |
villeChp.setValue(str.getVille());
|
381 |
villeChp.setValue(str.getVille());
|
307 |
regionChp.setValue(str.getRegion());
|
382 |
regionChp.setValue(str.getRegion());
|
308 |
if (str.getPays().matches("^[A-Z]{2}$")) {
|
383 |
if (str.getPays().matches("^[A-Z]{2}$")) {
|
309 |
comboPays.setValue(comboPays.getStore().findModel("abreviation", str.getPays()));
|
384 |
comboPays.setValue(comboPays.getStore().findModel("abreviation", str.getPays()));
|
310 |
} else {
|
385 |
} else {
|
311 |
comboPays.setRawValue(str.getPays());
|
386 |
comboPays.setRawValue(str.getPays());
|
312 |
}
|
387 |
}
|
313 |
|
388 |
|
314 |
telChp.setValue(str.getTelephone());
|
389 |
telChp.setValue(str.getTelephone());
|
315 |
faxChp.setValue(str.getFax());
|
390 |
faxChp.setValue(str.getFax());
|
316 |
emailChp.setValue(str.getCourriel());
|
391 |
emailChp.setValue(str.getCourriel());
|
317 |
urlChp.setValue(str.getUrl("WEB"));
|
392 |
urlChp.setValue(str.getUrl("WEB"));
|
318 |
}
|
393 |
}
|
- |
|
394 |
|
- |
|
395 |
private String creerTruk(List<CheckBox> liste) {
|
- |
|
396 |
String identifiants = "";
|
- |
|
397 |
int taille = liste.size();
|
- |
|
398 |
for (int i = 0; i < taille; i++) {
|
- |
|
399 |
CheckBox cac = liste.get(i);
|
- |
|
400 |
if (cac.isEnabled()) {
|
- |
|
401 |
identifiants = identifiants.concat(";"+cac.getData("id"));
|
- |
|
402 |
}
|
- |
|
403 |
}
|
- |
|
404 |
return identifiants.replaceFirst("^;", "");
|
- |
|
405 |
}
|
319 |
|
406 |
|
320 |
private TabItem creerOngletValorisation() {
|
407 |
private TabItem creerOngletValorisation() {
|
321 |
valorisationOnglet = new TabItem();
|
408 |
valorisationOnglet = new TabItem();
|
322 |
valorisationOnglet.setText("Valorisation");
|
409 |
valorisationOnglet.setText("Valorisation");
|
323 |
valorisationOnglet.setScrollMode(Scroll.AUTO);
|
410 |
valorisationOnglet.setScrollMode(Scroll.AUTO);
|
324 |
valorisationOnglet.setLayout(creerFormLayout(650, LabelAlign.TOP, null));
|
411 |
valorisationOnglet.setLayout(creerFormLayout(650, LabelAlign.TOP, null));
|
325 |
|
412 |
|
326 |
actionMarkRGrpChp = creerChoixUniqueRadioGroupe("action_mark", "ouiNon");
|
413 |
actionMarkRGrpChp = creerChoixUniqueRadioGroupe("action_mark", "ouiNon");
|
327 |
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 ?");
|
414 |
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 ?");
|
328 |
valorisationOnglet.add(actionMarkRGrpChp);
|
415 |
valorisationOnglet.add(actionMarkRGrpChp);
|
329 |
|
416 |
|
330 |
|
417 |
|
331 |
actionTrukCp = creerChoixMultipleCp("actionValorisation");
|
418 |
actionTrukCp = creerChoixMultipleCp("actionValorisation");
|
332 |
actionTrukCp.hide();
|
419 |
actionTrukCp.hide();
|
333 |
actionTrukCacGrpChp = new CheckBoxGroup();
|
420 |
actionTrukCacGrpChp = new CheckBoxGroup();
|
334 |
actionTrukCacGrpChp.setFieldLabel("Si oui, lesquelles ?");
|
421 |
actionTrukCacGrpChp.setFieldLabel("Si oui, lesquelles ?");
|
335 |
valorisationOnglet.add(actionTrukCp);
|
422 |
valorisationOnglet.add(actionTrukCp);
|
336 |
|
423 |
|
337 |
TextField<String> publicationChp = new TextField<String>();
|
424 |
publicationChp = new TextField<String>();
|
338 |
publicationChp.setFieldLabel("Quelques titres des ouvrages, articles scientifiques, ...");
|
425 |
publicationChp.setFieldLabel("Quelques titres des ouvrages, articles scientifiques, ...");
|
339 |
valorisationOnglet.add(publicationChp);
|
426 |
valorisationOnglet.add(publicationChp);
|
340 |
|
427 |
|
341 |
autreCollectionTrukCp = creerChoixMultipleCp("autreCollection");
|
428 |
autreCollectionTrukCp = creerChoixMultipleCp("autreCollection");
|
342 |
autreCollectionTrukCacGrpChp = new CheckBoxGroup();
|
429 |
autreCollectionTrukCacGrpChp = new CheckBoxGroup();
|
343 |
autreCollectionTrukCacGrpChp.setFieldLabel("L'organisme dispose-t-il d'autres collections (permettant une valorisation pluridisciplinaire) ?");
|
430 |
autreCollectionTrukCacGrpChp.setFieldLabel("L'organisme dispose-t-il d'autres collections (permettant une valorisation pluridisciplinaire) ?");
|
344 |
valorisationOnglet.add(autreCollectionTrukCp);
|
431 |
valorisationOnglet.add(autreCollectionTrukCp);
|
345 |
|
432 |
|
346 |
RadioGroup futureActionMarkRGrpChp = creerChoixUniqueRadioGroupe("future_action_mark", "ouiNon");
|
433 |
futureActionMarkRGrpChp = creerChoixUniqueRadioGroupe("future_action_mark", "ouiNon");
|
347 |
futureActionMarkRGrpChp.setFieldLabel("Envisagez vous des actions de valorisation dans le cadre de votre politique culturelle ?");
|
434 |
futureActionMarkRGrpChp.setFieldLabel("Envisagez vous des actions de valorisation dans le cadre de votre politique culturelle ?");
|
348 |
valorisationOnglet.add(futureActionMarkRGrpChp);
|
435 |
valorisationOnglet.add(futureActionMarkRGrpChp);
|
349 |
|
436 |
|
350 |
futureActionChp = new TextField<String>();
|
437 |
futureActionChp = new TextField<String>();
|
351 |
futureActionChp.setFieldLabel("Si oui, lesquelles ?");
|
438 |
futureActionChp.setFieldLabel("Si oui, lesquelles ?");
|
352 |
futureActionChp.hide();
|
439 |
futureActionChp.hide();
|
353 |
valorisationOnglet.add(futureActionChp);
|
440 |
valorisationOnglet.add(futureActionChp);
|
354 |
|
441 |
|
355 |
RadioGroup rechercheMarkRGrpChp = creerChoixUniqueRadioGroupe("recherche_mark", "ouiNon");
|
442 |
rechercheMarkRGrpChp = creerChoixUniqueRadioGroupe("recherche_mark", "ouiNon");
|
356 |
rechercheMarkRGrpChp.setFieldLabel("Vos collections botaniques sont-elles utilisées pour des recherches scientifiques ?");
|
443 |
rechercheMarkRGrpChp.setFieldLabel("Vos collections botaniques sont-elles utilisées pour des recherches scientifiques ?");
|
357 |
valorisationOnglet.add(rechercheMarkRGrpChp);
|
444 |
valorisationOnglet.add(rechercheMarkRGrpChp);
|
358 |
|
445 |
|
359 |
provenanceRechercheTrukCp = creerChoixMultipleCp("continentEtFr");
|
446 |
provenanceRechercheTrukCp = creerChoixMultipleCp("continentEtFr");
|
360 |
provenanceRechercheTrukCp.hide();
|
447 |
provenanceRechercheTrukCp.hide();
|
361 |
provenanceRechercheTrukCacGrpChp = new CheckBoxGroup();
|
448 |
provenanceRechercheTrukCacGrpChp = new CheckBoxGroup();
|
362 |
provenanceRechercheTrukCacGrpChp.setFieldLabel("Si oui, par des chercheurs (professionnels ou amateurs) de quelle provenance ?");
|
449 |
provenanceRechercheTrukCacGrpChp.setFieldLabel("Si oui, par des chercheurs (professionnels ou amateurs) de quelle provenance ?");
|
363 |
valorisationOnglet.add(provenanceRechercheTrukCp);
|
450 |
valorisationOnglet.add(provenanceRechercheTrukCp);
|
364 |
|
451 |
|
365 |
typeRechercheTrukCp = creerChoixMultipleCp("typeRecherche");
|
452 |
typeRechercheTrukCp = creerChoixMultipleCp("typeRecherche");
|
366 |
typeRechercheTrukCp.hide();
|
453 |
typeRechercheTrukCp.hide();
|
367 |
typeRechercheTrukCacGrpChp = new CheckBoxGroup();
|
454 |
typeRechercheTrukCacGrpChp = new CheckBoxGroup();
|
368 |
typeRechercheTrukCacGrpChp.setFieldLabel("Et pour quelles recherches ?");
|
455 |
typeRechercheTrukCacGrpChp.setFieldLabel("Et pour quelles recherches ?");
|
369 |
valorisationOnglet.add(typeRechercheTrukCp);
|
456 |
valorisationOnglet.add(typeRechercheTrukCp);
|
370 |
|
457 |
|
371 |
RadioGroup sansMotifAccesMarkRGrpChp = creerChoixUniqueRadioGroupe("sans_motif_acces_mark", "ouiNon");
|
458 |
sansMotifAccesMarkRGrpChp = creerChoixUniqueRadioGroupe("sans_motif_acces_mark", "ouiNon");
|
372 |
sansMotifAccesMarkRGrpChp.setFieldLabel("Peut-on consulter vos collections botaniques sans motif de recherches scientifiques ?");
|
459 |
sansMotifAccesMarkRGrpChp.setFieldLabel("Peut-on consulter vos collections botaniques sans motif de recherches scientifiques ?");
|
373 |
valorisationOnglet.add(sansMotifAccesMarkRGrpChp);
|
460 |
valorisationOnglet.add(sansMotifAccesMarkRGrpChp);
|
374 |
|
461 |
|
375 |
sansMotifAccesChp = new TextField<String>();
|
462 |
sansMotifAccesChp = new TextField<String>();
|
376 |
sansMotifAccesChp.hide();
|
463 |
sansMotifAccesChp.hide();
|
377 |
sansMotifAccesChp.setFieldLabel("Si oui, quelles démarches doit-on faire pour les consulter ?");
|
464 |
sansMotifAccesChp.setFieldLabel("Si oui, quelles démarches doit-on faire pour les consulter ?");
|
378 |
valorisationOnglet.add(sansMotifAccesChp);
|
465 |
valorisationOnglet.add(sansMotifAccesChp);
|
379 |
|
466 |
|
380 |
RadioGroup avecMotifAccesMarkRGrpChp = creerChoixUniqueRadioGroupe("avec_motif_acces_mark", "ouiNon");
|
467 |
avecMotifAccesMarkRGrpChp = creerChoixUniqueRadioGroupe("avec_motif_acces_mark", "ouiNon");
|
381 |
avecMotifAccesMarkRGrpChp.setFieldLabel("Peut-on visiter vos collections botaniques avec des objectifs de recherches scientifiques ?");
|
468 |
avecMotifAccesMarkRGrpChp.setFieldLabel("Peut-on visiter vos collections botaniques avec des objectifs de recherches scientifiques ?");
|
382 |
valorisationOnglet.add(avecMotifAccesMarkRGrpChp);
|
469 |
valorisationOnglet.add(avecMotifAccesMarkRGrpChp);
|
383 |
|
470 |
|
384 |
valorisationOnglet.add(avecMotifAccesChp = new TextField<String>());
|
471 |
valorisationOnglet.add(avecMotifAccesChp = new TextField<String>());
|
385 |
avecMotifAccesChp.hide();
|
472 |
avecMotifAccesChp.hide();
|
386 |
avecMotifAccesChp.setFieldLabel("Si oui, quelles démarches doit-on faire pour les visiter ?");
|
473 |
avecMotifAccesChp.setFieldLabel("Si oui, quelles démarches doit-on faire pour les visiter ?");
|
387 |
|
474 |
|
388 |
return valorisationOnglet;
|
475 |
return valorisationOnglet;
|
389 |
}
|
476 |
}
|
390 |
|
477 |
|
391 |
private TabItem creerOngletConservation() {
|
478 |
private TabItem creerOngletConservation() {
|
392 |
conservationOnglet = new TabItem();
|
479 |
conservationOnglet = new TabItem();
|
393 |
conservationOnglet.setText("Conservation");
|
480 |
conservationOnglet.setText("Conservation");
|
394 |
conservationOnglet.setScrollMode(Scroll.AUTO);
|
481 |
conservationOnglet.setScrollMode(Scroll.AUTO);
|
395 |
conservationOnglet.setLayout(creerFormLayout(650, LabelAlign.TOP, null));
|
482 |
conservationOnglet.setLayout(creerFormLayout(650, LabelAlign.TOP, null));
|
396 |
|
483 |
|
397 |
RadioGroup markFormationRGrpChp = creerChoixUniqueRadioGroupe("formation_mark", "ouiNon");
|
484 |
formationMarkRGrpChp = creerChoixUniqueRadioGroupe("formation_mark", "ouiNon");
|
398 |
markFormationRGrpChp.setFieldLabel("Le personnel s'occupant des collections a-t-il suivi des formations en conservations ?");
|
485 |
formationMarkRGrpChp.setFieldLabel("Le personnel s'occupant des collections a-t-il suivi des formations en conservations ?");
|
399 |
conservationOnglet.add(markFormationRGrpChp);
|
486 |
conservationOnglet.add(formationMarkRGrpChp);
|
400 |
|
487 |
|
401 |
formationChp = new TextField<String>();
|
488 |
formationChp = new TextField<String>();
|
402 |
formationChp.hide();
|
489 |
formationChp.hide();
|
403 |
formationChp.setFieldLabel("Si oui, lesquelles ?");
|
490 |
formationChp.setFieldLabel("Si oui, lesquelles ?");
|
404 |
conservationOnglet.add(formationChp);
|
491 |
conservationOnglet.add(formationChp);
|
405 |
|
492 |
|
406 |
RadioGroup markInteretFormationRGrpChp = creerChoixUniqueRadioGroupe("interet_formation_mark", "ouiNon");
|
493 |
interetFormationMarkRGrpChp = creerChoixUniqueRadioGroupe("interet_formation_mark", "ouiNon");
|
407 |
markInteretFormationRGrpChp.setFieldLabel("Seriez vous intéressé par une formation à la conservation et à la restauration d'herbier ?");
|
494 |
interetFormationMarkRGrpChp.setFieldLabel("Seriez vous intéressé par une formation à la conservation et à la restauration d'herbier ?");
|
408 |
conservationOnglet.add(markInteretFormationRGrpChp);
|
495 |
conservationOnglet.add(interetFormationMarkRGrpChp);
|
409 |
|
496 |
|
410 |
localStockageTrukCp = creerChoixMultipleCp("localStockage");
|
497 |
localStockageTrukCp = creerChoixMultipleCp("localStockage");
|
411 |
localStockageTrukCacGrpChp = new CheckBoxGroup();
|
498 |
localStockageTrukCacGrpChp = new CheckBoxGroup();
|
412 |
localStockageTrukCacGrpChp.setFieldLabel("Avez vous des locaux spécifiques de stockage des collections botaniques ?");
|
499 |
localStockageTrukCacGrpChp.setFieldLabel("Avez vous des locaux spécifiques de stockage des collections botaniques ?");
|
413 |
conservationOnglet.add(localStockageTrukCp);
|
500 |
conservationOnglet.add(localStockageTrukCp);
|
414 |
|
501 |
|
415 |
meubleStockageTrukCp = creerChoixMultipleCp("meubleStockage");
|
502 |
meubleStockageTrukCp = creerChoixMultipleCp("meubleStockage");
|
416 |
meubleStockageTrukCacGrpChp = new CheckBoxGroup();
|
503 |
meubleStockageTrukCacGrpChp = new CheckBoxGroup();
|
417 |
meubleStockageTrukCacGrpChp.setFieldLabel("Avez vous des meubles spécifiques au stockage des collections botaniques ?");
|
504 |
meubleStockageTrukCacGrpChp.setFieldLabel("Avez vous des meubles spécifiques au stockage des collections botaniques ?");
|
418 |
conservationOnglet.add(meubleStockageTrukCp);
|
505 |
conservationOnglet.add(meubleStockageTrukCp);
|
419 |
|
506 |
|
420 |
parametreStockageTrukCp = creerChoixMultipleCp("parametreStockage");
|
507 |
parametreStockageTrukCp = creerChoixMultipleCp("parametreStockage");
|
421 |
parametreStockageTrukCacGrpChp = new CheckBoxGroup();
|
508 |
parametreStockageTrukCacGrpChp = new CheckBoxGroup();
|
422 |
parametreStockageTrukCacGrpChp.setFieldLabel("Quels paramètres maîtrisez vous ?");
|
509 |
parametreStockageTrukCacGrpChp.setFieldLabel("Quels paramètres maîtrisez vous ?");
|
423 |
conservationOnglet.add(parametreStockageTrukCp);
|
510 |
conservationOnglet.add(parametreStockageTrukCp);
|
424 |
|
511 |
|
425 |
RadioGroup collectionCommuneMarkRGrpChp = creerChoixUniqueRadioGroupe("collection_commune_mark", "ouiNon");
|
512 |
collectionCommuneMarkRGrpChp = creerChoixUniqueRadioGroupe("collection_commune_mark", "ouiNon");
|
426 |
collectionCommuneMarkRGrpChp.setFieldLabel("Les collections botaniques sont-elles conservées avec d'autres collections dans les mêmes locaux (problème de conservation en commun) ?");
|
513 |
collectionCommuneMarkRGrpChp.setFieldLabel("Les collections botaniques sont-elles conservées avec d'autres collections dans les mêmes locaux (problème de conservation en commun) ?");
|
427 |
conservationOnglet.add(collectionCommuneMarkRGrpChp);
|
514 |
conservationOnglet.add(collectionCommuneMarkRGrpChp);
|
428 |
|
515 |
|
429 |
collectionAutreTrukCp = creerChoixMultipleCp("autreCollection");
|
516 |
collectionAutreTrukCp = creerChoixMultipleCp("autreCollection");
|
430 |
collectionAutreTrukCacGrpChp = new CheckBoxGroup();
|
517 |
collectionAutreTrukCacGrpChp = new CheckBoxGroup();
|
431 |
collectionAutreTrukCacGrpChp.setFieldLabel("Si oui, lesquelles ?");
|
518 |
collectionAutreTrukCacGrpChp.setFieldLabel("Si oui, lesquelles ?");
|
432 |
collectionAutreTrukCp.hide();
|
519 |
collectionAutreTrukCp.hide();
|
433 |
conservationOnglet.add(collectionAutreTrukCp);
|
520 |
conservationOnglet.add(collectionAutreTrukCp);
|
434 |
|
521 |
|
435 |
RadioGroup accesControleMarkRGrpChp = creerChoixUniqueRadioGroupe("mark_acces_controle", "ouiNon");
|
522 |
accesControleMarkRGrpChp = creerChoixUniqueRadioGroupe("mark_acces_controle", "ouiNon");
|
436 |
accesControleMarkRGrpChp.setFieldLabel("L'accès à vos collections botanique est-il contrôlé (ex. : manipulation réservées à des personnes compétentes) ?");
|
523 |
accesControleMarkRGrpChp.setFieldLabel("L'accès à vos collections botanique est-il contrôlé (ex. : manipulation réservées à des personnes compétentes) ?");
|
437 |
conservationOnglet.add(accesControleMarkRGrpChp);
|
524 |
conservationOnglet.add(accesControleMarkRGrpChp);
|
438 |
|
525 |
|
439 |
RadioGroup restaurationMarkRGrpChp = creerChoixUniqueRadioGroupe("restauration_mark", "ouiNon");
|
526 |
restaurationMarkRGrpChp = creerChoixUniqueRadioGroupe("restauration_mark", "ouiNon");
|
440 |
restaurationMarkRGrpChp.setFieldLabel("Effectuez vous des opérations de restauration ou de remise en état de vos collections botaniques ?");
|
527 |
restaurationMarkRGrpChp.setFieldLabel("Effectuez vous des opérations de restauration ou de remise en état de vos collections botaniques ?");
|
441 |
conservationOnglet.add(restaurationMarkRGrpChp);
|
528 |
conservationOnglet.add(restaurationMarkRGrpChp);
|
442 |
|
529 |
|
443 |
opRestauTrukCp = creerChoixMultipleCp("opRestau");
|
530 |
opRestauTrukCp = creerChoixMultipleCp("opRestau");
|
444 |
opRestauTrukCacGrpChp = new CheckBoxGroup();
|
531 |
opRestauTrukCacGrpChp = new CheckBoxGroup();
|
445 |
opRestauTrukCacGrpChp.setFieldLabel("Si oui, lesquelles ?");
|
532 |
opRestauTrukCacGrpChp.setFieldLabel("Si oui, lesquelles ?");
|
446 |
opRestauTrukCp.hide();
|
533 |
opRestauTrukCp.hide();
|
447 |
conservationOnglet.add(opRestauTrukCp);
|
534 |
conservationOnglet.add(opRestauTrukCp);
|
- |
|
535 |
|
- |
|
536 |
// Création d'un ContentPanel vide et du groupe de bouton radio
|
- |
|
537 |
// 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
|
- |
|
538 |
materielConservationCp = creerChoixMultipleCp("onep");
|
448 |
|
539 |
conservationOnglet.add(materielConservationCp);
|
449 |
materielConservationCeRGrpChp = creerChoixUniqueRadioGroupe("materiel_conservation_ce", "onep");
|
540 |
materielConservationCeRGrpChp = creerChoixUniqueRadioGroupe("materiel_conservation_ce", "onep");
|
450 |
materielConservationCeRGrpChp.setFieldLabel("Utilisez vous du matériel de conservation ?");
|
541 |
materielConservationCeRGrpChp.setFieldLabel("Utilisez vous du matériel de conservation ?");
|
451 |
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..."));
|
542 |
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..."));
|
452 |
conservationOnglet.add(materielConservationCeRGrpChp);
|
- |
|
453 |
|
543 |
|
454 |
autreMaterielTrukCp = creerChoixMultipleCp("autreMateriel");
|
544 |
autreMaterielTrukCp = creerChoixMultipleCp("autreMateriel");
|
455 |
autreMaterielTrukCp.hide();
|
545 |
autreMaterielTrukCp.hide();
|
456 |
autreMaterielTrukCacGrpChp = new CheckBoxGroup();
|
546 |
autreMaterielTrukCacGrpChp = new CheckBoxGroup();
|
457 |
autreMaterielTrukCacGrpChp.setFieldLabel("Si non, qu'utilisez vous comme matériel ?");
|
547 |
autreMaterielTrukCacGrpChp.setFieldLabel("Si non, qu'utilisez vous comme matériel ?");
|
458 |
conservationOnglet.add(autreMaterielTrukCp);
|
548 |
conservationOnglet.add(autreMaterielTrukCp);
|
459 |
|
549 |
|
460 |
RadioGroup markTraitementRGrpChp = creerChoixUniqueRadioGroupe("traitement_mark", "ouiNon");
|
550 |
traitementMarkRGrpChp = creerChoixUniqueRadioGroupe("traitement_mark", "ouiNon");
|
461 |
markTraitementRGrpChp.setFieldLabel("Réalisez vous actuellement des traitements globaux contre les insectes ?");
|
551 |
traitementMarkRGrpChp.setFieldLabel("Réalisez vous actuellement des traitements globaux contre les insectes ?");
|
462 |
conservationOnglet.add(markTraitementRGrpChp);
|
552 |
conservationOnglet.add(traitementMarkRGrpChp);
|
463 |
|
553 |
|
464 |
traitementTrukCp = creerChoixMultipleCp("insecteTraitement");
|
554 |
traitementTrukCp = creerChoixMultipleCp("insecteTraitement");
|
465 |
traitementTrukCp.hide();
|
555 |
traitementTrukCp.hide();
|
466 |
traitementTrukCacGrpChp = new CheckBoxGroup();
|
556 |
traitementTrukCacGrpChp = new CheckBoxGroup();
|
467 |
traitementTrukCacGrpChp.setFieldLabel("Si oui, lesquels ?");
|
557 |
traitementTrukCacGrpChp.setFieldLabel("Si oui, lesquels ?");
|
468 |
conservationOnglet.add(traitementTrukCp);
|
558 |
conservationOnglet.add(traitementTrukCp);
|
469 |
|
559 |
|
470 |
RadioGroup markCollectionAcquisitionRGrpChp = creerChoixUniqueRadioGroupe("collection_acquisition_mark", "ouiNon");
|
560 |
collectionAcquisitionMarkRGrpChp = creerChoixUniqueRadioGroupe("collection_acquisition_mark", "ouiNon");
|
471 |
markCollectionAcquisitionRGrpChp.setFieldLabel("Actuellement, vos collections botaniques s'accroissent-elles de nouvelles acquisitions ?");
|
561 |
collectionAcquisitionMarkRGrpChp.setFieldLabel("Actuellement, vos collections botaniques s'accroissent-elles de nouvelles acquisitions ?");
|
472 |
conservationOnglet.add(markCollectionAcquisitionRGrpChp);
|
562 |
conservationOnglet.add(collectionAcquisitionMarkRGrpChp);
|
473 |
|
563 |
|
474 |
RadioGroup markEchantillonAcquisitionRGrpChp = creerChoixUniqueRadioGroupe("echantillon_acquisition_mark", "ouiNon");
|
564 |
echantillonAcquisitionMarkRGrpChp = creerChoixUniqueRadioGroupe("echantillon_acquisition_mark", "ouiNon");
|
475 |
markEchantillonAcquisitionRGrpChp.setFieldLabel("Actuellement, mettez vous en herbier de nouveaux échantillons ?");
|
565 |
echantillonAcquisitionMarkRGrpChp.setFieldLabel("Actuellement, mettez vous en herbier de nouveaux échantillons ?");
|
476 |
conservationOnglet.add(markEchantillonAcquisitionRGrpChp);
|
566 |
conservationOnglet.add(echantillonAcquisitionMarkRGrpChp);
|
477 |
|
567 |
|
478 |
traitementAcquisitionMarkRGrpChp = creerChoixUniqueRadioGroupe("traitement_acquisition_mark", "ouiNon");
|
568 |
traitementAcquisitionMarkRGrpChp = creerChoixUniqueRadioGroupe("traitement_acquisition_mark", "ouiNon");
|
479 |
traitementAcquisitionMarkRGrpChp.hide();
|
569 |
traitementAcquisitionMarkRGrpChp.hide();
|
480 |
traitementAcquisitionMarkRGrpChp.setFieldLabel("Si oui, faites-vous un traitement contre les insectes avant l'intégration dans vos collections ?");
|
570 |
traitementAcquisitionMarkRGrpChp.setFieldLabel("Si oui, faites-vous un traitement contre les insectes avant l'intégration dans vos collections ?");
|
481 |
conservationOnglet.add(traitementAcquisitionMarkRGrpChp);
|
571 |
conservationOnglet.add(traitementAcquisitionMarkRGrpChp);
|
482 |
|
572 |
|
483 |
traitementAcquisitionMarkLabel = new LabelField();
|
573 |
traitementAcquisitionMarkLabel = new LabelField();
|
484 |
traitementAcquisitionMarkLabel.hide();
|
574 |
traitementAcquisitionMarkLabel.hide();
|
485 |
traitementAcquisitionMarkLabel.setFieldLabel("Si oui, lesquels ?");
|
575 |
traitementAcquisitionMarkLabel.setFieldLabel("Si oui, lesquels ?");
|
486 |
conservationOnglet.add(traitementAcquisitionMarkLabel);
|
576 |
conservationOnglet.add(traitementAcquisitionMarkLabel);
|
487 |
|
577 |
|
488 |
poisonTraitementTrukCp = creerChoixMultipleCp("poisonTraitement");
|
578 |
poisonTraitementTrukCp = creerChoixMultipleCp("poisonTraitement");
|
489 |
poisonTraitementTrukCp.hide();
|
579 |
poisonTraitementTrukCp.hide();
|
490 |
poisonTraitementTrukCacGrpChp = new CheckBoxGroup();
|
580 |
poisonTraitementTrukCacGrpChp = new CheckBoxGroup();
|
491 |
poisonTraitementTrukCacGrpChp.setFieldLabel("Empoisonnement");
|
581 |
poisonTraitementTrukCacGrpChp.setFieldLabel("Empoisonnement");
|
492 |
poisonTraitementTrukCacGrpChp.setLabelStyle("font-weight:normal;text-decoration:underline;");
|
582 |
poisonTraitementTrukCacGrpChp.setLabelStyle("font-weight:normal;text-decoration:underline;");
|
493 |
poisonTraitementTrukCacGrpChp.setLabelSeparator("");
|
583 |
poisonTraitementTrukCacGrpChp.setLabelSeparator("");
|
494 |
conservationOnglet.add(poisonTraitementTrukCp);
|
584 |
conservationOnglet.add(poisonTraitementTrukCp);
|
495 |
|
585 |
|
496 |
insecteTraitementTrukCp = creerChoixMultipleCp("insecteTraitement");
|
586 |
insecteTraitementTrukCp = creerChoixMultipleCp("insecteTraitement");
|
497 |
insecteTraitementTrukCp.hide();
|
587 |
insecteTraitementTrukCp.hide();
|
498 |
insecteTraitementTrukCacGrpChp = new CheckBoxGroup();
|
588 |
insecteTraitementTrukCacGrpChp = new CheckBoxGroup();
|
499 |
insecteTraitementTrukCacGrpChp.setLabelStyle("font-weight:normal;text-decoration:underline;");
|
589 |
insecteTraitementTrukCacGrpChp.setLabelStyle("font-weight:normal;text-decoration:underline;");
|
500 |
insecteTraitementTrukCacGrpChp.setLabelSeparator("");
|
590 |
insecteTraitementTrukCacGrpChp.setLabelSeparator("");
|
501 |
insecteTraitementTrukCacGrpChp.setFieldLabel("Désinsectisation");
|
591 |
insecteTraitementTrukCacGrpChp.setFieldLabel("Désinsectisation");
|
502 |
conservationOnglet.add(insecteTraitementTrukCp);
|
592 |
conservationOnglet.add(insecteTraitementTrukCp);
|
503 |
|
593 |
|
504 |
return conservationOnglet;
|
594 |
return conservationOnglet;
|
505 |
}
|
595 |
}
|
506 |
|
596 |
|
507 |
private TabItem creerOngletPersonnel() {
|
597 |
private TabItem creerOngletPersonnel() {
|
508 |
personnelOnglet = new TabItem();
|
598 |
personnelOnglet = new TabItem();
|
509 |
personnelOnglet.setText("Personnel");
|
599 |
personnelOnglet.setText("Personnel");
|
510 |
personnelOnglet.setScrollMode(Scroll.AUTO);
|
600 |
personnelOnglet.setScrollMode(Scroll.AUTO);
|
511 |
personnelOnglet.setLayout(creerFormLayout(400, LabelAlign.LEFT, null));
|
601 |
personnelOnglet.setLayout(creerFormLayout(400, LabelAlign.LEFT, null));
|
512 |
|
602 |
|
513 |
NumberField nbreTotalPersonneStructureChp = new NumberField();
|
603 |
nbreTotalPersonneStructureChp = new NumberField();
|
514 |
nbreTotalPersonneStructureChp.setFieldLabel("Nombre de personne travaillant dans l'institution");
|
604 |
nbreTotalPersonneStructureChp.setFieldLabel("Nombre de personne travaillant dans l'institution");
|
515 |
nbreTotalPersonneStructureChp.setFormat(NumberFormat.getFormat("#"));
|
605 |
nbreTotalPersonneStructureChp.setFormat(NumberFormat.getFormat("#"));
|
516 |
nbreTotalPersonneStructureChp.setToolTip("Ce champ doit contenir un nombre");
|
606 |
nbreTotalPersonneStructureChp.setToolTip("Ce champ doit contenir un nombre");
|
517 |
personnelOnglet.add(nbreTotalPersonneStructureChp);
|
607 |
personnelOnglet.add(nbreTotalPersonneStructureChp);
|
518 |
|
608 |
|
519 |
personnelOnglet.add(this.creerGrillePersonnel());
|
609 |
personnelOnglet.add(this.creerGrillePersonnel());
|
520 |
|
610 |
|
521 |
nbreTotalPersonnelChp = new LabelField();
|
611 |
nbreTotalPersonnelChp = new LabelField();
|
522 |
nbreTotalPersonnelChp.setFieldLabel("Nombre de personne travaillant sur les collections");
|
612 |
nbreTotalPersonnelChp.setFieldLabel("Nombre de personne travaillant sur les collections");
|
523 |
nbreTotalPersonnelChp.setLabelSeparator(":");
|
613 |
nbreTotalPersonnelChp.setLabelSeparator(":");
|
524 |
nbreTotalPersonnelChp.setValue(""+grillePersonnel.getStore().getCount());
|
614 |
nbreTotalPersonnelChp.setValue(""+grillePersonnel.getStore().getCount());
|
525 |
personnelOnglet.add(nbreTotalPersonnelChp);
|
615 |
personnelOnglet.add(nbreTotalPersonnelChp);
|
526 |
|
616 |
|
527 |
return personnelOnglet;
|
617 |
return personnelOnglet;
|
528 |
}
|
618 |
}
|
529 |
|
619 |
|
530 |
private ContentPanel creerGrillePersonnel() {
|
620 |
private ContentPanel creerGrillePersonnel() {
|
531 |
|
621 |
|
532 |
List<Personne> personnes = new ArrayList<Personne>();
|
622 |
List<Personne> personnes = new ArrayList<Personne>();
|
533 |
personnes.add(new Personne(Valeur.FONCTION_DIRECTEUR));
|
623 |
personnes.add(new Personne(Valeur.FONCTION_DIRECTEUR));
|
534 |
personnes.add(new Personne(Valeur.FONCTION_CONSERVATEUR));
|
624 |
personnes.add(new Personne(Valeur.FONCTION_CONSERVATEUR));
|
535 |
|
625 |
|
536 |
personnelGrilleMagazin = new ListStore<Personne>();
|
626 |
personnelGrilleMagazin = new ListStore<Personne>();
|
537 |
personnelGrilleMagazin.add(personnes);
|
627 |
personnelGrilleMagazin.add(personnes);
|
538 |
|
628 |
|
539 |
List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
|
629 |
List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
|
540 |
|
630 |
|
541 |
CheckBoxSelectionModel<Personne> sm = new CheckBoxSelectionModel<Personne>();
|
631 |
CheckBoxSelectionModel<Personne> sm = new CheckBoxSelectionModel<Personne>();
|
542 |
configs.add(sm.getColumn());
|
632 |
configs.add(sm.getColumn());
|
543 |
|
633 |
|
544 |
ColumnConfig column = new ColumnConfig("ce_truk_fonction", "Fonction", 100);
|
634 |
ColumnConfig column = new ColumnConfig("ce_truk_fonction", "Fonction", 100);
|
545 |
modele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("fonction"));
|
635 |
modele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("fonction"));
|
546 |
magazinLiFonction = new ListStore<Valeur>();
|
636 |
magazinLiFonction = new ListStore<Valeur>();
|
547 |
magazinLiFonction.add(new ArrayList<Valeur>());
|
637 |
magazinLiFonction.add(new ArrayList<Valeur>());
|
548 |
|
638 |
|
549 |
comboLiFonction = new ComboBox<Valeur>();
|
639 |
comboLiFonction = new ComboBox<Valeur>();
|
550 |
comboLiFonction.setTriggerAction(TriggerAction.ALL);
|
640 |
comboLiFonction.setTriggerAction(TriggerAction.ALL);
|
551 |
comboLiFonction.setEditable(true);
|
641 |
comboLiFonction.setEditable(true);
|
552 |
comboLiFonction.setDisplayField("nom");
|
642 |
comboLiFonction.setDisplayField("nom");
|
553 |
//comboLiStatut.setEmptyText("Sélectionez une fonction...");
|
643 |
//comboLiStatut.setEmptyText("Sélectionez une fonction...");
|
554 |
comboLiFonction.setStore(magazinLiFonction);
|
644 |
comboLiFonction.setStore(magazinLiFonction);
|
555 |
|
645 |
|
556 |
CellEditor fonctionEditor = new CellEditor(comboLiFonction) {
|
646 |
CellEditor fonctionEditor = new CellEditor(comboLiFonction) {
|
557 |
@Override
|
647 |
@Override
|
558 |
public Object preProcessValue(Object value) {
|
648 |
public Object preProcessValue(Object value) {
|
559 |
if (value == null) {
|
649 |
if (value == null) {
|
560 |
return value;
|
650 |
return value;
|
561 |
}
|
651 |
}
|
562 |
//GWT.log("pre : "+value.toString(), null);
|
652 |
//GWT.log("pre : "+value.toString(), null);
|
563 |
return comboLiFonction.getStore().findModel("nom", (String) value);
|
653 |
return comboLiFonction.getStore().findModel("nom", (String) value);
|
564 |
}
|
654 |
}
|
565 |
|
655 |
|
566 |
@Override
|
656 |
@Override
|
567 |
public Object postProcessValue(Object value) {
|
657 |
public Object postProcessValue(Object value) {
|
568 |
if (value == null) {
|
658 |
if (value == null) {
|
569 |
return value;
|
659 |
return value;
|
570 |
}
|
660 |
}
|
571 |
//GWT.log("post : "+value.toString(), null);
|
661 |
//GWT.log("post : "+value.toString(), null);
|
572 |
return ((Valeur) value).get("nom");
|
662 |
return ((Valeur) value).get("nom");
|
573 |
}
|
663 |
}
|
574 |
};
|
664 |
};
|
575 |
column.setEditor(fonctionEditor);
|
665 |
column.setEditor(fonctionEditor);
|
576 |
configs.add(column);
|
666 |
configs.add(column);
|
577 |
|
667 |
|
578 |
column = new ColumnConfig();
|
668 |
column = new ColumnConfig();
|
579 |
column.setId("prenom");
|
669 |
column.setId("prenom");
|
580 |
column.setHeader("Prénom");
|
670 |
column.setHeader("Prénom");
|
581 |
column.setWidth(100);
|
671 |
column.setWidth(100);
|
582 |
TextField<String> prenomChp = new TextField<String>();
|
672 |
TextField<String> prenomChp = new TextField<String>();
|
583 |
prenomChp.setAllowBlank(false);
|
673 |
prenomChp.setAllowBlank(false);
|
584 |
prenomChp.getMessages().setBlankText("Ce champ est obligatoire.");
|
674 |
prenomChp.getMessages().setBlankText("Ce champ est obligatoire.");
|
585 |
prenomChp.setAutoValidate(true);
|
675 |
prenomChp.setAutoValidate(true);
|
586 |
column.setEditor(new CellEditor(prenomChp));
|
676 |
column.setEditor(new CellEditor(prenomChp));
|
587 |
configs.add(column);
|
677 |
configs.add(column);
|
588 |
|
678 |
|
589 |
column = new ColumnConfig();
|
679 |
column = new ColumnConfig();
|
590 |
column.setId("nom");
|
680 |
column.setId("nom");
|
591 |
column.setHeader("Nom");
|
681 |
column.setHeader("Nom");
|
592 |
column.setWidth(100);
|
682 |
column.setWidth(100);
|
593 |
TextField<String> nomChp = new TextField<String>();
|
683 |
TextField<String> nomChp = new TextField<String>();
|
594 |
nomChp.setAllowBlank(false);
|
684 |
nomChp.setAllowBlank(false);
|
595 |
nomChp.getMessages().setBlankText("Ce champ est obligatoire.");
|
685 |
nomChp.getMessages().setBlankText("Ce champ est obligatoire.");
|
596 |
nomChp.setAutoValidate(true);
|
686 |
nomChp.setAutoValidate(true);
|
597 |
column.setEditor(new CellEditor(nomChp));
|
687 |
column.setEditor(new CellEditor(nomChp));
|
598 |
configs.add(column);
|
688 |
configs.add(column);
|
599 |
|
689 |
|
600 |
column = new ColumnConfig("tel", "Téléphone", 100);
|
690 |
column = new ColumnConfig("tel", "Téléphone", 100);
|
601 |
TextField<String> telChp = new TextField<String>();
|
691 |
TextField<String> telChp = new TextField<String>();
|
602 |
column.setEditor(new CellEditor(telChp));
|
692 |
column.setEditor(new CellEditor(telChp));
|
603 |
configs.add(column);
|
693 |
configs.add(column);
|
604 |
|
694 |
|
605 |
column = new ColumnConfig("fax", "Fax", 100);
|
695 |
column = new ColumnConfig("fax", "Fax", 100);
|
606 |
TextField<String> faxChp = new TextField<String>();
|
696 |
TextField<String> faxChp = new TextField<String>();
|
607 |
column.setEditor(new CellEditor(faxChp));
|
697 |
column.setEditor(new CellEditor(faxChp));
|
608 |
configs.add(column);
|
698 |
configs.add(column);
|
609 |
|
699 |
|
610 |
column = new ColumnConfig("courriel", "Courriel", 100);
|
700 |
column = new ColumnConfig("courriel", "Courriel", 100);
|
611 |
TextField<String> emailChp = new TextField<String>();
|
701 |
TextField<String> emailChp = new TextField<String>();
|
612 |
column.setEditor(new CellEditor(emailChp));
|
702 |
column.setEditor(new CellEditor(emailChp));
|
613 |
configs.add(column);
|
703 |
configs.add(column);
|
614 |
|
704 |
|
615 |
modele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("statut"));
|
705 |
modele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("statut"));
|
616 |
magazinLiStatut = new ListStore<Valeur>();
|
706 |
magazinLiStatut = new ListStore<Valeur>();
|
617 |
magazinLiStatut.add(new ArrayList<Valeur>());
|
707 |
magazinLiStatut.add(new ArrayList<Valeur>());
|
618 |
|
708 |
|
619 |
comboLiStatut = new ComboBox<Valeur>();
|
709 |
comboLiStatut = new ComboBox<Valeur>();
|
620 |
comboLiStatut.setTriggerAction(TriggerAction.ALL);
|
710 |
comboLiStatut.setTriggerAction(TriggerAction.ALL);
|
621 |
comboLiStatut.setEditable(false);
|
711 |
comboLiStatut.setEditable(false);
|
622 |
comboLiStatut.setDisplayField("nom");
|
712 |
comboLiStatut.setDisplayField("nom");
|
623 |
comboLiStatut.setEmptyText("Sélectionez un statut...");
|
713 |
comboLiStatut.setEmptyText("Sélectionez un statut...");
|
624 |
comboLiStatut.setStore(magazinLiStatut);
|
714 |
comboLiStatut.setStore(magazinLiStatut);
|
625 |
|
715 |
|
626 |
CellEditor statutEditor = new CellEditor(comboLiStatut) {
|
716 |
CellEditor statutEditor = new CellEditor(comboLiStatut) {
|
627 |
@Override
|
717 |
@Override
|
628 |
public Object preProcessValue(Object value) {
|
718 |
public Object preProcessValue(Object value) {
|
629 |
if (value == null) {
|
719 |
if (value == null) {
|
630 |
return value;
|
720 |
return value;
|
631 |
}
|
721 |
}
|
632 |
//GWT.log("pre : "+value.toString(), null);
|
722 |
//GWT.log("pre : "+value.toString(), null);
|
633 |
return comboLiStatut.getStore().findModel("nom", (String) value);
|
723 |
return comboLiStatut.getStore().findModel("nom", (String) value);
|
634 |
}
|
724 |
}
|
635 |
|
725 |
|
636 |
@Override
|
726 |
@Override
|
637 |
public Object postProcessValue(Object value) {
|
727 |
public Object postProcessValue(Object value) {
|
638 |
if (value == null) {
|
728 |
if (value == null) {
|
639 |
return value;
|
729 |
return value;
|
640 |
}
|
730 |
}
|
641 |
//GWT.log("post : "+value.toString(), null);
|
731 |
//GWT.log("post : "+value.toString(), null);
|
642 |
return ((Valeur) value).get("nom");
|
732 |
return ((Valeur) value).get("nom");
|
643 |
}
|
733 |
}
|
644 |
};
|
734 |
};
|
645 |
column = new ColumnConfig("statut", "Statut", 100);
|
735 |
column = new ColumnConfig("statut", "Statut", 100);
|
646 |
column.setEditor(statutEditor);
|
736 |
column.setEditor(statutEditor);
|
647 |
configs.add(column);
|
737 |
configs.add(column);
|
648 |
|
738 |
|
649 |
column = new ColumnConfig("tps_w", "Temps travail", 100);
|
739 |
column = new ColumnConfig("tps_w", "Temps travail", 100);
|
650 |
column.setNumberFormat(NumberFormat.getFormat("##"));
|
740 |
column.setNumberFormat(NumberFormat.getFormat("##"));
|
651 |
NumberField tpsWChp = new NumberField();
|
741 |
NumberField tpsWChp = new NumberField();
|
652 |
tpsWChp.setFormat(NumberFormat.getFormat("##"));
|
742 |
tpsWChp.setFormat(NumberFormat.getFormat("##"));
|
653 |
tpsWChp.setToolTip("Ce champ doit contenir un nombre");
|
743 |
tpsWChp.setToolTip("Ce champ doit contenir un nombre");
|
654 |
column.setEditor(new CellEditor(tpsWChp));
|
744 |
column.setEditor(new CellEditor(tpsWChp));
|
655 |
configs.add(column);
|
745 |
configs.add(column);
|
656 |
|
746 |
|
657 |
column = new ColumnConfig("specialites", "Spécialités botaniques", 150);
|
747 |
column = new ColumnConfig("specialites", "Spécialités botaniques", 150);
|
658 |
TextField<String> speChp = new TextField<String>();
|
748 |
TextField<String> speChp = new TextField<String>();
|
659 |
column.setEditor(new CellEditor(speChp));
|
749 |
column.setEditor(new CellEditor(speChp));
|
660 |
configs.add(column);
|
750 |
configs.add(column);
|
661 |
|
751 |
|
662 |
CheckColumnConfig checkColumn = new CheckColumnConfig("mark_contact", "Contact ?", 60);
|
752 |
CheckColumnConfig checkColumn = new CheckColumnConfig("mark_contact", "Contact ?", 60);
|
663 |
configs.add(checkColumn);
|
753 |
configs.add(checkColumn);
|
664 |
|
754 |
|
665 |
ContentPanel cp = new ContentPanel();
|
755 |
ContentPanel cp = new ContentPanel();
|
666 |
cp.setHeading("Personnes travaillant sur les collections");
|
756 |
cp.setHeading("Personnes travaillant sur les collections");
|
667 |
cp.setIconStyle("icone-table");
|
757 |
cp.setIconStyle("icone-table");
|
668 |
cp.setScrollMode(Scroll.AUTO);
|
758 |
cp.setScrollMode(Scroll.AUTO);
|
669 |
cp.setLayout(new FitLayout());
|
759 |
cp.setLayout(new FitLayout());
|
670 |
cp.setSize(1100, 200);
|
760 |
cp.setSize(1100, 200);
|
671 |
cp.setFrame(true);
|
761 |
cp.setFrame(true);
|
672 |
|
762 |
|
673 |
ToolBar toolBar = new ToolBar();
|
763 |
ToolBar toolBar = new ToolBar();
|
674 |
|
764 |
|
675 |
TextToolItem ajouterPersonnelBtn = new TextToolItem("Ajouter", "icone-vcard-ajouter");
|
765 |
TextToolItem ajouterPersonnelBtn = new TextToolItem("Ajouter", "icone-vcard-ajouter");
|
676 |
ajouterPersonnelBtn.addSelectionListener(new SelectionListener<ToolBarEvent>() {
|
766 |
ajouterPersonnelBtn.addSelectionListener(new SelectionListener<ToolBarEvent>() {
|
677 |
@Override
|
767 |
@Override
|
678 |
public void componentSelected(ToolBarEvent ce) {
|
768 |
public void componentSelected(ToolBarEvent ce) {
|
679 |
Personne personne = new Personne();
|
769 |
Personne personne = new Personne();
|
680 |
grillePersonnel.stopEditing();
|
770 |
grillePersonnel.stopEditing();
|
681 |
personnelGrilleMagazin.insert(personne, 0);
|
771 |
personnelGrilleMagazin.insert(personne, 0);
|
682 |
grillePersonnel.startEditing(0, 0);
|
772 |
grillePersonnel.startEditing(0, 0);
|
683 |
// Mise à jour du nombre de personnel travaillant sur les collections
|
773 |
// Mise à jour du nombre de personnel travaillant sur les collections
|
684 |
nbreTotalPersonnelChp.setValue(""+grillePersonnel.getStore().getCount());
|
774 |
nbreTotalPersonnelChp.setValue(""+grillePersonnel.getStore().getCount());
|
685 |
// Activation du bouton supprimer si la grille contient un élément
|
775 |
// Activation du bouton supprimer si la grille contient un élément
|
686 |
if (grillePersonnel.getStore().getCount() > 0) {
|
776 |
if (grillePersonnel.getStore().getCount() > 0) {
|
687 |
ce.component.enable();
|
777 |
ce.component.enable();
|
688 |
}
|
778 |
}
|
689 |
}
|
779 |
}
|
690 |
});
|
780 |
});
|
691 |
toolBar.add(ajouterPersonnelBtn);
|
781 |
toolBar.add(ajouterPersonnelBtn);
|
692 |
toolBar.add(new SeparatorToolItem());
|
782 |
toolBar.add(new SeparatorToolItem());
|
693 |
TextToolItem supprimerPersonnelBtn = new TextToolItem("Supprimer", "icone-vcard-supprimer");
|
783 |
TextToolItem supprimerPersonnelBtn = new TextToolItem("Supprimer", "icone-vcard-supprimer");
|
694 |
supprimerPersonnelBtn.addSelectionListener(new SelectionListener<ToolBarEvent>() {
|
784 |
supprimerPersonnelBtn.addSelectionListener(new SelectionListener<ToolBarEvent>() {
|
695 |
@Override
|
785 |
@Override
|
696 |
public void componentSelected(ToolBarEvent ce) {
|
786 |
public void componentSelected(ToolBarEvent ce) {
|
697 |
grillePersonnel.getStore().remove(grillePersonnel.getStore().getAt(0));
|
787 |
grillePersonnel.getStore().remove(grillePersonnel.getStore().getAt(0));
|
698 |
// Mise à jour du nombre de personnel travaillant sur les collections
|
788 |
// Mise à jour du nombre de personnel travaillant sur les collections
|
699 |
nbreTotalPersonnelChp.setValue(""+grillePersonnel.getStore().getCount());
|
789 |
nbreTotalPersonnelChp.setValue(""+grillePersonnel.getStore().getCount());
|
700 |
// Désactivation du bouton supprimer si la grille contient plus d'élément
|
790 |
// Désactivation du bouton supprimer si la grille contient plus d'élément
|
701 |
if (grillePersonnel.getStore().getCount() == 0) {
|
791 |
if (grillePersonnel.getStore().getCount() == 0) {
|
702 |
ce.item.disable();
|
792 |
ce.item.disable();
|
703 |
}
|
793 |
}
|
704 |
}
|
794 |
}
|
705 |
});
|
795 |
});
|
706 |
toolBar.add(supprimerPersonnelBtn);
|
796 |
toolBar.add(supprimerPersonnelBtn);
|
707 |
cp.setTopComponent(toolBar);
|
797 |
cp.setTopComponent(toolBar);
|
708 |
|
798 |
|
709 |
ColumnModel cm = new ColumnModel(configs);
|
799 |
ColumnModel cm = new ColumnModel(configs);
|
710 |
|
800 |
|
711 |
grillePersonnel = new EditorGrid<Personne>(personnelGrilleMagazin, cm);
|
801 |
grillePersonnel = new EditorGrid<Personne>(personnelGrilleMagazin, cm);
|
712 |
grillePersonnel.setBorders(true);
|
802 |
grillePersonnel.setBorders(true);
|
713 |
grillePersonnel.setSelectionModel(sm);
|
803 |
grillePersonnel.setSelectionModel(sm);
|
714 |
grillePersonnel.addPlugin(sm);
|
804 |
grillePersonnel.addPlugin(sm);
|
715 |
grillePersonnel.addPlugin(checkColumn);
|
805 |
grillePersonnel.addPlugin(checkColumn);
|
716 |
grillePersonnel.setAutoExpandColumn("specialites");
|
806 |
grillePersonnel.setAutoExpandColumn("specialites");
|
717 |
|
807 |
|
718 |
cp.add(grillePersonnel);
|
808 |
cp.add(grillePersonnel);
|
719 |
return cp;
|
809 |
return cp;
|
720 |
}
|
810 |
}
|
721 |
|
811 |
|
722 |
private TabItem creerOngletIdentification() {
|
812 |
private TabItem creerOngletIdentification() {
|
723 |
//+-----------------------------------------------------------------------------------------------------------+
|
813 |
//+-----------------------------------------------------------------------------------------------------------+
|
724 |
// Onlget formulaire IDENTIFICATION
|
814 |
// Onlget formulaire IDENTIFICATION
|
725 |
TabItem identificationOnglet = new TabItem();
|
815 |
TabItem identificationOnglet = new TabItem();
|
726 |
identificationOnglet.setText("Identification");
|
816 |
identificationOnglet.setText("Identification");
|
727 |
identificationOnglet.setLayout(new FormLayout());
|
817 |
identificationOnglet.setLayout(new FormLayout());
|
728 |
|
818 |
|
729 |
//+-----------------------------------------------------------------------------------------------------------+
|
819 |
//+-----------------------------------------------------------------------------------------------------------+
|
730 |
// Champs cachés
|
820 |
// Champs cachés
|
731 |
idStructureChp = new HiddenField<String>();
|
821 |
idStructureChp = new HiddenField<String>();
|
732 |
|
822 |
|
733 |
//+-----------------------------------------------------------------------------------------------------------+
|
823 |
//+-----------------------------------------------------------------------------------------------------------+
|
734 |
// Fieldset IDENTITÉ
|
824 |
// Fieldset IDENTITÉ
|
735 |
FieldSet fieldSetIdentite = new FieldSet();
|
825 |
FieldSet fieldSetIdentite = new FieldSet();
|
736 |
fieldSetIdentite.setHeading("Identité");
|
826 |
fieldSetIdentite.setHeading("Identité");
|
737 |
fieldSetIdentite.setCollapsible(true);
|
827 |
fieldSetIdentite.setCollapsible(true);
|
738 |
fieldSetIdentite.setLayout(creerFormLayout(200, LabelAlign.LEFT, 4));
|
828 |
fieldSetIdentite.setLayout(creerFormLayout(200, LabelAlign.LEFT, 4));
|
739 |
|
829 |
|
740 |
nomStructureChp = new TextField<String>();
|
830 |
nomStructureChp = new TextField<String>();
|
741 |
nomStructureChp.setTabIndex(100);
|
831 |
nomStructureChp.setTabIndex(100);
|
742 |
nomStructureChp.setFieldLabel("Nom de la structure");
|
832 |
nomStructureChp.setFieldLabel("Nom de la structure");
|
743 |
nomStructureChp.setAllowBlank(false);
|
833 |
nomStructureChp.setAllowBlank(false);
|
744 |
nomStructureChp.getMessages().setBlankText("Ce champ est obligatoire.");
|
834 |
nomStructureChp.getMessages().setBlankText("Ce champ est obligatoire.");
|
745 |
fieldSetIdentite.add(nomStructureChp, new FormData(450, 0));
|
835 |
fieldSetIdentite.add(nomStructureChp, new FormData(450, 0));
|
746 |
|
836 |
|
747 |
// Création du sous-formulaire : Acronyme
|
837 |
// Création du sous-formulaire : Acronyme
|
748 |
LayoutContainer ligne = new LayoutContainer();
|
838 |
LayoutContainer ligne = new LayoutContainer();
|
749 |
ligne.setLayout(new ColumnLayout());
|
839 |
ligne.setLayout(new ColumnLayout());
|
750 |
LayoutContainer gauche = new LayoutContainer();
|
840 |
LayoutContainer gauche = new LayoutContainer();
|
751 |
gauche.setLayout(creerFormLayout(200, LabelAlign.LEFT, 0));
|
841 |
gauche.setLayout(creerFormLayout(200, LabelAlign.LEFT, 0));
|
752 |
LayoutContainer droite = new LayoutContainer();
|
842 |
LayoutContainer droite = new LayoutContainer();
|
753 |
droite.setLayout(creerFormLayout(0, null, 0));
|
843 |
droite.setLayout(creerFormLayout(0, null, 0));
|
754 |
|
844 |
|
755 |
ListStore<InterneValeur> acronymes = new ListStore<InterneValeur>();
|
845 |
ListStore<InterneValeur> acronymes = new ListStore<InterneValeur>();
|
756 |
acronymes.add(InterneValeurListe.getTypeAcronyme());
|
846 |
acronymes.add(InterneValeurListe.getTypeAcronyme());
|
757 |
|
847 |
|
758 |
comboAcronyme = new ComboBox<InterneValeur>();
|
848 |
comboAcronyme = new ComboBox<InterneValeur>();
|
759 |
comboAcronyme.setTabIndex(101);
|
849 |
comboAcronyme.setTabIndex(101);
|
760 |
comboAcronyme.setEmptyText("Sélectioner un type d'acronyme...");
|
850 |
comboAcronyme.setEmptyText("Sélectioner un type d'acronyme...");
|
761 |
comboAcronyme.setFieldLabel("Acronymes");
|
851 |
comboAcronyme.setFieldLabel("Acronymes");
|
762 |
comboAcronyme.setDisplayField("nom");
|
852 |
comboAcronyme.setDisplayField("nom");
|
763 |
comboAcronyme.setStore(acronymes);
|
853 |
comboAcronyme.setStore(acronymes);
|
764 |
comboAcronyme.setEditable(false);
|
854 |
comboAcronyme.setEditable(false);
|
765 |
comboAcronyme.setTypeAhead(true);
|
855 |
comboAcronyme.setTypeAhead(true);
|
766 |
comboAcronyme.setTriggerAction(TriggerAction.ALL);
|
856 |
comboAcronyme.setTriggerAction(TriggerAction.ALL);
|
767 |
comboAcronyme.addSelectionChangedListener(new SelectionChangedListener<InterneValeur>() {
|
857 |
comboAcronyme.addSelectionChangedListener(new SelectionChangedListener<InterneValeur>() {
|
768 |
@Override
|
858 |
@Override
|
769 |
public void selectionChanged(SelectionChangedEvent<InterneValeur> se) {
|
859 |
public void selectionChanged(SelectionChangedEvent<InterneValeur> se) {
|
770 |
String acronymeAbr = se.getSelectedItem().getAbr();
|
860 |
String acronymeAbr = se.getSelectedItem().getAbr();
|
771 |
if (acronymeAbr.equals("IH")) {
|
861 |
if (acronymeAbr.equals("IH")) {
|
772 |
mnhnChp.hide();
|
862 |
mnhnChp.hide();
|
773 |
ihChp.show();
|
863 |
ihChp.show();
|
774 |
} else if (acronymeAbr.equals("MNHN")) {
|
864 |
} else if (acronymeAbr.equals("MNHN")) {
|
775 |
ihChp.hide();
|
865 |
ihChp.hide();
|
776 |
mnhnChp.show();
|
866 |
mnhnChp.show();
|
777 |
} else if (acronymeAbr.equals("")) {
|
867 |
} else if (acronymeAbr.equals("")) {
|
778 |
ihChp.hide();
|
868 |
ihChp.hide();
|
779 |
mnhnChp.hide();
|
869 |
mnhnChp.hide();
|
780 |
comboAcronyme.clearSelections();
|
870 |
comboAcronyme.clearSelections();
|
781 |
}
|
871 |
}
|
782 |
}
|
872 |
}
|
783 |
});
|
873 |
});
|
784 |
gauche.add(comboAcronyme);
|
874 |
gauche.add(comboAcronyme);
|
785 |
|
875 |
|
786 |
ihChp = new TextField<String>();
|
876 |
ihChp = new TextField<String>();
|
787 |
//ihChp.setEmptyText("Index Herbariorum");
|
877 |
//ihChp.setEmptyText("Index Herbariorum");
|
788 |
ihChp.setTabIndex(102);
|
878 |
ihChp.setTabIndex(102);
|
789 |
ihChp.setLabelSeparator("");
|
879 |
ihChp.setLabelSeparator("");
|
790 |
ihChp.setToolTip("Index Herbariorum : herbier de plus de 5000 échantillons");
|
880 |
ihChp.setToolTip("Index Herbariorum : herbier de plus de 5000 échantillons");
|
791 |
ihChp.hide();
|
881 |
ihChp.hide();
|
792 |
droite.add(ihChp);
|
882 |
droite.add(ihChp);
|
793 |
|
883 |
|
794 |
mnhnChp = new TextField<String>();
|
884 |
mnhnChp = new TextField<String>();
|
795 |
mnhnChp.setTabIndex(103);
|
885 |
mnhnChp.setTabIndex(103);
|
796 |
//mnhnChp.setEmptyText("MNHN");
|
886 |
//mnhnChp.setEmptyText("MNHN");
|
797 |
mnhnChp.setLabelSeparator("");
|
887 |
mnhnChp.setLabelSeparator("");
|
798 |
mnhnChp.setToolTip("Acronyme MNHN : herbier de moins de 5000 échantillons");
|
888 |
mnhnChp.setToolTip("Acronyme MNHN : herbier de moins de 5000 échantillons");
|
799 |
mnhnChp.hide();
|
889 |
mnhnChp.hide();
|
800 |
droite.add(mnhnChp);
|
890 |
droite.add(mnhnChp);
|
801 |
|
891 |
|
802 |
ligne.add(gauche, new ColumnData(0.5));
|
892 |
ligne.add(gauche, new ColumnData(0.5));
|
803 |
ligne.add(droite, new ColumnData(0.5));
|
893 |
ligne.add(droite, new ColumnData(0.5));
|
804 |
fieldSetIdentite.add(ligne);
|
894 |
fieldSetIdentite.add(ligne);
|
805 |
|
895 |
|
806 |
// Création du sous-formulaire : Type de Structure
|
896 |
// Création du sous-formulaire : Type de Structure
|
807 |
LayoutContainer ligneTs = new LayoutContainer();
|
897 |
LayoutContainer ligneTs = new LayoutContainer();
|
808 |
ligneTs.setLayout(new ColumnLayout());
|
898 |
ligneTs.setLayout(new ColumnLayout());
|
809 |
|
899 |
|
810 |
LayoutContainer gaucheTs = new LayoutContainer();
|
900 |
LayoutContainer gaucheTs = new LayoutContainer();
|
811 |
gaucheTs.setLayout(creerFormLayout(200, LabelAlign.LEFT, 0));
|
901 |
gaucheTs.setLayout(creerFormLayout(200, LabelAlign.LEFT, 0));
|
812 |
|
902 |
|
813 |
LayoutContainer droiteTs = new LayoutContainer();
|
903 |
LayoutContainer droiteTs = new LayoutContainer();
|
814 |
droiteTs.setLayout(creerFormLayout(0, null, 0));
|
904 |
droiteTs.setLayout(creerFormLayout(0, null, 0));
|
815 |
|
905 |
|
816 |
ListStore<InterneValeur> typesStructure = new ListStore<InterneValeur>();
|
906 |
ListStore<InterneValeur> typesStructure = new ListStore<InterneValeur>();
|
817 |
typesStructure.add(InterneValeurListe.getTypeStructure());
|
907 |
typesStructure.add(InterneValeurListe.getTypeStructure());
|
818 |
|
908 |
|
819 |
comboTypeStructure = new ComboBox<InterneValeur>();
|
909 |
comboTypeStructure = new ComboBox<InterneValeur>();
|
820 |
comboTypeStructure.setTabIndex(104);
|
910 |
comboTypeStructure.setTabIndex(104);
|
821 |
comboTypeStructure.setEmptyText("Sélectioner un type de structure...");
|
911 |
comboTypeStructure.setEmptyText("Sélectioner un type de structure...");
|
822 |
comboTypeStructure.setFieldLabel("Statut des structures");
|
912 |
comboTypeStructure.setFieldLabel("Statut des structures");
|
823 |
comboTypeStructure.setDisplayField("nom");
|
913 |
comboTypeStructure.setDisplayField("nom");
|
824 |
comboTypeStructure.setStore(typesStructure);
|
914 |
comboTypeStructure.setStore(typesStructure);
|
825 |
comboTypeStructure.setEditable(false);
|
915 |
comboTypeStructure.setEditable(false);
|
826 |
comboTypeStructure.setTypeAhead(true);
|
916 |
comboTypeStructure.setTypeAhead(true);
|
827 |
comboTypeStructure.setTriggerAction(TriggerAction.ALL);
|
917 |
comboTypeStructure.setTriggerAction(TriggerAction.ALL);
|
828 |
comboTypeStructure.addSelectionChangedListener(new SelectionChangedListener<InterneValeur>() {
|
918 |
comboTypeStructure.addSelectionChangedListener(new SelectionChangedListener<InterneValeur>() {
|
829 |
@Override
|
919 |
@Override
|
830 |
public void selectionChanged(SelectionChangedEvent<InterneValeur> se) {
|
920 |
public void selectionChanged(SelectionChangedEvent<InterneValeur> se) {
|
831 |
String typeAbr = se.getSelectedItem().getAbr();
|
921 |
String typeAbr = se.getSelectedItem().getAbr();
|
832 |
if (typeAbr.equals("stpu")) {
|
922 |
if (typeAbr.equals("stpu")) {
|
833 |
comboLstpr.hide();
|
923 |
comboLstpr.hide();
|
834 |
comboLstpu.show();
|
924 |
comboLstpu.show();
|
835 |
} else if (typeAbr.equals("stpr")) {
|
925 |
} else if (typeAbr.equals("stpr")) {
|
836 |
comboLstpu.hide();
|
926 |
comboLstpu.hide();
|
837 |
comboLstpr.show();
|
927 |
comboLstpr.show();
|
838 |
} else if (typeAbr.equals("")) {
|
928 |
} else if (typeAbr.equals("")) {
|
839 |
comboLstpr.hide();
|
929 |
comboLstpr.hide();
|
840 |
comboLstpu.hide();
|
930 |
comboLstpu.hide();
|
841 |
comboTypeStructure.clearSelections();
|
931 |
comboTypeStructure.clearSelections();
|
842 |
}
|
932 |
}
|
843 |
}
|
933 |
}
|
844 |
});
|
934 |
});
|
845 |
gaucheTs.add(comboTypeStructure);
|
935 |
gaucheTs.add(comboTypeStructure);
|
846 |
|
936 |
|
847 |
modele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("stpu"));
|
937 |
modele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("stpu"));
|
848 |
magazinLstpu = new ListStore<Valeur>();
|
938 |
magazinLstpu = new ListStore<Valeur>();
|
849 |
magazinLstpu.add(new ArrayList<Valeur>());
|
939 |
magazinLstpu.add(new ArrayList<Valeur>());
|
850 |
comboLstpu = new ComboBox<Valeur>();
|
940 |
comboLstpu = new ComboBox<Valeur>();
|
851 |
comboLstpu.setTabIndex(105);
|
941 |
comboLstpu.setTabIndex(105);
|
852 |
//comboLstpu.setFieldLabel("Statut des structures publiques");
|
942 |
//comboLstpu.setFieldLabel("Statut des structures publiques");
|
853 |
comboLstpu.setLabelSeparator("");
|
943 |
comboLstpu.setLabelSeparator("");
|
854 |
comboLstpu.setDisplayField("nom");
|
944 |
comboLstpu.setDisplayField("nom");
|
855 |
comboLstpu.setEditable(false);
|
945 |
comboLstpu.setEditable(false);
|
856 |
comboLstpu.setTriggerAction(TriggerAction.ALL);
|
946 |
comboLstpu.setTriggerAction(TriggerAction.ALL);
|
857 |
comboLstpu.setStore(magazinLstpu);
|
947 |
comboLstpu.setStore(magazinLstpu);
|
858 |
comboLstpu.hide();
|
948 |
comboLstpu.hide();
|
859 |
droiteTs.add(comboLstpu);
|
949 |
droiteTs.add(comboLstpu);
|
860 |
|
950 |
|
861 |
modele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("stpr"));
|
951 |
modele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("stpr"));
|
862 |
magazinLstpr = new ListStore<Valeur>();
|
952 |
magazinLstpr = new ListStore<Valeur>();
|
863 |
magazinLstpr.add(new ArrayList<Valeur>());
|
953 |
magazinLstpr.add(new ArrayList<Valeur>());
|
864 |
comboLstpr = new ComboBox<Valeur>();
|
954 |
comboLstpr = new ComboBox<Valeur>();
|
865 |
comboLstpr.setTabIndex(106);
|
955 |
comboLstpr.setTabIndex(106);
|
866 |
//comboLstpr.setFieldLabel("Statut des structures privées");
|
956 |
//comboLstpr.setFieldLabel("Statut des structures privées");
|
867 |
comboLstpr.setLabelSeparator("");
|
957 |
comboLstpr.setLabelSeparator("");
|
868 |
comboLstpr.setDisplayField("nom");
|
958 |
comboLstpr.setDisplayField("nom");
|
869 |
comboLstpr.setEditable(false);
|
959 |
comboLstpr.setEditable(false);
|
870 |
comboLstpr.setTriggerAction(TriggerAction.ALL);
|
960 |
comboLstpr.setTriggerAction(TriggerAction.ALL);
|
871 |
comboLstpr.setStore(magazinLstpr);
|
961 |
comboLstpr.setStore(magazinLstpr);
|
872 |
comboLstpr.hide();
|
962 |
comboLstpr.hide();
|
873 |
droiteTs.add(comboLstpr);
|
963 |
droiteTs.add(comboLstpr);
|
874 |
|
964 |
|
875 |
ligneTs.add(gaucheTs, new ColumnData(0.5));
|
965 |
ligneTs.add(gaucheTs, new ColumnData(0.5));
|
876 |
ligneTs.add(droiteTs, new ColumnData(0.5));
|
966 |
ligneTs.add(droiteTs, new ColumnData(0.5));
|
877 |
fieldSetIdentite.add(ligneTs);
|
967 |
fieldSetIdentite.add(ligneTs);
|
878 |
|
968 |
|
879 |
dateFondationChp = new DateField();
|
969 |
dateFondationChp = new DateField();
|
880 |
dateFondationChp.setTabIndex(107);
|
970 |
dateFondationChp.setTabIndex(107);
|
881 |
dateFondationChp.setFieldLabel("Date de fondation");
|
971 |
dateFondationChp.setFieldLabel("Date de fondation");
|
882 |
dateFondationChp.getPropertyEditor().getFormat();
|
972 |
dateFondationChp.getPropertyEditor().getFormat();
|
883 |
dateFondationChp.getPropertyEditor().setFormat(DateTimeFormat.getFormat("dd/MM/yyyy"));
|
973 |
dateFondationChp.getPropertyEditor().setFormat(DateTimeFormat.getFormat("dd/MM/yyyy"));
|
884 |
dateFondationChp.getMessages().setInvalidText("La valeur saisie n'est pas une date valide. La date doit être au format «jj/mm/aaaa».");
|
974 |
dateFondationChp.getMessages().setInvalidText("La valeur saisie n'est pas une date valide. La date doit être au format «jj/mm/aaaa».");
|
885 |
fieldSetIdentite.add(dateFondationChp);
|
975 |
fieldSetIdentite.add(dateFondationChp);
|
886 |
|
976 |
|
887 |
identificationOnglet.add(fieldSetIdentite);
|
977 |
identificationOnglet.add(fieldSetIdentite);
|
888 |
|
978 |
|
889 |
//+-----------------------------------------------------------------------------------------------------------+
|
979 |
//+-----------------------------------------------------------------------------------------------------------+
|
890 |
// Fieldset ADRESSE
|
980 |
// Fieldset ADRESSE
|
891 |
LayoutContainer principalFdAdresse = new LayoutContainer();
|
981 |
LayoutContainer principalFdAdresse = new LayoutContainer();
|
892 |
principalFdAdresse.setLayout(new ColumnLayout());
|
982 |
principalFdAdresse.setLayout(new ColumnLayout());
|
893 |
|
983 |
|
894 |
LayoutContainer gaucheFdAdresse = new LayoutContainer();
|
984 |
LayoutContainer gaucheFdAdresse = new LayoutContainer();
|
895 |
gaucheFdAdresse.setLayout(creerFormLayout(100, LabelAlign.LEFT, 0));
|
985 |
gaucheFdAdresse.setLayout(creerFormLayout(100, LabelAlign.LEFT, 0));
|
896 |
|
986 |
|
897 |
LayoutContainer droiteFdAdresse = new LayoutContainer();
|
987 |
LayoutContainer droiteFdAdresse = new LayoutContainer();
|
898 |
droiteFdAdresse.setLayout(creerFormLayout(100, LabelAlign.LEFT, 0));
|
988 |
droiteFdAdresse.setLayout(creerFormLayout(100, LabelAlign.LEFT, 0));
|
899 |
|
989 |
|
900 |
FieldSet fieldSetAdresse = new FieldSet();
|
990 |
FieldSet fieldSetAdresse = new FieldSet();
|
901 |
fieldSetAdresse.setHeading("Adresse");
|
991 |
fieldSetAdresse.setHeading("Adresse");
|
902 |
fieldSetAdresse.setCollapsible(true);
|
992 |
fieldSetAdresse.setCollapsible(true);
|
903 |
|
993 |
|
904 |
fieldSetAdresse.setLayout(creerFormLayout(100, LabelAlign.LEFT, 4));
|
994 |
fieldSetAdresse.setLayout(creerFormLayout(100, LabelAlign.LEFT, 4));
|
905 |
|
995 |
|
906 |
adrChp = new TextArea();
|
996 |
adrChp = new TextArea();
|
907 |
adrChp.setTabIndex(108);
|
997 |
adrChp.setTabIndex(108);
|
908 |
adrChp.setFieldLabel("Adresse");
|
998 |
adrChp.setFieldLabel("Adresse");
|
909 |
fieldSetAdresse.add(adrChp, new FormData(550, 0));
|
999 |
fieldSetAdresse.add(adrChp, new FormData(550, 0));
|
910 |
|
1000 |
|
911 |
cpChp = new TextField<String>();
|
1001 |
cpChp = new TextField<String>();
|
912 |
cpChp.setTabIndex(109);
|
1002 |
cpChp.setTabIndex(109);
|
913 |
cpChp.setFieldLabel("Code postal");
|
1003 |
cpChp.setFieldLabel("Code postal");
|
914 |
gaucheFdAdresse.add(cpChp);
|
1004 |
gaucheFdAdresse.add(cpChp);
|
915 |
|
1005 |
|
916 |
villeChp = new TextField<String>();
|
1006 |
villeChp = new TextField<String>();
|
917 |
villeChp.setTabIndex(110);
|
1007 |
villeChp.setTabIndex(110);
|
918 |
villeChp.setFieldLabel("Ville");
|
1008 |
villeChp.setFieldLabel("Ville");
|
919 |
droiteFdAdresse.add(villeChp);
|
1009 |
droiteFdAdresse.add(villeChp);
|
920 |
|
1010 |
|
921 |
regionChp = new TextField<String>();
|
1011 |
regionChp = new TextField<String>();
|
922 |
regionChp.setTabIndex(111);
|
1012 |
regionChp.setTabIndex(111);
|
923 |
regionChp.setFieldLabel("Région");
|
1013 |
regionChp.setFieldLabel("Région");
|
924 |
gaucheFdAdresse.add(regionChp);
|
1014 |
gaucheFdAdresse.add(regionChp);
|
925 |
|
1015 |
|
926 |
//paysChp = new TextField<String>();
|
1016 |
//paysChp = new TextField<String>();
|
927 |
//paysChp.setTabIndex(112);
|
1017 |
//paysChp.setTabIndex(112);
|
928 |
//paysChp.setFieldLabel("Pays");
|
1018 |
//paysChp.setFieldLabel("Pays");
|
929 |
modele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("pays"));
|
1019 |
modele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId("pays"));
|
930 |
magazinPays = new ListStore<Valeur>();
|
1020 |
magazinPays = new ListStore<Valeur>();
|
931 |
magazinPays.add(new ArrayList<Valeur>());
|
1021 |
magazinPays.add(new ArrayList<Valeur>());
|
932 |
comboPays = new ComboBox<Valeur>();
|
1022 |
comboPays = new ComboBox<Valeur>();
|
933 |
comboPays.setTabIndex(112);
|
1023 |
comboPays.setTabIndex(112);
|
934 |
comboPays.setFieldLabel("Pays");
|
1024 |
comboPays.setFieldLabel("Pays");
|
935 |
comboPays.setEmptyText("Sélectioner un pays...");
|
1025 |
comboPays.setEmptyText("Sélectioner un pays...");
|
936 |
comboPays.setEditable(true);
|
1026 |
comboPays.setEditable(true);
|
937 |
comboPays.setLabelSeparator("");
|
1027 |
comboPays.setLabelSeparator("");
|
938 |
comboPays.setDisplayField("nom");
|
1028 |
comboPays.setDisplayField("nom");
|
939 |
comboPays.setTemplate(getTemplatePays());
|
1029 |
comboPays.setTemplate(getTemplatePays());
|
940 |
comboPays.setTypeAhead(true);
|
1030 |
comboPays.setTypeAhead(true);
|
941 |
comboPays.setTriggerAction(TriggerAction.ALL);
|
1031 |
comboPays.setTriggerAction(TriggerAction.ALL);
|
942 |
comboPays.setStore(magazinPays);
|
1032 |
comboPays.setStore(magazinPays);
|
943 |
droiteFdAdresse.add(comboPays);
|
1033 |
droiteFdAdresse.add(comboPays);
|
944 |
|
1034 |
|
945 |
principalFdAdresse.add(gaucheFdAdresse, new ColumnData(.5));
|
1035 |
principalFdAdresse.add(gaucheFdAdresse, new ColumnData(.5));
|
946 |
principalFdAdresse.add(droiteFdAdresse, new ColumnData(.5));
|
1036 |
principalFdAdresse.add(droiteFdAdresse, new ColumnData(.5));
|
947 |
fieldSetAdresse.add(principalFdAdresse);
|
1037 |
fieldSetAdresse.add(principalFdAdresse);
|
948 |
identificationOnglet.add(fieldSetAdresse);
|
1038 |
identificationOnglet.add(fieldSetAdresse);
|
949 |
|
1039 |
|
950 |
//+-----------------------------------------------------------------------------------------------------------+
|
1040 |
//+-----------------------------------------------------------------------------------------------------------+
|
951 |
// Fieldset TÉLÉPHONE et EMAIL
|
1041 |
// Fieldset TÉLÉPHONE et EMAIL
|
952 |
LayoutContainer principalFdTelMail = new LayoutContainer();
|
1042 |
LayoutContainer principalFdTelMail = new LayoutContainer();
|
953 |
principalFdTelMail.setLayout(new ColumnLayout());
|
1043 |
principalFdTelMail.setLayout(new ColumnLayout());
|
954 |
|
1044 |
|
955 |
LayoutContainer gaucheFdTelMail = new LayoutContainer();
|
1045 |
LayoutContainer gaucheFdTelMail = new LayoutContainer();
|
956 |
gaucheFdTelMail.setLayout(creerFormLayout(100, LabelAlign.LEFT, 0));
|
1046 |
gaucheFdTelMail.setLayout(creerFormLayout(100, LabelAlign.LEFT, 0));
|
957 |
|
1047 |
|
958 |
LayoutContainer droiteFdTelMail = new LayoutContainer();
|
1048 |
LayoutContainer droiteFdTelMail = new LayoutContainer();
|
959 |
droiteFdTelMail.setLayout(creerFormLayout(100, LabelAlign.LEFT, 0));
|
1049 |
droiteFdTelMail.setLayout(creerFormLayout(100, LabelAlign.LEFT, 0));
|
960 |
|
1050 |
|
961 |
FieldSet fieldSetTelMail = new FieldSet();
|
1051 |
FieldSet fieldSetTelMail = new FieldSet();
|
962 |
fieldSetTelMail.setHeading("Communication");
|
1052 |
fieldSetTelMail.setHeading("Communication");
|
963 |
fieldSetTelMail.setCollapsible(true);
|
1053 |
fieldSetTelMail.setCollapsible(true);
|
964 |
|
1054 |
|
965 |
fieldSetTelMail.setLayout(creerFormLayout(200, LabelAlign.LEFT, 4));
|
1055 |
fieldSetTelMail.setLayout(creerFormLayout(200, LabelAlign.LEFT, 4));
|
966 |
|
1056 |
|
967 |
telChp = new TextField<String>();
|
1057 |
telChp = new TextField<String>();
|
968 |
telChp.setTabIndex(113);
|
1058 |
telChp.setTabIndex(113);
|
969 |
telChp.setFieldLabel("Téléphone");
|
1059 |
telChp.setFieldLabel("Téléphone");
|
970 |
gaucheFdTelMail.add(telChp);
|
1060 |
gaucheFdTelMail.add(telChp);
|
971 |
|
1061 |
|
972 |
faxChp = new TextField<String>();
|
1062 |
faxChp = new TextField<String>();
|
973 |
faxChp.setTabIndex(114);
|
1063 |
faxChp.setTabIndex(114);
|
974 |
faxChp.setFieldLabel("Fax");
|
1064 |
faxChp.setFieldLabel("Fax");
|
975 |
droiteFdTelMail.add(faxChp);
|
1065 |
droiteFdTelMail.add(faxChp);
|
976 |
|
1066 |
|
977 |
emailChp = new TextField<String>();
|
1067 |
emailChp = new TextField<String>();
|
978 |
emailChp.setTabIndex(115);
|
1068 |
emailChp.setTabIndex(115);
|
979 |
emailChp.setFieldLabel("Courriel");
|
1069 |
emailChp.setFieldLabel("Courriel");
|
980 |
emailChp.setToolTip("Saisir le courriel de l'organisation, pas de courriel individuel. Ex. : accueil@organisation.org");
|
1070 |
emailChp.setToolTip("Saisir le courriel de l'organisation, pas de courriel individuel. Ex. : accueil@organisation.org");
|
981 |
gaucheFdTelMail.add(emailChp);
|
1071 |
gaucheFdTelMail.add(emailChp);
|
982 |
|
1072 |
|
983 |
urlChp = new TextField<String>();
|
1073 |
urlChp = new TextField<String>();
|
984 |
urlChp.setTabIndex(116);
|
1074 |
urlChp.setTabIndex(116);
|
985 |
urlChp.setFieldLabel("Site web");
|
1075 |
urlChp.setFieldLabel("Site web");
|
986 |
droiteFdTelMail.add(urlChp);
|
1076 |
droiteFdTelMail.add(urlChp);
|
987 |
|
1077 |
|
988 |
principalFdTelMail.add(gaucheFdTelMail, new ColumnData(.5));
|
1078 |
principalFdTelMail.add(gaucheFdTelMail, new ColumnData(.5));
|
989 |
principalFdTelMail.add(droiteFdTelMail, new ColumnData(.5));
|
1079 |
principalFdTelMail.add(droiteFdTelMail, new ColumnData(.5));
|
990 |
fieldSetTelMail.add(principalFdTelMail);
|
1080 |
fieldSetTelMail.add(principalFdTelMail);
|
991 |
identificationOnglet.add(fieldSetTelMail);
|
1081 |
identificationOnglet.add(fieldSetTelMail);
|
992 |
|
1082 |
|
993 |
return identificationOnglet;
|
1083 |
return identificationOnglet;
|
994 |
}
|
1084 |
}
|
995 |
|
1085 |
|
996 |
private native String getTemplatePays() /*-{
|
1086 |
private native String getTemplatePays() /*-{
|
997 |
return [
|
1087 |
return [
|
998 |
'<tpl for=".">',
|
1088 |
'<tpl for=".">',
|
999 |
'<div class="x-combo-list-item">{nom} ({abreviation})</div>',
|
1089 |
'<div class="x-combo-list-item">{nom} ({abreviation})</div>',
|
1000 |
'</tpl>'
|
1090 |
'</tpl>'
|
1001 |
].join("");
|
1091 |
].join("");
|
1002 |
}-*/;
|
1092 |
}-*/;
|
1003 |
|
1093 |
|
1004 |
/** Méthode simplifiant la création de FormLayout.
|
1094 |
/** Méthode simplifiant la création de FormLayout.
|
1005 |
* Chacun des paramètres peut prendre la valeur null pour utiliser la valeur par défaut.
|
1095 |
* Chacun des paramètres peut prendre la valeur null pour utiliser la valeur par défaut.
|
1006 |
*
|
1096 |
*
|
1007 |
* @param labelWidth largeur des labels.
|
1097 |
* @param labelWidth largeur des labels.
|
1008 |
* @param labelAlign alignement des labels
|
1098 |
* @param labelAlign alignement des labels
|
1009 |
* @param padding padding du layout
|
1099 |
* @param padding padding du layout
|
1010 |
* @return
|
1100 |
* @return
|
1011 |
*/
|
1101 |
*/
|
1012 |
private FormLayout creerFormLayout(Integer labelWidth, LabelAlign labelAlign, Integer padding) {
|
1102 |
private FormLayout creerFormLayout(Integer labelWidth, LabelAlign labelAlign, Integer padding) {
|
1013 |
FormLayout formLayout = new FormLayout();
|
1103 |
FormLayout formLayout = new FormLayout();
|
1014 |
if (labelWidth != null) {
|
1104 |
if (labelWidth != null) {
|
1015 |
formLayout.setLabelWidth(labelWidth);
|
1105 |
formLayout.setLabelWidth(labelWidth);
|
1016 |
}
|
1106 |
}
|
1017 |
if (labelAlign != null) {
|
1107 |
if (labelAlign != null) {
|
1018 |
formLayout.setLabelAlign(labelAlign);
|
1108 |
formLayout.setLabelAlign(labelAlign);
|
1019 |
}
|
1109 |
}
|
1020 |
if (padding != null) {
|
1110 |
if (padding != null) {
|
1021 |
formLayout.setPadding(padding);
|
1111 |
formLayout.setPadding(padding);
|
1022 |
}
|
1112 |
}
|
1023 |
return formLayout;
|
1113 |
return formLayout;
|
1024 |
}
|
1114 |
}
|
1025 |
|
1115 |
|
1026 |
/** Méthode simplifiant la création de bouton radio oui/non
|
1116 |
/** Méthode simplifiant la création de bouton radio oui/non
|
1027 |
*
|
1117 |
*
|
1028 |
* @param listeNom nom de la liste de valeur
|
1118 |
* @param listeNom nom de la liste de valeur
|
1029 |
* @return
|
1119 |
* @return
|
1030 |
*/
|
1120 |
*/
|
1031 |
private RadioGroup creerChoixUniqueRadioGroupe(String groupeNom, String listeNom) {
|
1121 |
private RadioGroup creerChoixUniqueRadioGroupe(String groupeNom, String listeNom) {
|
1032 |
groupeNom += "_grp";
|
1122 |
groupeNom += "_grp";
|
1033 |
// NOTE : il semblerait qu'il faille aussi utiliser setName() pour éviter tout problème...
|
1123 |
// NOTE : il semblerait qu'il faille aussi utiliser setName() pour éviter tout problème...
|
1034 |
RadioGroup radioGroup = new RadioGroup(groupeNom);
|
1124 |
RadioGroup radioGroup = new RadioGroup(groupeNom);
|
1035 |
radioGroup.setName(groupeNom);
|
1125 |
radioGroup.setName(groupeNom);
|
1036 |
|
1126 |
|
1037 |
if (! listeNom.equals("ouiNon")) {
|
1127 |
if (listeNom.equals("ouiNon")) {
|
1038 |
modele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(listeNom));
|
1128 |
// modele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(listeNom));
|
1039 |
} else {
|
1129 |
//} else {
|
1040 |
ValeurListe ouiNonListe = new ValeurListe();
|
1130 |
ValeurListe ouiNonListe = new ValeurListe();
|
1041 |
ouiNonListe.ajouter(new Valeur("000999", "Oui", "NULL", "NULL"));
|
1131 |
ouiNonListe.ajouter(new Valeur("1", "Oui", "NULL", "NULL"));
|
1042 |
ouiNonListe.ajouter(new Valeur("000998", "Non", "NULL", "NULL"));
|
1132 |
ouiNonListe.ajouter(new Valeur("0", "Non", "NULL", "NULL"));
|
1043 |
creerChoixUniqueBoutonRadio(radioGroup, ouiNonListe);
|
1133 |
creerChoixUniqueBoutonRadio(radioGroup, ouiNonListe);
|
1044 |
}
|
1134 |
}
|
1045 |
|
1135 |
|
1046 |
return radioGroup;
|
1136 |
return radioGroup;
|
1047 |
}
|
1137 |
}
|
1048 |
|
1138 |
|
1049 |
private void creerChoixUniqueBoutonRadio(RadioGroup radioGroupe, ValeurListe listeValeurs) {
|
1139 |
private void creerChoixUniqueBoutonRadio(RadioGroup radioGroupe, ValeurListe listeValeurs) {
|
1050 |
for (Iterator<String> it = listeValeurs.keySet().iterator(); it.hasNext();) {
|
1140 |
for (Iterator<String> it = listeValeurs.keySet().iterator(); it.hasNext();) {
|
1051 |
Valeur val = listeValeurs.get(it.next());
|
1141 |
Valeur val = listeValeurs.get(it.next());
|
1052 |
|
1142 |
|
1053 |
Radio radioBtn = new Radio();
|
1143 |
Radio radioBtn = new Radio();
|
1054 |
radioGroupe.add(radioBtn);
|
- |
|
1055 |
radioBtn.setName(radioGroupe.getName().replace("_grp", ""));
|
1144 |
radioBtn.setName(radioGroupe.getName().replace("_grp", ""));
|
1056 |
//radioBtn.setId(val.getId()+"_"+radioBtn.getName());
|
1145 |
radioBtn.setId(val.getId()+"_"+radioBtn.getName());
|
1057 |
radioBtn.setBoxLabel(val.getNom());
|
1146 |
radioBtn.setBoxLabel(val.getNom());
|
- |
|
1147 |
radioBtn.setValueAttribute(val.getId());
|
1058 |
radioBtn.addListener(Events.Change, new Listener<ComponentEvent>() {
|
1148 |
radioBtn.addListener(Events.Change, new Listener<ComponentEvent>() {
|
1059 |
|
1149 |
|
1060 |
public void handleEvent(ComponentEvent be) {
|
1150 |
public void handleEvent(ComponentEvent be) {
|
1061 |
//Window.alert(((Radio) be.component).getName());
|
1151 |
//Window.alert(((Radio) be.component).getName());
|
1062 |
afficherChampSupplementaire(((Radio) be.component));
|
1152 |
afficherChampSupplementaire(((Radio) be.component));
|
1063 |
}
|
1153 |
}
|
1064 |
|
1154 |
|
1065 |
});
|
1155 |
});
|
1066 |
|
1156 |
|
1067 |
if (! val.getDescription().equals("NULL")) {
|
1157 |
if (! val.getDescription().equals("NULL")) {
|
1068 |
radioBtn.setToolTip(new ToolTipConfig(val.getNom(), val.getDescription()));
|
1158 |
radioBtn.setToolTip(new ToolTipConfig(val.getNom(), val.getDescription()));
|
1069 |
}
|
1159 |
}
|
- |
|
1160 |
radioGroupe.add(radioBtn);
|
1070 |
}
|
1161 |
}
|
1071 |
}
|
1162 |
}
|
1072 |
|
1163 |
|
1073 |
private void afficherChampSupplementaire(Radio radioBtn) {
|
1164 |
private void afficherChampSupplementaire(Radio radioBtn) {
|
1074 |
//GWT.log("Nom btn : "+radioBtn.getName()+" - Nom group : "+radioBtn.getGroup().getName(), null);
|
1165 |
//GWT.log("Nom btn : "+radioBtn.getName()+" - Nom group : "+radioBtn.getGroup().getName(), null);
|
1075 |
// Valeur du bouton radio déclenchant l'affichage des composants cachés
|
1166 |
// Valeur du bouton radio déclenchant l'affichage des composants cachés
|
1076 |
String valeurPourAfficher = "oui";
|
1167 |
String valeurPourAfficher = "oui";
|
1077 |
|
1168 |
|
1078 |
// Construction de la liste des composants à afficher/cacher
|
1169 |
// Construction de la liste des composants à afficher/cacher
|
1079 |
String radioGroupeNom = radioBtn.getGroup().getName();
|
1170 |
String radioGroupeNom = radioBtn.getGroup().getName();
|
1080 |
ArrayList<Object> composants = new ArrayList<Object>();
|
1171 |
ArrayList<Object> composants = new ArrayList<Object>();
|
1081 |
if (radioGroupeNom.equals("action_mark_grp")) {
|
1172 |
if (radioGroupeNom.equals("action_mark_grp")) {
|
1082 |
composants.add(actionTrukCp);
|
1173 |
composants.add(actionTrukCp);
|
1083 |
} else if (radioGroupeNom.equals("future_action_mark_grp")) {
|
1174 |
} else if (radioGroupeNom.equals("future_action_mark_grp")) {
|
1084 |
composants.add(futureActionChp);
|
1175 |
composants.add(futureActionChp);
|
1085 |
} else if (radioGroupeNom.equals("sans_motif_acces_mark_grp")) {
|
1176 |
} else if (radioGroupeNom.equals("sans_motif_acces_mark_grp")) {
|
1086 |
composants.add(sansMotifAccesChp);
|
1177 |
composants.add(sansMotifAccesChp);
|
1087 |
} else if (radioGroupeNom.equals("avec_motif_acces_mark_grp")) {
|
1178 |
} else if (radioGroupeNom.equals("avec_motif_acces_mark_grp")) {
|
1088 |
composants.add(avecMotifAccesChp);
|
1179 |
composants.add(avecMotifAccesChp);
|
1089 |
} else if (radioGroupeNom.equals("recherche_mark_grp")) {
|
1180 |
} else if (radioGroupeNom.equals("recherche_mark_grp")) {
|
1090 |
composants.add(provenanceRechercheTrukCp);
|
1181 |
composants.add(provenanceRechercheTrukCp);
|
1091 |
composants.add(typeRechercheTrukCp);
|
1182 |
composants.add(typeRechercheTrukCp);
|
1092 |
} else if (radioGroupeNom.equals("formation_mark_grp")) {
|
1183 |
} else if (radioGroupeNom.equals("formation_mark_grp")) {
|
1093 |
composants.add(formationChp);
|
1184 |
composants.add(formationChp);
|
1094 |
} else if (radioGroupeNom.equals("collection_commune_mark_grp")) {
|
1185 |
} else if (radioGroupeNom.equals("collection_commune_mark_grp")) {
|
1095 |
composants.add(collectionAutreTrukCp);
|
1186 |
composants.add(collectionAutreTrukCp);
|
1096 |
} else if (radioGroupeNom.equals("restauration_mark_grp")) {
|
1187 |
} else if (radioGroupeNom.equals("restauration_mark_grp")) {
|
1097 |
composants.add(opRestauTrukCp);
|
1188 |
composants.add(opRestauTrukCp);
|
1098 |
} else if (radioGroupeNom.equals("traitement_mark_grp")) {
|
1189 |
} else if (radioGroupeNom.equals("traitement_mark_grp")) {
|
1099 |
composants.add(traitementTrukCp);
|
1190 |
composants.add(traitementTrukCp);
|
1100 |
} else if (radioGroupeNom.equals("echantillon_acquisition_mark_grp")) {
|
1191 |
} else if (radioGroupeNom.equals("echantillon_acquisition_mark_grp")) {
|
1101 |
composants.add(traitementAcquisitionMarkRGrpChp);
|
1192 |
composants.add(traitementAcquisitionMarkRGrpChp);
|
1102 |
} else if (radioGroupeNom.equals("traitement_acquisition_mark_grp")) {
|
1193 |
} else if (radioGroupeNom.equals("traitement_acquisition_mark_grp")) {
|
1103 |
composants.add(traitementAcquisitionMarkLabel);
|
1194 |
composants.add(traitementAcquisitionMarkLabel);
|
1104 |
composants.add(poisonTraitementTrukCp);
|
1195 |
composants.add(poisonTraitementTrukCp);
|
1105 |
composants.add(insecteTraitementTrukCp);
|
1196 |
composants.add(insecteTraitementTrukCp);
|
1106 |
} else if (radioGroupeNom.equals("materiel_conservation_ce_grp")) {
|
1197 |
} else if (radioGroupeNom.equals("materiel_conservation_ce_grp")) {
|
1107 |
composants.add(autreMaterielTrukCp);
|
1198 |
composants.add(autreMaterielTrukCp);
|
1108 |
valeurPourAfficher = "non";
|
1199 |
valeurPourAfficher = "non";
|
1109 |
}
|
1200 |
}
|
1110 |
|
1201 |
|
1111 |
// Nous affichons/cachons les composant de la liste
|
1202 |
// Nous affichons/cachons les composant de la liste
|
1112 |
final int tailleMax = composants.size();
|
1203 |
final int tailleMax = composants.size();
|
1113 |
//GWT.log("Id : "+radioBtn.getId()+" - Class : "+radioBtn.getClass().toString()+"- Taille : "+tailleMax, null);
|
1204 |
//GWT.log("Id : "+radioBtn.getId()+" - Class : "+radioBtn.getClass().toString()+"- Taille : "+tailleMax, null);
|
1114 |
//Window.alert("Radio grp nom : "+radioGroupeNom+" - Id btn : "+radioBtn.getId()+" - Class : "+radioBtn.getClass().toString()+"- Taille : "+tailleMax);
|
1205 |
//Window.alert("Radio grp nom : "+radioGroupeNom+" - Id btn : "+radioBtn.getId()+" - Class : "+radioBtn.getClass().toString()+"- Taille : "+tailleMax);
|
1115 |
for (int i = 0; i < tailleMax; i++) {
|
1206 |
for (int i = 0; i < tailleMax; i++) {
|
1116 |
// En fonction du type de bouton cliquer, on affiche ou cache les champs
|
1207 |
// En fonction du type de bouton cliquer, on affiche ou cache les champs
|
1117 |
String type = radioBtn.getBoxLabel().toLowerCase();
|
1208 |
String type = radioBtn.getBoxLabel().toLowerCase();
|
1118 |
//GWT.log(type, null);
|
1209 |
//GWT.log(type, null);
|
1119 |
if (radioBtn.getValue() == true) {
|
1210 |
if (radioBtn.getValue() == true) {
|
1120 |
if (type.equals(valeurPourAfficher)) {
|
1211 |
if (type.equals(valeurPourAfficher)) {
|
1121 |
((Component) composants.get(i)).show();
|
1212 |
((Component) composants.get(i)).show();
|
1122 |
} else {
|
1213 |
} else {
|
1123 |
((Component) composants.get(i)).hide();
|
1214 |
((Component) composants.get(i)).hide();
|
1124 |
}
|
1215 |
}
|
1125 |
}
|
1216 |
}
|
1126 |
// Si on a à faire à un ContentPanel, on l'actualise pour déclencher l'affichage
|
1217 |
// Si on a à faire à un ContentPanel, on l'actualise pour déclencher l'affichage
|
1127 |
if (composants.get(i) instanceof ContentPanel) {
|
1218 |
if (composants.get(i) instanceof ContentPanel) {
|
1128 |
((ContentPanel) composants.get(i)).layout();
|
1219 |
((ContentPanel) composants.get(i)).layout();
|
1129 |
}
|
1220 |
}
|
1130 |
}
|
1221 |
}
|
1131 |
|
1222 |
|
1132 |
}
|
1223 |
}
|
1133 |
|
1224 |
|
1134 |
/** Méthode simplifiant la création de choix multiple sous forme de case à cocher.
|
1225 |
/** Méthode simplifiant la création de choix multiple sous forme de case à cocher.
|
1135 |
* Apelle un service retournant la liste des valeurs représentant les cases à cocher.
|
1226 |
* Apelle un service retournant la liste des valeurs représentant les cases à cocher.
|
1136 |
* Ajoute ou pas un champ "Autre".
|
1227 |
* Ajoute ou pas un champ "Autre".
|
1137 |
*
|
1228 |
*
|
1138 |
* @param listeNom nom de la liste de valeur
|
1229 |
* @param listeNom nom de la liste de valeur
|
1139 |
* @return
|
1230 |
* @return
|
1140 |
*/
|
1231 |
*/
|
1141 |
private ContentPanel creerChoixMultipleCp(String listeNom) {
|
1232 |
private ContentPanel creerChoixMultipleCp(String listeNom) {
|
1142 |
modele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(listeNom));
|
1233 |
modele.obtenirListeValeurs(((Configuration) Registry.get(RegistreId.CONFIG)).getListeId(listeNom));
|
1143 |
ContentPanel cp = new ContentPanel();
|
1234 |
ContentPanel cp = new ContentPanel();
|
1144 |
cp.setLayout(creerFormLayout(650, LabelAlign.TOP, 0));
|
1235 |
cp.setLayout(creerFormLayout(650, LabelAlign.TOP, 0));
|
1145 |
cp.setHeaderVisible(false);
|
1236 |
cp.setHeaderVisible(false);
|
1146 |
return cp;
|
1237 |
return cp;
|
1147 |
}
|
1238 |
}
|
1148 |
|
1239 |
|
1149 |
/** Méthode simplifiant la création de choix multiple sous forme de case à cocher.
|
1240 |
/** Méthode simplifiant la création de choix multiple sous forme de case à cocher.
|
1150 |
* Apelle un service retournant la liste des valeurs représentant les cases à cocher.
|
1241 |
* Apelle un service retournant la liste des valeurs représentant les cases à cocher.
|
1151 |
* Ajoute ou pas un champ "Autre".
|
1242 |
* Ajoute ou pas un champ "Autre".
|
1152 |
*
|
1243 |
*
|
1153 |
* @param cp panneau conteant le groupe de case à cocher
|
1244 |
* @param cp panneau conteant le groupe de case à cocher
|
1154 |
* @param cacGroup le groupe de case à cocher
|
1245 |
* @param cacGroup le groupe de case à cocher
|
1155 |
* @param listeValeurs la liste de valeurs à transformer en case à cocher
|
1246 |
* @param listeValeurs la liste de valeurs à transformer en case à cocher
|
1156 |
* @param boolAutreChp booléen indiquant si oui ou non le champ autre doit apparaître
|
1247 |
* @param boolAutreChp booléen indiquant si oui ou non le champ autre doit apparaître
|
1157 |
* @return
|
1248 |
* @return
|
1158 |
*/
|
1249 |
*/
|
1159 |
private void creerChoixMultipleCac(ContentPanel cp, CheckBoxGroup cacGroupe, ValeurListe listeValeurs, Boolean boolAutreChp) {
|
1250 |
private void creerChoixMultipleCac(ContentPanel cp, CheckBoxGroup cacGroupe, ValeurListe listeValeurs, Field<String> autreChp) {
|
1160 |
cacGroupe.setAutoWidth(true);
|
1251 |
cacGroupe.setAutoWidth(true);
|
- |
|
1252 |
cacGroupe.setData("liste_id", listeValeurs.getId());
|
1161 |
for (Iterator<String> it = listeValeurs.keySet().iterator(); it.hasNext();) {
|
1253 |
for (Iterator<String> it = listeValeurs.keySet().iterator(); it.hasNext();) {
|
1162 |
Valeur val = listeValeurs.get(it.next());
|
1254 |
Valeur val = listeValeurs.get(it.next());
|
1163 |
String nom = val.get("nom");
|
1255 |
String nom = val.get("nom");
|
1164 |
CheckBox cac = new CheckBox();
|
1256 |
CheckBox cac = new CheckBox();
|
1165 |
cac.setId("val-"+val.getId());
|
1257 |
cac.setId("val-"+val.getId());
|
- |
|
1258 |
cac.setData("id", val.getId());
|
1166 |
cac.setBoxLabel(nom);
|
1259 |
cac.setBoxLabel(nom);
|
1167 |
if (! val.getDescription().equals("NULL")) {
|
1260 |
if (! val.getDescription().equals("NULL")) {
|
1168 |
cac.setToolTip(new ToolTipConfig(val.getNom(), val.getDescription()));
|
1261 |
cac.setToolTip(new ToolTipConfig(val.getNom(), val.getDescription()));
|
1169 |
}
|
1262 |
}
|
1170 |
cacGroupe.add(cac);
|
1263 |
cacGroupe.add(cac);
|
1171 |
}
|
1264 |
}
|
1172 |
cp.add(cacGroupe);
|
1265 |
cp.add(cacGroupe);
|
1173 |
|
1266 |
|
1174 |
if (boolAutreChp == true) {
|
1267 |
if (autreChp != null) {
|
1175 |
ContentPanel autreCp = new ContentPanel();
|
1268 |
ContentPanel autreCp = new ContentPanel();
|
1176 |
autreCp.setLayout(creerFormLayout(75, LabelAlign.TOP, 0));
|
1269 |
autreCp.setLayout(creerFormLayout(75, LabelAlign.TOP, 0));
|
1177 |
autreCp.setHeaderVisible(false);
|
1270 |
autreCp.setHeaderVisible(false);
|
1178 |
TextField<String> autreChp = new TextField<String>();
|
1271 |
autreChp.setId("autre-"+listeValeurs.getId());
|
1179 |
autreChp.setFieldLabel("Autre");
|
1272 |
autreChp.setFieldLabel("Autre");
|
1180 |
autreChp.setLabelStyle("font-weight:normal;");
|
1273 |
autreChp.setLabelStyle("font-weight:normal;");
|
1181 |
autreCp.add(autreChp);
|
1274 |
autreCp.add(autreChp);
|
1182 |
cp.add(autreCp);
|
1275 |
cp.add(autreCp);
|
1183 |
}
|
1276 |
}
|
1184 |
|
1277 |
|
1185 |
cp.layout();
|
1278 |
cp.layout();
|
1186 |
}
|
1279 |
}
|
1187 |
|
1280 |
|
1188 |
public void rafraichir(Object nouvelleDonnees) {
|
1281 |
public void rafraichir(Object nouvelleDonnees) {
|
1189 |
if (nouvelleDonnees instanceof Information) {
|
1282 |
if (nouvelleDonnees instanceof Information) {
|
1190 |
Information info = (Information) nouvelleDonnees;
|
1283 |
Information info = (Information) nouvelleDonnees;
|
1191 |
if (info.getMessages() != null) {
|
1284 |
if (info.getMessages() != null) {
|
1192 |
GWT.log(info.getMessages().toString(), null);
|
1285 |
GWT.log(info.getMessages().toString(), null);
|
1193 |
}
|
1286 |
}
|
1194 |
if (info.getType().equals("modif_structure")) {
|
1287 |
if (info.getType().equals("modif_structure")) {
|
1195 |
Info.display("Modification d'une institution", info.toString());
|
1288 |
Info.display("Modification d'une institution", info.toString());
|
1196 |
} else if (info.getType().equals("ajout_structure")) {
|
1289 |
} else if (info.getType().equals("ajout_structure")) {
|
1197 |
Info.display("Ajout d'une Institution", info.toString());
|
1290 |
Info.display("Ajout d'une Institution", info.toString());
|
1198 |
} else if (info.getType().equals("selection_structure")) {
|
1291 |
} else if (info.getType().equals("selection_structure")) {
|
1199 |
Info.display("Modification d'une institution", info.toString());
|
1292 |
Info.display("Modification d'une institution", info.toString());
|
1200 |
Structure str = (Structure) info.getDonnee(0);
|
- |
|
1201 |
mode = "MODIF";
|
1293 |
mode = "MODIF";
|
1202 |
GWT.log(mode, null);
|
1294 |
GWT.log(mode, null);
|
1203 |
structureFormPanneau.setHeading(i18nC.titreModifFormStructurePanneau()+" - ID : "+str.getId());
|
1295 |
String titre = i18nC.titreModifFormStructurePanneau();
|
- |
|
1296 |
if (info.getDonnee(0) != null) {
|
- |
|
1297 |
Structure str = (Structure) info.getDonnee(0);
|
- |
|
1298 |
titre += " - ID : "+str.getId();
|
1204 |
peuplerFormulaire(str);
|
1299 |
peuplerStructure(str);
|
- |
|
1300 |
}
|
- |
|
1301 |
if (info.getDonnee(1) != null) {
|
- |
|
1302 |
StructureConservation strConservation = (StructureConservation) info.getDonnee(1);
|
- |
|
1303 |
peuplerStructureConservation(strConservation);
|
- |
|
1304 |
}
|
- |
|
1305 |
structureFormPanneau.setHeading(titre);
|
1205 |
}
|
1306 |
}
|
1206 |
} else if (nouvelleDonnees instanceof ValeurListe) {
|
1307 |
} else if (nouvelleDonnees instanceof ValeurListe) {
|
1207 |
ValeurListe listeValeurs = (ValeurListe) nouvelleDonnees;
|
1308 |
ValeurListe listeValeurs = (ValeurListe) nouvelleDonnees;
|
1208 |
|
1309 |
|
1209 |
List<Valeur> liste = new ArrayList<Valeur>();
|
1310 |
List<Valeur> liste = new ArrayList<Valeur>();
|
1210 |
for (Iterator<String> it = listeValeurs.keySet().iterator(); it.hasNext();) {
|
1311 |
for (Iterator<String> it = listeValeurs.keySet().iterator(); it.hasNext();) {
|
1211 |
liste.add(listeValeurs.get(it.next()));
|
1312 |
liste.add(listeValeurs.get(it.next()));
|
1212 |
}
|
1313 |
}
|
1213 |
// Test pour savoir si la liste contient des éléments
|
1314 |
// Test pour savoir si la liste contient des éléments
|
1214 |
if (liste.size() > 0) {
|
1315 |
if (liste.size() > 0) {
|
1215 |
Configuration config = (Configuration) Registry.get(RegistreId.CONFIG);
|
1316 |
Configuration config = (Configuration) Registry.get(RegistreId.CONFIG);
|
1216 |
if (listeValeurs.getId().equals(config.getListeId("stpr"))) {
|
1317 |
if (listeValeurs.getId().equals(config.getListeId("stpr"))) {
|
1217 |
magazinLstpr.removeAll();
|
1318 |
magazinLstpr.removeAll();
|
1218 |
magazinLstpr.add(liste);
|
1319 |
magazinLstpr.add(liste);
|
1219 |
comboLstpr.setStore(magazinLstpr);
|
1320 |
comboLstpr.setStore(magazinLstpr);
|
1220 |
}
|
1321 |
}
|
1221 |
if (listeValeurs.getId().equals(config.getListeId("stpu"))) {
|
1322 |
if (listeValeurs.getId().equals(config.getListeId("stpu"))) {
|
1222 |
magazinLstpu.removeAll();
|
1323 |
magazinLstpu.removeAll();
|
1223 |
magazinLstpu.add(liste);
|
1324 |
magazinLstpu.add(liste);
|
1224 |
comboLstpu.setStore(magazinLstpu);
|
1325 |
comboLstpu.setStore(magazinLstpu);
|
1225 |
}
|
1326 |
}
|
1226 |
if (listeValeurs.getId().equals(config.getListeId("statut"))) {
|
1327 |
if (listeValeurs.getId().equals(config.getListeId("statut"))) {
|
1227 |
magazinLiStatut.removeAll();
|
1328 |
magazinLiStatut.removeAll();
|
1228 |
magazinLiStatut.add(liste);
|
1329 |
magazinLiStatut.add(liste);
|
1229 |
comboLiStatut.setStore(magazinLiStatut);
|
1330 |
comboLiStatut.setStore(magazinLiStatut);
|
1230 |
}
|
1331 |
}
|
1231 |
if (listeValeurs.getId().equals(config.getListeId("fonction"))) {
|
1332 |
if (listeValeurs.getId().equals(config.getListeId("fonction"))) {
|
1232 |
magazinLiFonction.removeAll();
|
1333 |
magazinLiFonction.removeAll();
|
1233 |
magazinLiFonction.add(liste);
|
1334 |
magazinLiFonction.add(liste);
|
1234 |
comboLiFonction.setStore(magazinLiFonction);
|
1335 |
comboLiFonction.setStore(magazinLiFonction);
|
1235 |
}
|
1336 |
}
|
1236 |
if (listeValeurs.getId().equals(config.getListeId("pays"))) {
|
1337 |
if (listeValeurs.getId().equals(config.getListeId("pays"))) {
|
1237 |
magazinPays.removeAll();
|
1338 |
magazinPays.removeAll();
|
1238 |
magazinPays.add(liste);
|
1339 |
magazinPays.add(liste);
|
1239 |
comboPays.setStore(magazinPays);
|
1340 |
comboPays.setStore(magazinPays);
|
1240 |
}
|
1341 |
}
|
1241 |
if (listeValeurs.getId().equals(config.getListeId("localStockage"))) {
|
1342 |
if (listeValeurs.getId().equals(config.getListeId("localStockage"))) {
|
- |
|
1343 |
localStockageAutreChp = new TextField<String>();
|
1242 |
creerChoixMultipleCac(localStockageTrukCp, localStockageTrukCacGrpChp, listeValeurs, true);
|
1344 |
creerChoixMultipleCac(localStockageTrukCp, localStockageTrukCacGrpChp, listeValeurs, localStockageAutreChp);
|
1243 |
}
|
1345 |
}
|
1244 |
if (listeValeurs.getId().equals(config.getListeId("meubleStockage"))) {
|
1346 |
if (listeValeurs.getId().equals(config.getListeId("meubleStockage"))) {
|
- |
|
1347 |
meubleStockageAutreChp = new TextField<String>();
|
1245 |
creerChoixMultipleCac(meubleStockageTrukCp, meubleStockageTrukCacGrpChp, listeValeurs, true);
|
1348 |
creerChoixMultipleCac(meubleStockageTrukCp, meubleStockageTrukCacGrpChp, listeValeurs, meubleStockageAutreChp);
|
1246 |
}
|
1349 |
}
|
1247 |
if (listeValeurs.getId().equals(config.getListeId("parametreStockage"))) {
|
1350 |
if (listeValeurs.getId().equals(config.getListeId("parametreStockage"))) {
|
- |
|
1351 |
parametreStockageAutreChp = new TextField<String>();
|
1248 |
creerChoixMultipleCac(parametreStockageTrukCp, parametreStockageTrukCacGrpChp, listeValeurs, true);
|
1352 |
creerChoixMultipleCac(parametreStockageTrukCp, parametreStockageTrukCacGrpChp, listeValeurs, parametreStockageAutreChp);
|
1249 |
}
|
1353 |
}
|
1250 |
if (listeValeurs.getId().equals(config.getListeId("autreCollection"))) {
|
1354 |
if (listeValeurs.getId().equals(config.getListeId("autreCollection"))) {
|
1251 |
if (collectionAutreTrukCp.getItemByItemId("collectionAutreTrukCacGrpChp") == null) {
|
1355 |
if (collectionAutreTrukCp.getItemByItemId("collectionAutreTrukCacGrpChp") == null) {
|
1252 |
collectionAutreTrukCacGrpChp.setId("collectionAutreTrukCacGrpChp");
|
1356 |
collectionAutreTrukCacGrpChp.setId("collectionAutreTrukCacGrpChp");
|
- |
|
1357 |
collectionAutreAutreChp = new TextField<String>();
|
1253 |
creerChoixMultipleCac(collectionAutreTrukCp, collectionAutreTrukCacGrpChp, listeValeurs, true);
|
1358 |
creerChoixMultipleCac(collectionAutreTrukCp, collectionAutreTrukCacGrpChp, listeValeurs, collectionAutreAutreChp);
|
1254 |
}
|
1359 |
}
|
1255 |
if (autreCollectionTrukCp.getItemByItemId("autreCollectionTrukCacGrpChp") == null) {
|
1360 |
if (autreCollectionTrukCp.getItemByItemId("autreCollectionTrukCacGrpChp") == null) {
|
1256 |
autreCollectionTrukCacGrpChp.setId("autreCollectionTrukCacGrpChp");
|
1361 |
autreCollectionTrukCacGrpChp.setId("autreCollectionTrukCacGrpChp");
|
- |
|
1362 |
autreCollectionAutreChp = new TextField<String>();
|
1257 |
creerChoixMultipleCac(autreCollectionTrukCp, autreCollectionTrukCacGrpChp, listeValeurs, true);
|
1363 |
creerChoixMultipleCac(autreCollectionTrukCp, autreCollectionTrukCacGrpChp, listeValeurs, autreCollectionAutreChp);
|
1258 |
}
|
1364 |
}
|
1259 |
}
|
1365 |
}
|
1260 |
if (listeValeurs.getId().equals(config.getListeId("opRestau"))) {
|
1366 |
if (listeValeurs.getId().equals(config.getListeId("opRestau"))) {
|
- |
|
1367 |
opRestauAutreChp = new TextField<String>();
|
1261 |
creerChoixMultipleCac(opRestauTrukCp, opRestauTrukCacGrpChp, listeValeurs, true);
|
1368 |
creerChoixMultipleCac(opRestauTrukCp, opRestauTrukCacGrpChp, listeValeurs, opRestauAutreChp);
|
1262 |
}
|
1369 |
}
|
1263 |
if (listeValeurs.getId().equals(config.getListeId("onep"))) {
|
1370 |
if (listeValeurs.getId().equals(config.getListeId("onep"))) {
|
1264 |
creerChoixUniqueBoutonRadio(materielConservationCeRGrpChp, listeValeurs);
|
1371 |
creerChoixUniqueBoutonRadio(materielConservationCeRGrpChp, listeValeurs);
|
- |
|
1372 |
materielConservationCp.add(materielConservationCeRGrpChp);
|
- |
|
1373 |
materielConservationCp.layout();
|
1265 |
}
|
1374 |
}
|
1266 |
if (listeValeurs.getId().equals(config.getListeId("autreMateriel"))) {
|
1375 |
if (listeValeurs.getId().equals(config.getListeId("autreMateriel"))) {
|
- |
|
1376 |
autreMaterielAutreChp = new TextField<String>();
|
1267 |
creerChoixMultipleCac(autreMaterielTrukCp, autreMaterielTrukCacGrpChp, listeValeurs, true);
|
1377 |
creerChoixMultipleCac(autreMaterielTrukCp, autreMaterielTrukCacGrpChp, listeValeurs, autreMaterielAutreChp);
|
1268 |
}
|
1378 |
}
|
1269 |
if (listeValeurs.getId().equals(config.getListeId("poisonTraitement"))) {
|
1379 |
if (listeValeurs.getId().equals(config.getListeId("poisonTraitement"))) {
|
- |
|
1380 |
poisonTraitementAutreChp = new TextField<String>();
|
1270 |
creerChoixMultipleCac(poisonTraitementTrukCp, poisonTraitementTrukCacGrpChp, listeValeurs, true);
|
1381 |
creerChoixMultipleCac(poisonTraitementTrukCp, poisonTraitementTrukCacGrpChp, listeValeurs, poisonTraitementAutreChp);
|
1271 |
}
|
1382 |
}
|
1272 |
if (listeValeurs.getId().equals(config.getListeId("insecteTraitement"))) {
|
1383 |
if (listeValeurs.getId().equals(config.getListeId("insecteTraitement"))) {
|
1273 |
if (traitementTrukCp.getItemByItemId("traitementTrukCacGrpChp") == null) {
|
1384 |
if (traitementTrukCp.getItemByItemId("traitementTrukCacGrpChp") == null) {
|
1274 |
traitementTrukCacGrpChp.setId("traitementTrukCacGrpChp");
|
1385 |
traitementTrukCacGrpChp.setId("traitementTrukCacGrpChp");
|
- |
|
1386 |
traitementAutreChp = new TextField<String>();
|
1275 |
creerChoixMultipleCac(traitementTrukCp, traitementTrukCacGrpChp, listeValeurs, true);
|
1387 |
creerChoixMultipleCac(traitementTrukCp, traitementTrukCacGrpChp, listeValeurs, traitementAutreChp);
|
1276 |
}
|
1388 |
}
|
1277 |
if (insecteTraitementTrukCp.getItemByItemId("insecteTraitementTrukCacGrpChp") == null) {
|
1389 |
if (insecteTraitementTrukCp.getItemByItemId("insecteTraitementTrukCacGrpChp") == null) {
|
1278 |
insecteTraitementTrukCacGrpChp.setId("insecteTraitementTrukCacGrpChp");
|
1390 |
insecteTraitementTrukCacGrpChp.setId("insecteTraitementTrukCacGrpChp");
|
- |
|
1391 |
insecteTraitementAutreChp = new TextField<String>();
|
1279 |
creerChoixMultipleCac(insecteTraitementTrukCp, insecteTraitementTrukCacGrpChp, listeValeurs, true);
|
1392 |
creerChoixMultipleCac(insecteTraitementTrukCp, insecteTraitementTrukCacGrpChp, listeValeurs, insecteTraitementAutreChp);
|
1280 |
}
|
1393 |
}
|
1281 |
}
|
1394 |
}
|
1282 |
if (listeValeurs.getId().equals(config.getListeId("actionValorisation"))) {
|
1395 |
if (listeValeurs.getId().equals(config.getListeId("actionValorisation"))) {
|
- |
|
1396 |
actionAutreChp = new TextField<String>();
|
1283 |
creerChoixMultipleCac(actionTrukCp, actionTrukCacGrpChp, listeValeurs, true);
|
1397 |
creerChoixMultipleCac(actionTrukCp, actionTrukCacGrpChp, listeValeurs, actionAutreChp);
|
1284 |
}
|
1398 |
}
|
1285 |
if (listeValeurs.getId().equals(config.getListeId("continentEtFr"))) {
|
1399 |
if (listeValeurs.getId().equals(config.getListeId("continentEtFr"))) {
|
- |
|
1400 |
provenanceRechercheAutreChp = new TextField<String>();
|
1286 |
creerChoixMultipleCac(provenanceRechercheTrukCp, provenanceRechercheTrukCacGrpChp, listeValeurs, true);
|
1401 |
creerChoixMultipleCac(provenanceRechercheTrukCp, provenanceRechercheTrukCacGrpChp, listeValeurs, provenanceRechercheAutreChp);
|
1287 |
}
|
1402 |
}
|
1288 |
if (listeValeurs.getId().equals(config.getListeId("typeRecherche"))) {
|
1403 |
if (listeValeurs.getId().equals(config.getListeId("typeRecherche"))) {
|
- |
|
1404 |
typeRecherche = new TextField<String>();
|
1289 |
creerChoixMultipleCac(typeRechercheTrukCp, typeRechercheTrukCacGrpChp, listeValeurs, true);
|
1405 |
creerChoixMultipleCac(typeRechercheTrukCp, typeRechercheTrukCacGrpChp, listeValeurs, typeRecherche);
|
1290 |
}
|
1406 |
}
|
1291 |
//GWT.log("La liste #"+listeValeurs.getId()+" a été reçue!", null);
|
1407 |
//GWT.log("La liste #"+listeValeurs.getId()+" a été reçue!", null);
|
1292 |
} else {
|
1408 |
} else {
|
1293 |
GWT.log("La liste #"+listeValeurs.getId()+" ne contient aucune valeurs!", null);
|
1409 |
GWT.log("La liste #"+listeValeurs.getId()+" ne contient aucune valeurs!", null);
|
1294 |
}
|
1410 |
}
|
1295 |
}
|
1411 |
}
|
1296 |
}
|
1412 |
}
|
1297 |
|
1413 |
|
1298 |
}
|
1414 |
}
|