Subversion Repositories eFlore/Applications.coel

Rev

Rev 928 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 928 Rev 934
Line 4... Line 4...
4
import java.util.Iterator;
4
import java.util.Iterator;
5
import java.util.List;
5
import java.util.List;
Line 6... Line 6...
6
 
6
 
7
import org.tela_botanica.client.Mediateur;
7
import org.tela_botanica.client.Mediateur;
8
import org.tela_botanica.client.RegistreId;
-
 
9
import org.tela_botanica.client.configuration.Configuration;
8
import org.tela_botanica.client.RegistreId;
10
import org.tela_botanica.client.images.Images;
9
import org.tela_botanica.client.images.Images;
11
import org.tela_botanica.client.interfaces.Rafraichissable;
10
import org.tela_botanica.client.interfaces.Rafraichissable;
12
import org.tela_botanica.client.modeles.Information;
11
import org.tela_botanica.client.modeles.Information;
13
import org.tela_botanica.client.modeles.InterneValeur;
12
import org.tela_botanica.client.modeles.InterneValeur;
Line 29... Line 28...
29
import com.extjs.gxt.ui.client.event.Events;
28
import com.extjs.gxt.ui.client.event.Events;
30
import com.extjs.gxt.ui.client.Registry;
29
import com.extjs.gxt.ui.client.Registry;
31
import com.extjs.gxt.ui.client.event.BaseEvent;
30
import com.extjs.gxt.ui.client.event.BaseEvent;
32
import com.extjs.gxt.ui.client.event.ButtonEvent;
31
import com.extjs.gxt.ui.client.event.ButtonEvent;
33
import com.extjs.gxt.ui.client.event.ComponentEvent;
32
import com.extjs.gxt.ui.client.event.ComponentEvent;
34
import com.extjs.gxt.ui.client.event.GridEvent;
-
 
35
import com.extjs.gxt.ui.client.event.KeyListener;
33
import com.extjs.gxt.ui.client.event.KeyListener;
36
import com.extjs.gxt.ui.client.event.Listener;
34
import com.extjs.gxt.ui.client.event.Listener;
37
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
35
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
38
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
36
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
39
import com.extjs.gxt.ui.client.event.SelectionListener;
37
import com.extjs.gxt.ui.client.event.SelectionListener;
Line 236... Line 234...
236
		//ongletsStructure(personnelOnglet);
234
		//ongletsStructure(personnelOnglet);
Line 237... Line 235...
237
		
235
		
238
		return ongletsStructure;
236
		return ongletsStructure;
Line 239... Line -...
239
	}
-
 
240
	
-
 
241
	protected SelectionListener<ButtonEvent> creerEcouteurValidation() {
-
 
242
		SelectionListener<ButtonEvent> ecouteur = new SelectionListener<ButtonEvent>() {
237
	}
243
			@Override
-
 
244
			public void componentSelected(ButtonEvent ce) {
-
 
245
				String code = ((Button) ce.getComponent()).getData("code");
-
 
246
				if (code.equals(FormulaireBarreValidation.CODE_BOUTON_VALIDER)) {
-
 
247
					soumettreFormulaire();
-
 
248
					clicBoutonvalidation = true;
-
 
249
				} else if (code.equals(FormulaireBarreValidation.CODE_BOUTON_APPLIQUER)) {
-
 
250
					soumettreFormulaire();
-
 
251
				} else if (code.equals(FormulaireBarreValidation.CODE_BOUTON_ANNULER)) {
-
 
252
					mediateur.clicMenu(menuIdCourant);
238
	
253
				} else if (code.equals(FormulaireBarreValidation.CODE_BOUTON_REINITIALISER)) {
239
	public void reinitialiserFormulaire() {
254
					if (mode.equals(StructureForm.MODE_MODIFIER)) {
240
		if (mode.equals(StructureForm.MODE_MODIFIER)) {
255
						mediateur.afficherFormStructure(identification.getId());
241
			mediateur.afficherFormStructure(identification.getId());
256
					} else {
-
 
257
						mediateur.afficherFormStructure(null);
-
 
258
					}
-
 
259
				}
242
		} else {
260
			}
-
 
261
		};
-
 
262
		
243
			mediateur.afficherFormStructure(null);
Line 263... Line 244...
263
		return ecouteur;
244
		}
264
	}
245
	}
265
	
246
	
266
	protected boolean soumettreFormulaire() {
247
	public boolean soumettreFormulaire() {
267
		// Vérification de la validité des champs du formulaire
248
		// Vérification de la validité des champs du formulaire
268
		boolean fomulaireValide = verifierFormulaire();
249
		boolean fomulaireValide = verifierFormulaire();
Line 306... Line 287...
306
			}
287
			}
307
		}
288
		}
308
		return fomulaireValide;
289
		return fomulaireValide;
309
	}
290
	}
Line 310... Line 291...
310
	
291
	
311
	protected boolean verifierFormulaire() {
292
	public boolean verifierFormulaire() {
Line 312... Line 293...
312
		ArrayList<String> messages = new ArrayList<String>();
293
		ArrayList<String> messages = new ArrayList<String>();
313
		
294
		
314
		// Vérification des infos sur le nom de la structure
295
		// Vérification des infos sur le nom de la structure
Line 1774... Line 1755...
1774
			identifiants.replaceFirst("^;;", "");
1755
			identifiants.replaceFirst("^;;", "");
1775
		}
1756
		}
1776
		return identifiants;
1757
		return identifiants;
1777
	}
1758
	}
Line 1778... Line 1759...
1778
	
1759
	
1779
	protected void afficherChampSupplementaire(Radio radioBtn) {
1760
	public void afficherChampSupplementaire(Radio radioBtn) {
1780
		//GWT.log("Nom btn : "+radioBtn.getName()+" - Nom group : "+radioBtn.getGroup().getName(), null);
1761
		//GWT.log("Nom btn : "+radioBtn.getName()+" - Nom group : "+radioBtn.getGroup().getName(), null);
1781
		// Valeur du bouton radio déclenchant l'affichage des composants cachés
1762
		// Valeur du bouton radio déclenchant l'affichage des composants cachés
Line 1782... Line 1763...
1782
		String valeurPourAfficher = "oui";
1763
		String valeurPourAfficher = "oui";