| Line 564... |
Line 564... |
| 564 |
publicationsBoutonModifier.disable();
|
564 |
publicationsBoutonModifier.disable();
|
| 565 |
}
|
565 |
}
|
| 566 |
}
|
566 |
}
|
| Line 567... |
Line 567... |
| 567 |
|
567 |
|
| 568 |
public void rafraichir(Object nouvellesDonnees) {
|
- |
|
| 569 |
|
- |
|
| Line 570... |
Line 568... |
| 570 |
Debug.log("|> PersonneFormPublication.rafraichir() BEGIN");
|
568 |
public void rafraichir(Object nouvellesDonnees) {
|
| 571 |
|
569 |
|
| 572 |
if (nouvellesDonnees instanceof Information) {
|
570 |
if (nouvellesDonnees instanceof Information) {
|
| 573 |
Information info = (Information) nouvellesDonnees;
|
571 |
Information info = (Information) nouvellesDonnees;
|
| 574 |
rafraichirInformation(info);
|
572 |
rafraichirInformation(info);
|
| 575 |
} else if (nouvellesDonnees instanceof ValeurListe) {
|
- |
|
| 576 |
|
- |
|
| 577 |
Debug.log("|--> instanceof ValeurListe");
|
573 |
} else if (nouvellesDonnees instanceof ValeurListe) {
|
| 578 |
|
574 |
|
| 579 |
ValeurListe listeValeurs = (ValeurListe) nouvellesDonnees;
|
575 |
ValeurListe listeValeurs = (ValeurListe) nouvellesDonnees;
|
| 580 |
if (listeValeurs.getId().equals(config.getListeId("relationPersonnePublication"))) {
|
576 |
if (listeValeurs.getId().equals(config.getListeId("relationPersonnePublication"))) {
|
| 581 |
Formulaire.rafraichirComboBox(listeValeurs, typeRelationCombo);
|
577 |
Formulaire.rafraichirComboBox(listeValeurs, typeRelationCombo);
|
| 582 |
roles = listeValeurs.toList();
|
578 |
roles = listeValeurs.toList();
|
| 583 |
mettreAJourPersonne();
|
579 |
mettreAJourPersonne();
|
| 584 |
}
|
- |
|
| 585 |
} else if (nouvellesDonnees instanceof PublicationListe) {
|
- |
|
| Line 586... |
Line 580... |
| 586 |
|
580 |
}
|
| 587 |
Debug.log("|--> instanceof PublicationListe");
|
581 |
} else if (nouvellesDonnees instanceof PublicationListe) {
|
| 588 |
|
582 |
|
| 589 |
PublicationListe listePublications = (PublicationListe) nouvellesDonnees;
|
583 |
PublicationListe listePublications = (PublicationListe) nouvellesDonnees;
|
| 590 |
rafraichirPublicationListe(listePublications);
|
- |
|
| 591 |
} else if (nouvellesDonnees instanceof PublicationAPersonneListe) {
|
- |
|
| 592 |
|
584 |
rafraichirPublicationListe(listePublications);
|
| 593 |
Debug.log("|--> instanceof PublicationAPersonneListe");
|
585 |
} else if (nouvellesDonnees instanceof PublicationAPersonneListe) {
|
| 594 |
|
586 |
|
| Line 595... |
Line 587... |
| 595 |
PublicationAPersonneListe papl = (PublicationAPersonneListe) nouvellesDonnees;
|
587 |
PublicationAPersonneListe papl = (PublicationAPersonneListe) nouvellesDonnees;
|
| Line 607... |
Line 599... |
| 607 |
|
599 |
|
| 608 |
listePublicationsLiees.put(pap.getPublicationLiee().getId(), pap);
|
600 |
listePublicationsLiees.put(pap.getPublicationLiee().getId(), pap);
|
| 609 |
}
|
601 |
}
|
| 610 |
mettreAJourGrille();
|
602 |
mettreAJourGrille();
|
| 611 |
}
|
- |
|
| 612 |
else {
|
- |
|
| 613 |
Debug.log("|--> paplListe.size()<=0");
|
- |
|
| 614 |
}
|
603 |
}
|
| 615 |
} else {
|
604 |
} else {
|
| 616 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
605 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
| 617 |
}
|
- |
|
| 618 |
Debug.log("|> PersonneFormPublication.rafraichir() END");
|
606 |
}
|
| Line 619... |
Line 607... |
| 619 |
}
|
607 |
}
|
| Line 620... |
Line 608... |
| 620 |
|
608 |
|
| Line 626... |
Line 614... |
| 626 |
publicationsSaisiesComboBox.getStore().add(listePublications.toList());
|
614 |
publicationsSaisiesComboBox.getStore().add(listePublications.toList());
|
| 627 |
publicationsSaisiesComboBox.expand();
|
615 |
publicationsSaisiesComboBox.expand();
|
| 628 |
}
|
616 |
}
|
| Line 629... |
Line 617... |
| 629 |
|
617 |
|
| 630 |
public void rafraichirInformation(Information info) {
|
- |
|
| 631 |
|
- |
|
| Line 632... |
Line 618... |
| 632 |
Debug.log("|> PersonneFormPublication.rafraichirInformation(Information info) BEGIN");
|
618 |
public void rafraichirInformation(Information info) {
|
| 633 |
|
619 |
|
| 634 |
if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
|
620 |
if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
|
| 635 |
GWT.log("MESSAGES:\n"+info.getMessages().toString(), null);
|
621 |
GWT.log("MESSAGES:\n"+info.getMessages().toString(), null);
|
| Line 682... |
Line 668... |
| 682 |
if (publicationLiee.get("_etat_") != null) {
|
668 |
if (publicationLiee.get("_etat_") != null) {
|
| 683 |
if (publicationLiee.get("_etat_").equals(aDonnee.ETAT_MODIFIE)) {
|
669 |
if (publicationLiee.get("_etat_").equals(aDonnee.ETAT_MODIFIE)) {
|
| 684 |
// Comme il est impossible de modifier les relations nous supprimons l'ancien enregistrement et ajoutons un nouveau avec le nouveau id_role
|
670 |
// Comme il est impossible de modifier les relations nous supprimons l'ancien enregistrement et ajoutons un nouveau avec le nouveau id_role
|
| 685 |
publicationsSupprimees.put("id"+idGenere++, publicationLiee);
|
671 |
publicationsSupprimees.put("id"+idGenere++, publicationLiee);
|
| Line 686... |
Line -... |
| 686 |
|
- |
|
| 687 |
Debug.log("|--> PersonneFormPublication.collecter(), ETAT_MODIFIE, relationAAjouter, clonage de publicationLiee");
|
672 |
|
| 688 |
PublicationAPersonne relationAAjouter = (PublicationAPersonne) publicationLiee.cloner(new PublicationAPersonne());
|
673 |
PublicationAPersonne relationAAjouter = (PublicationAPersonne) publicationLiee.cloner(new PublicationAPersonne());
|
| 689 |
publicationsAjoutees.put("id"+idGenere++, relationAAjouter);
|
- |
|
| 690 |
Debug.log("|--> ETAT_MODIFE, PublicationLiee = "+publicationLiee.toString());
|
674 |
publicationsAjoutees.put("id"+idGenere++, relationAAjouter);
|
| Line 691... |
Line 675... |
| 691 |
}
|
675 |
}
|
| 692 |
|
676 |
|
| 693 |
if (publicationLiee.get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
|
- |
|
| 694 |
publicationsAjoutees.put("id"+idGenere++, publicationLiee);
|
677 |
if (publicationLiee.get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
|
| 695 |
Debug.log("|--> ETAT_AJOUTE, PublicationLiee = "+publicationLiee.toString());
|
678 |
publicationsAjoutees.put("id"+idGenere++, publicationLiee);
|
| 696 |
}
|
679 |
}
|
| Line 697... |
Line 680... |
| 697 |
// Initialisation de la grille
|
680 |
// Initialisation de la grille
|
| Line 732... |
Line 715... |
| 732 |
} else {
|
715 |
} else {
|
| 733 |
// Ajout des relations PublicationAPersonne
|
716 |
// Ajout des relations PublicationAPersonne
|
| 734 |
if (publicationsAjoutees.size() != 0) {
|
717 |
if (publicationsAjoutees.size() != 0) {
|
| 735 |
//TODO : utiliser le role d'une liste déroulante
|
718 |
//TODO : utiliser le role d'une liste déroulante
|
| Line 736... |
Line -... |
| 736 |
|
- |
|
| 737 |
Debug.log("<8-8> PersonneFormPublication - Appel à mediateur.ajouterPublicationAPersonne()");
|
719 |
|
| 738 |
mediateur.ajouterPublicationAPersonne(this, publicationsAjoutees, personneSelectionnee.getId(), null);
|
720 |
mediateur.ajouterPublicationAPersonne(this, publicationsAjoutees, personneSelectionnee.getId(), null);
|
| 739 |
}
|
721 |
}
|
| 740 |
// Suppression des relations PublicationAPersonne
|
722 |
// Suppression des relations PublicationAPersonne
|
| Line 741... |
Line -... |
| 741 |
if (publicationsSupprimees.size() != 0) {
|
- |
|
| 742 |
|
723 |
if (publicationsSupprimees.size() != 0) {
|
| 743 |
Debug.log("<8-8> PersonneFormPublication - Appel à mediateur.supprimerPublicationAPersonne()");
|
724 |
|
| 744 |
mediateur.supprimerPublicationAPersonne(this, publicationsSupprimees);
|
725 |
mediateur.supprimerPublicationAPersonne(this, publicationsSupprimees);
|
| 745 |
}
|
726 |
}
|