Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1080 Rev 1094
Line 95... Line 95...
95
		
95
		
96
		String modeDeCreation = (projet.getId().isEmpty() ? Formulaire.MODE_AJOUTER : Formulaire.MODE_MODIFIER);
96
		String modeDeCreation = (projet.getId().isEmpty() ? Formulaire.MODE_AJOUTER : Formulaire.MODE_MODIFIER);
Line 97... Line 97...
97
		initialiserFormulaire(mediateurCourant, modeDeCreation, MenuApplicationId.PROJET);
97
		initialiserFormulaire(mediateurCourant, modeDeCreation, MenuApplicationId.PROJET);
98
		
98
		
Line 99... Line 99...
99
		panneauFormulaire.setLayout(new FlowLayout());
99
		panneauFormulaire.setLayout(new FlowLayout());
100
		actualiserTitreFormulaire();
100
		genererTitreFormulaire();
Line 101... Line 101...
101
		
101
		
Line 117... Line 117...
117
		mediateur.obtenirListeValeurEtRafraichir(this, listeValeurIndexationDureeId);
117
		mediateur.obtenirListeValeurEtRafraichir(this, listeValeurIndexationDureeId);
118
		mediateur.obtenirListeValeurEtRafraichir(this, listeValeurIndexationFrequenceId);
118
		mediateur.obtenirListeValeurEtRafraichir(this, listeValeurIndexationFrequenceId);
119
		mediateur.obtenirListeValeurEtRafraichir(this, listeLanguesId);
119
		mediateur.obtenirListeValeurEtRafraichir(this, listeLanguesId);
120
	}
120
	}
Line 121... Line 121...
121
	
121
	
122
	private void actualiserTitreFormulaire() {
122
	private void genererTitreFormulaire() {
123
		String titre = i18nC.projetTitreFormAjout();
123
		String titre = i18nC.projetTitreFormAjout();
-
 
124
		if (mode.equals(Formulaire.MODE_MODIFIER)) {
-
 
125
			 titre = i18nC.projetTitreFormModif();
124
		if (mode.equals(Formulaire.MODE_MODIFIER)) {
126
			 if (projet != null) {
-
 
127
				 titre += " - "+i18nC.id()+": "+projet.getId();
125
			 titre = i18nC.projetTitreFormModif()+" - "+i18nC.id()+": "+projet.getId();
128
			 }
126
		}
129
		}
127
		panneauFormulaire.setHeading(titre);
130
		panneauFormulaire.setHeading(titre);
Line 128... Line 131...
128
	}
131
	}
Line 290... Line 293...
290
		if (type.equals("selection_projet")) {
293
		if (type.equals("selection_projet")) {
291
			if (info.getDonnee(0) != null) {
294
			if (info.getDonnee(0) != null) {
292
				projet = (Projet) info.getDonnee(0);
295
				projet = (Projet) info.getDonnee(0);
293
			}
296
			}
294
			peuplerFormulaire();
297
			peuplerFormulaire();
295
			actualiserTitreFormulaire();
298
			genererTitreFormulaire();
296
		} else if (type.equals("ajout_projet") ) {
299
		} else if (type.equals("ajout_projet") ) {
297
			if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
300
			if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
-
 
301
				projetValideOk = true;
298
				String projetId = (String) info.getDonnee(0);
302
				String projetId = (String) info.getDonnee(0);
-
 
303
				if (vueExterneARafraichirApresValidation != null) {
299
				projet.setId(projetId);
304
					projet.setId(projetId);
300
				projetValideOk = true;
305
				}
301
			}
306
			}
302
		}
307
		}
Line 303... Line 308...
303
		
308
		
304
		// Gestion des messages
309
		// Gestion des messages
305
		if (type.equals("selection_projet")) {
310
		if (type.equals("selection_projet")) {
306
			Info.display(i18nC.projetTitreFormModif(), info.toString());
311
			Info.display(i18nC.projetTitreFormModif(), info.toString());
307
		} else if (type.equals("modif_projet")) {
312
		} else if (type.equals("modif_projet")) {
308
			Info.display(i18nC.projetTitreFormModif(), info.toString());
313
			Info.display(i18nC.projetTitreFormModif(), info.toString());
-
 
314
		} else if (type.equals("ajout_projet")) {
309
		} else if (type.equals("ajout_projet")) {
315
			if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
310
			if (!UtilString.isEmpty(projet.getId())) {
316
				String projetId = (String) info.getDonnee(0);
311
				info.setMessage("Le projet '"+projet.getId()+"' a bien été ajouté");
317
				Info.display(i18nC.projetTitreFormAjout(), "Le projet '"+projetId+"' a bien été ajouté");
312
			}
318
			} else {
313
			Info.display(i18nC.projetTitreFormAjout(), info.toString());
319
				Info.display(i18nC.projetTitreFormAjout(), info.toString());
314
		}
320
			}
-
 
321
		}
Line 315... Line 322...
315
	}
322
	}
316
	
323
	
317
	private void rafraichirValeurListe(ValeurListe valeursListe) {
324
	private void rafraichirValeurListe(ValeurListe valeursListe) {
318
		if (valeursListe.getId() == listeValeurIndexationDureeInt) {
325
		if (valeursListe.getId() == listeValeurIndexationDureeInt) {