| Line 5... |
Line 5... |
| 5 |
|
5 |
|
| 6 |
import org.tela_botanica.client.ComposantClass;
|
6 |
import org.tela_botanica.client.ComposantClass;
|
| 7 |
import org.tela_botanica.client.Mediateur;
|
7 |
import org.tela_botanica.client.Mediateur;
|
| 8 |
import org.tela_botanica.client.RegistreId;
|
8 |
import org.tela_botanica.client.RegistreId;
|
| - |
|
9 |
import org.tela_botanica.client.composants.ChampComboBoxListeValeurs;
|
| 9 |
import org.tela_botanica.client.composants.ChampComboBoxListeValeurs;
|
10 |
import org.tela_botanica.client.composants.InfoLogger;
|
| 10 |
import org.tela_botanica.client.configuration.Configuration;
|
11 |
import org.tela_botanica.client.configuration.Configuration;
|
| 11 |
import org.tela_botanica.client.i18n.Constantes;
|
12 |
import org.tela_botanica.client.i18n.Constantes;
|
| 12 |
import org.tela_botanica.client.i18n.ErrorMessages;
|
13 |
import org.tela_botanica.client.i18n.ErrorMessages;
|
| 13 |
import org.tela_botanica.client.images.Images;
|
14 |
import org.tela_botanica.client.images.Images;
|
| 14 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
15 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
| 15 |
import org.tela_botanica.client.modeles.Valeur;
|
16 |
import org.tela_botanica.client.modeles.Valeur;
|
| 16 |
import org.tela_botanica.client.modeles.ValeurListe;
|
17 |
import org.tela_botanica.client.modeles.ValeurListe;
|
| - |
|
18 |
import org.tela_botanica.client.modeles.aDonneeListe;
|
| Line 17... |
Line 19... |
| 17 |
import org.tela_botanica.client.modeles.aDonneeListe;
|
19 |
import org.tela_botanica.client.util.Debug;
|
| 18 |
|
20 |
|
| 19 |
import com.extjs.gxt.ui.client.Registry;
|
21 |
import com.extjs.gxt.ui.client.Registry;
|
| 20 |
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
22 |
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
| Line 106... |
Line 108... |
| 106 |
|
108 |
|
| 107 |
public SelectionListener<ButtonEvent> creerEcouteurValidation() {
|
109 |
public SelectionListener<ButtonEvent> creerEcouteurValidation() {
|
| 108 |
SelectionListener<ButtonEvent> ecouteur = new SelectionListener<ButtonEvent>() {
|
110 |
SelectionListener<ButtonEvent> ecouteur = new SelectionListener<ButtonEvent>() {
|
| 109 |
@Override
|
111 |
@Override
|
| - |
|
112 |
public void componentSelected(ButtonEvent ce) {
|
| - |
|
113 |
|
| - |
|
114 |
Debug.log("<$$$> BEGIN Formulaire.creerEcouteurValidation.componentSelected(ButtonEvent ce)");
|
| 110 |
public void componentSelected(ButtonEvent ce) {
|
115 |
|
| 111 |
String code = ((Button) ce.getComponent()).getData("code");
|
116 |
String code = ((Button) ce.getComponent()).getData("code");
|
| 112 |
if (code.equals(FormulaireBarreValidation.CODE_BOUTON_VALIDER)) {
|
117 |
if (code.equals(FormulaireBarreValidation.CODE_BOUTON_VALIDER)) {
|
| - |
|
118 |
if (mediateur.getUtilisateur().isIdentifie()) {
|
| - |
|
119 |
Debug.log("<$$$> Formulaire.creerEcouteurValidation.componentSelected(ButtonEvent ce), clicBoutonvalidation = true;");
|
| - |
|
120 |
clicBoutonvalidation = true;
|
| - |
|
121 |
|
| 113 |
if (mediateur.getUtilisateur().isIdentifie()) {
|
122 |
Debug.log("<$$$> Formulaire.creerEcouteurValidation.componentSelected(ButtonEvent ce), appel à soumettreFormulaire()");
|
| 114 |
soumettreFormulaire();
|
- |
|
| - |
|
123 |
soumettreFormulaire();
|
| 115 |
clicBoutonvalidation = true;
|
124 |
|
| 116 |
} else {
|
125 |
} else {
|
| 117 |
Info.display(i18nC.modeAnonyme(), i18nC.identificationNecessaire());
|
126 |
InfoLogger.display(i18nC.modeAnonyme(), i18nC.identificationNecessaire());
|
| 118 |
}
|
127 |
}
|
| 119 |
} else if (code.equals(FormulaireBarreValidation.CODE_BOUTON_APPLIQUER)) {
|
128 |
} else if (code.equals(FormulaireBarreValidation.CODE_BOUTON_APPLIQUER)) {
|
| 120 |
if (mediateur.getUtilisateur().isIdentifie()) {
|
129 |
if (mediateur.getUtilisateur().isIdentifie()) {
|
| 121 |
soumettreFormulaire();
|
130 |
soumettreFormulaire();
|
| 122 |
} else {
|
131 |
} else {
|
| 123 |
Info.display(i18nC.modeAnonyme(), i18nC.identificationNecessaire());
|
132 |
InfoLogger.display(i18nC.modeAnonyme(), i18nC.identificationNecessaire());
|
| 124 |
}
|
133 |
}
|
| 125 |
} else if (code.equals(FormulaireBarreValidation.CODE_BOUTON_ANNULER)) {
|
134 |
} else if (code.equals(FormulaireBarreValidation.CODE_BOUTON_ANNULER)) {
|
| 126 |
mediateur.clicMenu(menuIdCourant);
|
135 |
mediateur.clicMenu(menuIdCourant);
|
| 127 |
} else if (code.equals(FormulaireBarreValidation.CODE_BOUTON_REINITIALISER)) {
|
136 |
} else if (code.equals(FormulaireBarreValidation.CODE_BOUTON_REINITIALISER)) {
|
| 128 |
reinitialiserFormulaire();
|
137 |
reinitialiserFormulaire();
|
| - |
|
138 |
}
|
| - |
|
139 |
|
| 129 |
}
|
140 |
Debug.log("<$$$> END CollectionForm.Formulaire.creerEcouteurValidation.componentSelected(ButtonEvent ce)");
|
| 130 |
}
|
141 |
}
|
| Line 131... |
Line 142... |
| 131 |
};
|
142 |
};
|
| 132 |
|
143 |
|
| Line 145... |
Line 156... |
| 145 |
onglet.setText(nom);
|
156 |
onglet.setText(nom);
|
| 146 |
FormulaireOnglet.parametrer(onglet);
|
157 |
FormulaireOnglet.parametrer(onglet);
|
| 147 |
return onglet;
|
158 |
return onglet;
|
| 148 |
}
|
159 |
}
|
| Line 149... |
Line 160... |
| 149 |
|
160 |
|
| - |
|
161 |
public void controlerFermeture() {
|
| 150 |
public void controlerFermetureApresRafraichissement() {
|
162 |
Debug.log("<$$$> BEGIN Formulaire.controlerFermeture()");
|
| 151 |
// Si le bouton Valider a été cliqué, nous affichons la liste des structures
|
163 |
// Si le bouton Valider a été cliqué, nous affichons la liste des structures
|
| 152 |
if (clicBoutonvalidation) {
|
164 |
if (clicBoutonvalidation) {
|
| 153 |
fermerFormulaire();
|
165 |
fermerFormulaire();
|
| - |
|
166 |
}
|
| - |
|
167 |
else Debug.log("<$$$> clicBoutonvalidation==false");
|
| 154 |
}
|
168 |
Debug.log("<$$$> END Formulaire.controlerFermeture()");
|
| Line 155... |
Line 169... |
| 155 |
}
|
169 |
}
|
| - |
|
170 |
|
| - |
|
171 |
public void fermerFormulaire() {
|
| - |
|
172 |
|
| 156 |
|
173 |
Debug.log("<$$$> BEGIN Formulaire.fermerFormulaire()");
|
| 157 |
public void fermerFormulaire() {
|
174 |
|
| 158 |
clicBoutonvalidation = false;
|
175 |
clicBoutonvalidation = false;
|
| - |
|
176 |
panneauFormulaire.setEnabled(false);
|
| - |
|
177 |
mediateur.clicMenu(menuIdCourant);
|
| 159 |
panneauFormulaire.setEnabled(false);
|
178 |
|
| Line 160... |
Line 179... |
| 160 |
mediateur.clicMenu(menuIdCourant);
|
179 |
Debug.log("<$$$> END Formulaire.fermerFormulaire()");
|
| 161 |
}
|
180 |
}
|
| 162 |
|
181 |
|