| Line 244... |
Line 244... |
| 244 |
public void rafraichir(Object nouvellesDonnees) {
|
244 |
public void rafraichir(Object nouvellesDonnees) {
|
| 245 |
if (nouvellesDonnees instanceof Information) {
|
245 |
if (nouvellesDonnees instanceof Information) {
|
| 246 |
Information info = (Information) nouvellesDonnees;
|
246 |
Information info = (Information) nouvellesDonnees;
|
| 247 |
rafraichirInformation(info);
|
247 |
rafraichirInformation(info);
|
| 248 |
} else {
|
248 |
} else {
|
| 249 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
249 |
Debug.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()));
|
| 250 |
}
|
250 |
}
|
| Line 251... |
Line 251... |
| 251 |
|
251 |
|
| 252 |
controlerFermetureApresRafraichissement();
|
252 |
controlerFermetureApresRafraichissement();
|
| Line 253... |
Line 253... |
| 253 |
}
|
253 |
}
|
| 254 |
|
254 |
|
| 255 |
private void rafraichirInformation(Information info) {
|
255 |
private void rafraichirInformation(Information info) {
|
| 256 |
if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
|
256 |
if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
|
| - |
|
257 |
Debug.log("MESSAGES:\n"+info.getMessages().toString());
|
| Line 257... |
Line 258... |
| 257 |
GWT.log("MESSAGES:\n"+info.getMessages().toString(), null);
|
258 |
}
|
| 258 |
}
|
259 |
String infoType = info.getType();
|
| 259 |
|
260 |
|
| 260 |
if (info.getType().equals("modif_collection")) {
|
261 |
if (infoType.equals("modif_collection")) {
|
| 261 |
Info.display("Modification d'une collection", info.toString());
|
262 |
Info.display("Modification d'une collection", info.toString());
|
| 262 |
} else if (info.getType().equals("selection_collection")) {
|
263 |
} else if (infoType.equals("selection_collection")) {
|
| 263 |
Info.display("Modification d'une collection", info.toString());
|
264 |
Info.display("Modification d'une collection", info.toString());
|
| 264 |
if (info.getDonnee(0) != null) {
|
265 |
if (info.getDonnee(0) != null) {
|
| 265 |
collection = (Collection) info.getDonnee(0);
|
266 |
collection = (Collection) info.getDonnee(0);
|
| 266 |
}
|
267 |
}
|
| 267 |
peupler();
|
268 |
peupler();
|
| 268 |
genererTitreFormulaire();
|
269 |
genererTitreFormulaire();
|
| 269 |
} else if (info.getType().equals("ajout_collection")) {
|
270 |
} else if (infoType.equals("ajout_collection")) {
|
| Line 270... |
Line 271... |
| 270 |
if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
|
271 |
if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
|
| Line 276... |
Line 277... |
| 276 |
publicationOnglet.rafraichir(info);
|
277 |
publicationOnglet.rafraichir(info);
|
| 277 |
commentaireOnglet.rafraichir(info);
|
278 |
commentaireOnglet.rafraichir(info);
|
| 278 |
} else {
|
279 |
} else {
|
| 279 |
Info.display("Ajout d'une collection", info.toString());
|
280 |
Info.display("Ajout d'une collection", info.toString());
|
| 280 |
}
|
281 |
}
|
| 281 |
} else if (info.getType().equals("liste_collection_a_personne")) {
|
282 |
} else if (infoType.equals("liste_collection_a_personne")) {
|
| 282 |
personneOnglet.rafraichir(info);
|
283 |
personneOnglet.rafraichir(info);
|
| 283 |
} else if (info.getType().equals("liste_collection_a_publication")) {
|
284 |
} else if (infoType.equals("liste_collection_a_publication")) {
|
| 284 |
publicationOnglet.rafraichir(info);
|
285 |
publicationOnglet.rafraichir(info);
|
| 285 |
} else if (info.getType().equals("liste_collection_a_commentaire")) {
|
286 |
} else if (infoType.equals("liste_collection_a_commentaire")) {
|
| 286 |
commentaireOnglet.rafraichir(info);
|
287 |
commentaireOnglet.rafraichir(info);
|
| 287 |
}
|
288 |
}
|
| 288 |
}
|
289 |
}
|
| Line 289... |
Line 290... |
| 289 |
|
290 |
|
| Line 310... |
Line 311... |
| 310 |
if (formulaireValide) {
|
311 |
if (formulaireValide) {
|
| 311 |
// Collecte des données du formulaire
|
312 |
// Collecte des données du formulaire
|
| 312 |
Collection collectionAEnregistrer = collecterCollection();
|
313 |
Collection collectionAEnregistrer = collecterCollection();
|
| 313 |
if (mode.equals(MODE_AJOUTER)) {
|
314 |
if (mode.equals(MODE_AJOUTER)) {
|
| 314 |
mediateur.ajouterCollection(this, collectionAEnregistrer);
|
315 |
mediateur.ajouterCollection(this, collectionAEnregistrer);
|
| 315 |
Debug.log("enfin");
|
- |
|
| 316 |
} else if (mode.equals(MODE_MODIFIER)) {
|
316 |
} else if (mode.equals(MODE_MODIFIER)) {
|
| 317 |
if (collectionAEnregistrer == null) {
|
317 |
if (collectionAEnregistrer == null) {
|
| 318 |
Info.display("Modification d'une collection", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
|
318 |
Info.display("Modification d'une collection", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
|
| 319 |
} else {
|
319 |
} else {
|
| 320 |
mediateur.modifierCollection(this, collectionAEnregistrer);
|
320 |
mediateur.modifierCollection(this, collectionAEnregistrer);
|