Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1084 Rev 1098
Line 55... Line 55...
55
		collection.setId(collectionId);
55
		collection.setId(collectionId);
Line 56... Line 56...
56
		
56
		
57
		String modeDeCreation = (UtilString.isEmpty(collection.getId()) ? Formulaire.MODE_AJOUTER : Formulaire.MODE_MODIFIER);
57
		String modeDeCreation = (UtilString.isEmpty(collection.getId()) ? Formulaire.MODE_AJOUTER : Formulaire.MODE_MODIFIER);
Line 58... Line 58...
58
		initialiserFormulaire(mediateurCourrant, modeDeCreation, MenuApplicationId.COLLECTION);
58
		initialiserFormulaire(mediateurCourrant, modeDeCreation, MenuApplicationId.COLLECTION);
59
		
-
 
Line 60... Line 59...
60
		String titre = genererTitreFormulaire();
59
		
61
		panneauFormulaire.setHeading(titre);
60
		genererTitreFormulaire();
Line 62... Line 61...
62
		
61
		
Line 69... Line 68...
69
			mediateurCourrant.selectionnerCollectionAPublication(this, collectionId);
68
			mediateurCourrant.selectionnerCollectionAPublication(this, collectionId);
70
			mediateurCourrant.selectionnerCollectionACommentaire(this, collectionId);
69
			mediateurCourrant.selectionnerCollectionACommentaire(this, collectionId);
71
		}
70
		}
72
	}
71
	}
Line 73... Line 72...
73
	
72
	
74
	private String genererTitreFormulaire() {
73
	private void genererTitreFormulaire() {
75
		String titre = i18nC.collectionTitreFormAjout();
74
		String titre = i18nC.collectionTitreFormAjout();
-
 
75
		if (mode.equals(Formulaire.MODE_MODIFIER)) {
-
 
76
			 titre = i18nC.collectionTitreFormModif();
76
		if (mode.equals(Formulaire.MODE_MODIFIER)) {
77
			 if (collection != null) {
-
 
78
				 titre += " - "+i18nC.id()+": "+collection.getId();
77
			 titre = i18nC.collectionTitreFormModif()+" - "+i18nC.id()+": "+collection.getId();
79
			 }
78
		}
80
		}
79
		return titre;
81
		panneauFormulaire.setHeading(titre);
Line 80... Line 82...
80
	}
82
	}
81
	
83
	
82
	private void creerFieldsetPrincipal() {
84
	private void creerFieldsetPrincipal() {
Line 261... Line 263...
261
			Info.display("Modification d'une collection", info.toString());
263
			Info.display("Modification d'une collection", info.toString());
262
			if (info.getDonnee(0) != null) {
264
			if (info.getDonnee(0) != null) {
263
				collection = (Collection) info.getDonnee(0);
265
				collection = (Collection) info.getDonnee(0);
264
			}
266
			}
265
			peupler();
267
			peupler();
266
			actualiserTitrePanneau();
268
			genererTitreFormulaire();
267
		} else if (info.getType().equals("ajout_collection")) {
269
		} else if (info.getType().equals("ajout_collection")) {
268
			if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
270
			if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
269
				String collectionId = (String) info.getDonnee(0);
271
				String collectionId = (String) info.getDonnee(0);
270
				Info.display("Ajout d'une collection", "La collection '"+collectionId+"' a bien été ajoutée");
272
				Info.display("Ajout d'une collection", "La collection '"+collectionId+"' a bien été ajoutée");
Line 271... Line 273...
271
			
273
			
272
				// Suite à la récupération de l'id de l'institution nouvellement ajoutée nous ajoutons les personnes et les publications liées
274
				// Suite à la récupération de l'id de l'institution nouvellement ajoutée nous ajoutons les personnes et les publications liées
273
				personneOnglet.rafraichir(info);
275
				personneOnglet.rafraichir(info);
-
 
276
				publicationOnglet.rafraichir(info);
274
				publicationOnglet.rafraichir(info);
277
				commentaireOnglet.rafraichir(info);
275
			} else {
278
			} else {
276
				Info.display("Ajout d'une collection", info.toString());
279
				Info.display("Ajout d'une collection", info.toString());
277
			}
280
			}
278
		} else if (info.getType().equals("liste_collection_a_personne")) {
281
		} else if (info.getType().equals("liste_collection_a_personne")) {
Line 299... Line 302...
299
		contenuOnglet.peupler();
302
		contenuOnglet.peupler();
300
		inventaireOnglet.peupler();
303
		inventaireOnglet.peupler();
301
		commentaireOnglet.peupler();
304
		commentaireOnglet.peupler();
302
	}
305
	}
Line 303... Line -...
303
 
-
 
304
	private void actualiserTitrePanneau() {
-
 
305
		String titre = i18nC.titreModifFormCollection();
-
 
306
		// Composition du titre
-
 
307
		titre += " - "+i18nC.id()+" : "+collection.getId();
-
 
308
		panneauFormulaire.setHeading(titre);		
-
 
309
	}
-
 
310
 
306
 
311
	public boolean soumettreFormulaire() {
307
	public boolean soumettreFormulaire() {
312
		// Vérification de la validité des champs du formulaire
308
		// Vérification de la validité des champs du formulaire
313
		boolean formulaireValide = verifierFormulaire();
309
		boolean formulaireValide = verifierFormulaire();
314
		if (formulaireValide) {
310
		if (formulaireValide) {