| Line 82... |
Line 82... |
| 82 |
private PublicationAPersonneListe listePublicationsLiees = new PublicationAPersonneListe();
|
82 |
private PublicationAPersonneListe listePublicationsLiees = new PublicationAPersonneListe();
|
| Line 83... |
Line 83... |
| 83 |
|
83 |
|
| Line 84... |
Line 84... |
| 84 |
private FenetreForm fenetreFormulaire = null;
|
84 |
private FenetreForm fenetreFormulaire = null;
|
| 85 |
|
- |
|
| 86 |
public PersonneFormPublication(Formulaire formulaireCourrant) {
|
- |
|
| 87 |
|
- |
|
| 88 |
Debug.log("|> PersonneFormPublication : [constructeur]");
|
85 |
|
| 89 |
|
86 |
public PersonneFormPublication(Formulaire formulaireCourrant) {
|
| 90 |
initialiserOnglet(formulaireCourrant);
|
87 |
initialiserOnglet(formulaireCourrant);
|
| 91 |
setId("publication");
|
88 |
setId("publication");
|
| Line 101... |
Line 98... |
| 101 |
|
98 |
|
| 102 |
initialiser();
|
99 |
initialiser();
|
| Line 103... |
Line 100... |
| 103 |
}
|
100 |
}
|
| 104 |
|
- |
|
| 105 |
private void initialiser() {
|
- |
|
| Line 106... |
Line 101... |
| 106 |
|
101 |
|
| 107 |
Debug.log("|> PersonneFormPublication.initialiser()");
|
102 |
private void initialiser() {
|
| 108 |
|
103 |
|
| 109 |
// Remise à zéro des modification dans la liste des auteurs
|
104 |
// Remise à zéro des modification dans la liste des auteurs
|
| Line 110... |
Line 105... |
| 110 |
idGenere = 1;
|
105 |
idGenere = 1;
|
| 111 |
publicationsAjoutees = new PublicationAPersonneListe();
|
106 |
publicationsAjoutees = new PublicationAPersonneListe();
|
| 112 |
publicationsSupprimees = new PublicationAPersonneListe();
|
107 |
publicationsSupprimees = new PublicationAPersonneListe();
|
| Line 113... |
Line 108... |
| 113 |
|
108 |
|
| 114 |
// Actualisation de l'état des boutons de la barre d'outils
|
- |
|
| 115 |
actualiserEtatBoutonsBarreOutils();
|
- |
|
| Line 116... |
Line 109... |
| 116 |
}
|
109 |
// Actualisation de l'état des boutons de la barre d'outils
|
| 117 |
|
- |
|
| 118 |
public void mettreAJourPersonne() {
|
- |
|
| 119 |
|
- |
|
| 120 |
Debug.log("|> *** BEGIN PersonneFormPublication.mettreAJourPersonne()");
|
- |
|
| 121 |
|
- |
|
| Line 122... |
Line 110... |
| 122 |
personneSelectionnee = ((PersonneForm) formulaire).personneSelectionnee;
|
110 |
actualiserEtatBoutonsBarreOutils();
|
| Line 123... |
Line 111... |
| 123 |
|
111 |
}
|
| 124 |
Debug.log("|--> PersonneFormPublication.mettreAJourPersonne : personneSelectionnee="+personneSelectionnee.toString());
|
112 |
|
| Line 139... |
Line 127... |
| 139 |
// s'effectuent deux fois au lieu d'une, c-a-d que le formulaire lance deux fois l'operation rafraichir au lieu d'une ... et l'opération
|
127 |
// s'effectuent deux fois au lieu d'une, c-a-d que le formulaire lance deux fois l'operation rafraichir au lieu d'une ... et l'opération
|
| 140 |
// rafraichir lance à son tour de nombreuses opérations qui en conséquence sont effectuées deux fois au lieu d'une
|
128 |
// rafraichir lance à son tour de nombreuses opérations qui en conséquence sont effectuées deux fois au lieu d'une
|
| 141 |
if ((roles != null) && (personneSelectionnee!=null) && (!personneSelectionnee.toString().equals(""))) {
|
129 |
if ((roles != null) && (personneSelectionnee!=null) && (!personneSelectionnee.toString().equals(""))) {
|
| Line 142... |
Line 130... |
| 142 |
|
130 |
|
| 143 |
mediateur.selectionnerPublicationAPersonne(this, null, personneSelectionnee.getId(), roles);
|
- |
|
| 144 |
|
- |
|
| 145 |
Debug.log("|--> PersonneFormPublication.mettreAJourPersonne : selectionnerPublicationAPersonne(this, null, personneSelectionnee.getId(), roles)");
|
- |
|
| 146 |
Debug.log("| avec personneSelectionnee.getId()="+personneSelectionnee.getId());
|
- |
|
| 147 |
Debug.log("|> END PersonneFormPublication.mettreAJourPersonne()");
|
131 |
mediateur.selectionnerPublicationAPersonne(this, null, personneSelectionnee.getId(), roles);
|
| 148 |
}
|
132 |
}
|
| Line 149... |
Line 133... |
| 149 |
}
|
133 |
}
|
| 150 |
|
134 |
|
| Line 296... |
Line 280... |
| 296 |
});
|
280 |
});
|
| 297 |
return bouton;
|
281 |
return bouton;
|
| 298 |
}
|
282 |
}
|
| Line 299... |
Line 283... |
| 299 |
|
283 |
|
| 300 |
private void actualiserGrille() {
|
- |
|
| 301 |
|
- |
|
| 302 |
Debug.log("|> PersonneFormPublication.actualiserGrille()");
|
- |
|
| 303 |
|
284 |
private void actualiserGrille() {
|
| 304 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
285 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
| 305 |
mediateur.selectionnerPublicationAPersonne(this, null, personneSelectionnee.getId(), "%");
|
286 |
mediateur.selectionnerPublicationAPersonne(this, null, personneSelectionnee.getId(), "%");
|
| 306 |
} else {
|
287 |
} else {
|
| 307 |
grille.getStore().removeAll();
|
288 |
grille.getStore().removeAll();
|
| Line 343... |
Line 324... |
| 343 |
private void ajouterDansGrille(Publication publication) {
|
324 |
private void ajouterDansGrille(Publication publication) {
|
| 344 |
ajouterDansGrille(publication, 0);
|
325 |
ajouterDansGrille(publication, 0);
|
| 345 |
}
|
326 |
}
|
| Line 346... |
Line 327... |
| 346 |
|
327 |
|
| 347 |
private void ajouterDansGrille(Publication publication, int index) {
|
- |
|
| 348 |
Debug.log("|> PersonneFormPublication.ajouterDansGrille(Publication publication, int index)");
|
328 |
private void ajouterDansGrille(Publication publication, int index) {
|
| 349 |
if (publication != null) {
|
- |
|
| 350 |
Debug.log("|--> publication != null");
|
329 |
if (publication != null) {
|
| 351 |
if (!listePublicationsLiees.containsKey(publication.getId())) {
|
330 |
if (!listePublicationsLiees.containsKey(publication.getId())) {
|
| 352 |
PublicationAPersonne publicationLiee = new PublicationAPersonne();
|
331 |
PublicationAPersonne publicationLiee = new PublicationAPersonne();
|
| 353 |
publicationLiee.setPersonne(personneSelectionnee);
|
332 |
publicationLiee.setPersonne(personneSelectionnee);
|
| 354 |
publicationLiee.setPublicationLiee(publication);
|
333 |
publicationLiee.setPublicationLiee(publication);
|
| 355 |
publicationLiee.setIdPublication(publication.getId());
|
- |
|
| 356 |
|
- |
|
| Line 357... |
Line 334... |
| 357 |
Debug.log("\\\\> set ETAT_AJOUTE");
|
334 |
publicationLiee.setIdPublication(publication.getId());
|
| 358 |
|
335 |
|
| 359 |
publicationLiee.set("_etat_", aDonnee.ETAT_AJOUTE);
|
- |
|
| 360 |
listePublicationsLiees.put(publication.getId(), publicationLiee);
|
- |
|
| 361 |
|
- |
|
| Line 362... |
Line 336... |
| 362 |
Debug.log("|--> personneSelectionneeID="+personneSelectionnee.getId());
|
336 |
publicationLiee.set("_etat_", aDonnee.ETAT_AJOUTE);
|
| 363 |
Debug.log("|--> publicationID="+publication.getId());
|
337 |
listePublicationsLiees.put(publication.getId(), publicationLiee);
|
| 364 |
|
338 |
|
| 365 |
// Ajout à la grille
|
339 |
// Ajout à la grille
|
| Line 375... |
Line 349... |
| 375 |
|
349 |
|
| 376 |
/**
|
350 |
/**
|
| 377 |
* Met à jour la grille avec les informations contenus dans la variable listePublicationsLiees
|
351 |
* Met à jour la grille avec les informations contenus dans la variable listePublicationsLiees
|
| 378 |
*/
|
352 |
*/
|
| 379 |
private void mettreAJourGrille() {
|
- |
|
| 380 |
|
- |
|
| Line 381... |
Line 353... |
| 381 |
Debug.log("|> PersonneFormPublication.mettreAJourGrille()");
|
353 |
private void mettreAJourGrille() {
|
| 382 |
|
354 |
|
| 383 |
grille.getStore().removeAll();
|
355 |
grille.getStore().removeAll();
|
| Line 388... |
Line 360... |
| 388 |
if (publicationLiee != null) {
|
360 |
if (publicationLiee != null) {
|
| 389 |
// Ajout de la personne supprimée à la liste
|
361 |
// Ajout de la personne supprimée à la liste
|
| 390 |
if ((publicationLiee.get("_etat_").equals("") || !publicationLiee.get("_etat_").equals(aDonnee.ETAT_AJOUTE))
|
362 |
if ((publicationLiee.get("_etat_").equals("") || !publicationLiee.get("_etat_").equals(aDonnee.ETAT_AJOUTE))
|
| 391 |
&& publicationLiee.getId() != null
|
363 |
&& publicationLiee.getId() != null
|
| 392 |
&& !publicationLiee.getId().equals("")) {
|
364 |
&& !publicationLiee.getId().equals("")) {
|
| 393 |
Debug.log("Nbre publications supprimées avant:"+publicationsSupprimees.size());
|
- |
|
| 394 |
publicationsSupprimees.put("id"+idGenere++, publicationLiee);
|
365 |
publicationsSupprimees.put("id"+idGenere++, publicationLiee);
|
| 395 |
//GWT.log("Publications supprimée : "+publicationLiee.getIdPublication()+" "+publicationLiee.get.getNomComplet(), null);
|
- |
|
| 396 |
Debug.log("Nbre publications supprimées :"+publicationsSupprimees.size());
|
- |
|
| 397 |
}
|
366 |
}
|
| Line 398... |
Line 367... |
| 398 |
|
367 |
|
| 399 |
// Suppression de l'enregistrement de la grille
|
368 |
// Suppression de l'enregistrement de la grille
|
| 400 |
grille.getStore().remove(publicationLiee);
|
369 |
grille.getStore().remove(publicationLiee);
|
| 401 |
}
|
370 |
}
|
| Line 402... |
Line 371... |
| 402 |
}
|
371 |
}
|
| Line 403... |
Line -... |
| 403 |
|
- |
|
| 404 |
private EditorGrid<PublicationAPersonne> creerGrille() {
|
- |
|
| 405 |
|
372 |
|
| 406 |
Debug.log("|> PersonneFormPublication.creerGrille()");
|
373 |
private EditorGrid<PublicationAPersonne> creerGrille() {
|
| 407 |
|
374 |
|
| 408 |
ListStore<PublicationAPersonne> storeGrille = new ListStore<PublicationAPersonne>();
|
375 |
ListStore<PublicationAPersonne> storeGrille = new ListStore<PublicationAPersonne>();
|
| 409 |
storeGrille.addListener(Store.Add, new Listener<StoreEvent<PublicationAPersonne>>() {
|
376 |
storeGrille.addListener(Store.Add, new Listener<StoreEvent<PublicationAPersonne>>() {
|
| Line 417... |
Line 384... |
| 417 |
}
|
384 |
}
|
| 418 |
});
|
385 |
});
|
| 419 |
storeGrille.addListener(Store.Update, new Listener<StoreEvent<PublicationAPersonne>>() {
|
386 |
storeGrille.addListener(Store.Update, new Listener<StoreEvent<PublicationAPersonne>>() {
|
| 420 |
public void handleEvent(StoreEvent<PublicationAPersonne> ce) {
|
387 |
public void handleEvent(StoreEvent<PublicationAPersonne> ce) {
|
| 421 |
if (ce.getRecord().isModified("_role_") && !ce.getModel().get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
|
388 |
if (ce.getRecord().isModified("_role_") && !ce.getModel().get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
|
| 422 |
Debug.log("||| PersonneFormPublication.creerGrille, storeGrille LISTENER : set ETAT_MODIFIE");
|
- |
|
| 423 |
ce.getModel().set("_etat_", aDonnee.ETAT_MODIFIE);
|
389 |
ce.getModel().set("_etat_", aDonnee.ETAT_MODIFIE);
|
| 424 |
}
|
390 |
}
|
| 425 |
}
|
391 |
}
|
| 426 |
});
|
392 |
});
|
| Line 567... |
Line 533... |
| 567 |
publicationsBoutonModifier.disable();
|
533 |
publicationsBoutonModifier.disable();
|
| 568 |
}
|
534 |
}
|
| 569 |
}
|
535 |
}
|
| Line 570... |
Line 536... |
| 570 |
|
536 |
|
| 571 |
public void rafraichir(Object nouvellesDonnees) {
|
- |
|
| 572 |
|
- |
|
| Line 573... |
Line 537... |
| 573 |
Debug.log("|> PersonneFormPublication.rafraichir() BEGIN");
|
537 |
public void rafraichir(Object nouvellesDonnees) {
|
| 574 |
|
538 |
|
| 575 |
if (nouvellesDonnees instanceof Information)
|
- |
|
| 576 |
{
|
539 |
if (nouvellesDonnees instanceof Information)
|
| 577 |
Debug.log("|>>>>>>>>>>>>>");
|
540 |
{
|
| 578 |
Information info = (Information) nouvellesDonnees;
|
541 |
Information info = (Information) nouvellesDonnees;
|
| 579 |
rafraichirInformation(info);
|
542 |
rafraichirInformation(info);
|
| 580 |
}
|
543 |
}
|
| 581 |
else if (nouvellesDonnees instanceof ValeurListe)
|
- |
|
| 582 |
{
|
- |
|
| 583 |
|
- |
|
| 584 |
Debug.log("|--> instanceof ValeurListe");
|
544 |
else if (nouvellesDonnees instanceof ValeurListe)
|
| 585 |
|
545 |
{
|
| 586 |
ValeurListe listeValeurs = (ValeurListe) nouvellesDonnees;
|
546 |
ValeurListe listeValeurs = (ValeurListe) nouvellesDonnees;
|
| 587 |
if (listeValeurs.getId().equals(config.getListeId("relationPersonnePublication"))) {
|
547 |
if (listeValeurs.getId().equals(config.getListeId("relationPersonnePublication"))) {
|
| 588 |
Formulaire.rafraichirComboBox(listeValeurs, typeRelationCombo);
|
548 |
Formulaire.rafraichirComboBox(listeValeurs, typeRelationCombo);
|
| 589 |
roles = listeValeurs.toList();
|
549 |
roles = listeValeurs.toList();
|
| 590 |
mettreAJourPersonne();
|
550 |
mettreAJourPersonne();
|
| 591 |
}
|
551 |
}
|
| 592 |
}
|
552 |
}
|
| 593 |
else if (nouvellesDonnees instanceof PublicationListe)
|
- |
|
| 594 |
{
|
- |
|
| 595 |
|
- |
|
| 596 |
Debug.log("|--> instanceof PublicationListe");
|
553 |
else if (nouvellesDonnees instanceof PublicationListe)
|
| 597 |
|
554 |
{
|
| 598 |
PublicationListe listePublications = (PublicationListe) nouvellesDonnees;
|
555 |
PublicationListe listePublications = (PublicationListe) nouvellesDonnees;
|
| 599 |
rafraichirPublicationListe(listePublications);
|
556 |
rafraichirPublicationListe(listePublications);
|
| 600 |
}
|
557 |
}
|
| 601 |
else if (nouvellesDonnees instanceof PublicationAPersonneListe)
|
- |
|
| 602 |
{
|
- |
|
| 603 |
|
- |
|
| 604 |
Debug.log("|--> instanceof PublicationAPersonneListe");
|
558 |
else if (nouvellesDonnees instanceof PublicationAPersonneListe)
|
| 605 |
|
559 |
{
|
| 606 |
PublicationAPersonneListe papl = (PublicationAPersonneListe) nouvellesDonnees;
|
560 |
PublicationAPersonneListe papl = (PublicationAPersonneListe) nouvellesDonnees;
|
| 607 |
List<PublicationAPersonne> paplListe = papl.toList();
|
- |
|
| 608 |
if (paplListe.size()>0){
|
- |
|
| 609 |
|
- |
|
| 610 |
Debug.log("|--> paplListe.size()>0");
|
- |
|
| 611 |
Debug.log("|--> paplListe="+paplListe.toString());
|
561 |
List<PublicationAPersonne> paplListe = papl.toList();
|
| 612 |
|
562 |
if (paplListe.size()>0){
|
| 613 |
Iterator<PublicationAPersonne> it = paplListe.iterator();
|
563 |
Iterator<PublicationAPersonne> it = paplListe.iterator();
|
| 614 |
while (it.hasNext()) {
|
- |
|
| 615 |
PublicationAPersonne pap = it.next();
|
- |
|
| 616 |
|
- |
|
| 617 |
Debug.log("|--> listePublicationsLiees.size="+listePublicationsLiees.size());
|
564 |
while (it.hasNext()) {
|
| 618 |
|
565 |
PublicationAPersonne pap = it.next();
|
| 619 |
listePublicationsLiees.put(pap.getPublicationLiee().getId(), pap);
|
566 |
listePublicationsLiees.put(pap.getPublicationLiee().getId(), pap);
|
| 620 |
}
|
567 |
}
|
| 621 |
mettreAJourGrille();
|
- |
|
| 622 |
}
|
- |
|
| 623 |
else {
|
- |
|
| 624 |
Debug.log("|--> paplListe.size()<=0");
|
568 |
mettreAJourGrille();
|
| 625 |
}
|
569 |
}
|
| 626 |
}
|
570 |
}
|
| 627 |
else
|
- |
|
| 628 |
{
|
571 |
else
|
| 629 |
Debug.log("|>*** CROTTE");
|
572 |
{
|
| 630 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
- |
|
| 631 |
}
|
- |
|
| 632 |
|
573 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
| Line 633... |
Line 574... |
| 633 |
Debug.log("|> PersonneFormPublication.rafraichir() END");
|
574 |
}
|
| 634 |
}
|
- |
|
| 635 |
|
- |
|
| 636 |
private void rafraichirPublicationListe(PublicationListe listePublications) {
|
- |
|
| 637 |
|
575 |
}
|
| 638 |
Debug.log("|> PersonneFormPublication.rafraichirPublicationListe(PublicationListe listePublications)");
|
576 |
|
| 639 |
|
577 |
private void rafraichirPublicationListe(PublicationListe listePublications) {
|
| 640 |
publicationsSaisiesComboBox.getStore().removeAll();
|
578 |
publicationsSaisiesComboBox.getStore().removeAll();
|
| Line 641... |
Line 579... |
| 641 |
publicationsSaisiesComboBox.getStore().add(listePublications.toList());
|
579 |
publicationsSaisiesComboBox.getStore().add(listePublications.toList());
|
| 642 |
publicationsSaisiesComboBox.expand();
|
- |
|
| 643 |
}
|
- |
|
| 644 |
|
- |
|
| 645 |
public void rafraichirInformation(Information info) {
|
- |
|
| 646 |
|
- |
|
| 647 |
Debug.log("|> PersonneFormPublication.rafraichirInformation(Information info) BEGIN");
|
580 |
publicationsSaisiesComboBox.expand();
|
| 648 |
|
581 |
}
|
| 649 |
Debug.log("|*^*| type de l'info="+info.getType());
|
582 |
|
| 650 |
|
583 |
public void rafraichirInformation(Information info) {
|
| 651 |
if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
|
584 |
if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
|
| Line 675... |
Line 608... |
| 675 |
InfoLogger.display("Ajout publication à personne", info.getDonnees().toString());
|
608 |
InfoLogger.display("Ajout publication à personne", info.getDonnees().toString());
|
| 676 |
} else if (type.equals("suppression_publication_a_personne")) {
|
609 |
} else if (type.equals("suppression_publication_a_personne")) {
|
| 677 |
InfoLogger.display("Suppression publication à personne", info.getMessages().toString());
|
610 |
InfoLogger.display("Suppression publication à personne", info.getMessages().toString());
|
| 678 |
} else {
|
611 |
} else {
|
| 679 |
GWT.log(Mediateur.i18nM.erreurRafraichir(info.getClass(), this.getClass()), null);
|
612 |
GWT.log(Mediateur.i18nM.erreurRafraichir(info.getClass(), this.getClass()), null);
|
| 680 |
}
|
613 |
}
|
| 681 |
|
- |
|
| 682 |
Debug.log("|> PersonneFormPublication.rafraichirInformation(Information info) END");
|
- |
|
| 683 |
}
|
614 |
}
|
| Line 684... |
Line 615... |
| 684 |
|
615 |
|
| 685 |
public void peupler() {
|
616 |
public void peupler() {
|
| 686 |
grille.getStore().removeAll();
|
617 |
grille.getStore().removeAll();
|
| 687 |
grille.getStore().add(personneSelectionnee.getPublicationsLiees().toList());
|
618 |
grille.getStore().add(personneSelectionnee.getPublicationsLiees().toList());
|
| 688 |
layout();
|
619 |
layout();
|
| Line 689... |
Line 620... |
| 689 |
InfoLogger.display(i18nC.chargementPublication(), i18nC.ok());
|
620 |
InfoLogger.display(i18nC.chargementPublication(), i18nC.ok());
|
| Line 690... |
Line 621... |
| 690 |
|
621 |
|
| 691 |
}
|
- |
|
| 692 |
|
- |
|
| 693 |
public void collecter() {
|
- |
|
| 694 |
|
622 |
}
|
| 695 |
Debug.log("|*** PersonneFormPublication.collecter() BEGIN");
|
623 |
|
| 696 |
|
624 |
public void collecter() {
|
| 697 |
if (etreAccede()) {
|
625 |
if (etreAccede()) {
|
| 698 |
int nbrePublication = grille.getStore().getCount();
|
626 |
int nbrePublication = grille.getStore().getCount();
|
| 699 |
for (int i = 0; i < nbrePublication; i++) {
|
627 |
for (int i = 0; i < nbrePublication; i++) {
|
| 700 |
PublicationAPersonne publicationLiee = grille.getStore().getAt(i);
|
- |
|
| 701 |
if (publicationLiee.get("_etat_") != null) {
|
- |
|
| 702 |
if (publicationLiee.get("_etat_").equals(aDonnee.ETAT_MODIFIE)) {
|
- |
|
| 703 |
Debug.log(">300> ETAT_MODIFE, PublicationLiee = "+publicationLiee.toString());
|
- |
|
| 704 |
|
628 |
PublicationAPersonne publicationLiee = grille.getStore().getAt(i);
|
| 705 |
|
629 |
if (publicationLiee.get("_etat_") != null) {
|
| 706 |
Debug.log(">300> PersonneFormPublication.collecter(), ETAT_MODIFIE, publicationsSupprimees.put(\"id\"+idGenere++, publicationLiee)");
|
- |
|
| 707 |
// Comme il est impossible de modifier les relations nous supprimons l'ancien enregistrement et ajoutons un nouveau avec le nouveau id_role
|
- |
|
| 708 |
publicationsSupprimees.put("id"+idGenere++, publicationLiee);
|
630 |
if (publicationLiee.get("_etat_").equals(aDonnee.ETAT_MODIFIE)) {
|
| 709 |
|
- |
|
| 710 |
|
631 |
// Comme il est impossible de modifier les relations nous supprimons l'ancien enregistrement et ajoutons un nouveau avec le nouveau id_role
|
| 711 |
PublicationAPersonne relationAAjouter = (PublicationAPersonne) publicationLiee.cloner(new PublicationAPersonne());
|
632 |
publicationsSupprimees.put("id"+idGenere++, publicationLiee);
|
| Line 712... |
Line 633... |
| 712 |
Debug.log(">300> PersonneFormPublication.collecter(), ETAT_MODIFIE, publicationsAjoutees.put(\"id\"+idGenere++, relationAAjouter)");
|
633 |
PublicationAPersonne relationAAjouter = (PublicationAPersonne) publicationLiee.cloner(new PublicationAPersonne());
|
| 713 |
publicationsAjoutees.put("id"+idGenere++, relationAAjouter);
|
634 |
publicationsAjoutees.put("id"+idGenere++, relationAAjouter);
|
| 714 |
}
|
- |
|
| 715 |
|
635 |
}
|
| 716 |
if (publicationLiee.get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
|
636 |
|
| 717 |
publicationsAjoutees.put("id"+idGenere++, publicationLiee);
|
637 |
if (publicationLiee.get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
|
| Line 718... |
Line 638... |
| 718 |
Debug.log(">300> ETAT_AJOUTE, PublicationLiee = "+publicationLiee.toString());
|
638 |
publicationsAjoutees.put("id"+idGenere++, publicationLiee);
|
| 719 |
}
|
639 |
}
|
| 720 |
// Initialisation de la grille
|
640 |
// Initialisation de la grille
|
| 721 |
publicationLiee.set("_etat_", "");
|
641 |
publicationLiee.set("_etat_", "");
|
| 722 |
|
- |
|
| 723 |
}
|
- |
|
| 724 |
}
|
642 |
|
| Line 725... |
Line 643... |
| 725 |
grille.getStore().commitChanges();
|
643 |
}
|
| 726 |
}
|
- |
|
| 727 |
|
- |
|
| 728 |
Debug.log("|*** PersonneFormPublication.collecter() END");
|
- |
|
| 729 |
}
|
644 |
}
|
| 730 |
|
645 |
grille.getStore().commitChanges();
|
| 731 |
public List verifier() {
|
646 |
}
|
| 732 |
|
647 |
}
|
| 733 |
Debug.log("|> PersonneFormPublication.verifier()");
|
648 |
|
| Line 745... |
Line 660... |
| 745 |
return lstMessageErreur;
|
660 |
return lstMessageErreur;
|
| 746 |
}
|
661 |
}
|
| Line 747... |
Line 662... |
| 747 |
|
662 |
|
| Line 748... |
Line -... |
| 748 |
public void soumettre() {
|
- |
|
| 749 |
|
- |
|
| 750 |
Debug.log("<8-8> BEGIN PersonneFormPublication.soumettre()");
|
663 |
public void soumettre() {
|
| 751 |
|
664 |
|
| 752 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
665 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
| 753 |
if (publicationsAjoutees.size() == 0 && publicationsSupprimees.size() == 0) {
|
666 |
if (publicationsAjoutees.size() == 0 && publicationsSupprimees.size() == 0) {
|
| 754 |
InfoLogger.display("Modification des publications liées", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
|
- |
|
| 755 |
} else {
|
- |
|
| 756 |
|
667 |
InfoLogger.display("Modification des publications liées", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
|
| 757 |
Debug.log("<8-8> PersonneFormPublication.soumettre() : publicationsAjoutees.size()="+publicationsAjoutees.size());
|
668 |
} else {
|
| 758 |
// Ajout des relations PublicationAPersonne
|
669 |
// Ajout des relations PublicationAPersonne
|
| 759 |
if (publicationsAjoutees.size() != 0) {
|
- |
|
| 760 |
//TODO : utiliser le role d'une liste déroulante
|
- |
|
| 761 |
|
670 |
if (publicationsAjoutees.size() != 0) {
|
| 762 |
Debug.log("<8-8> PersonneFormPublication.soumettre() - Appel à mediateur.ajouterPublicationAPersonne()");
|
671 |
//TODO : utiliser le role d'une liste déroulante
|
| 763 |
mediateur.ajouterPublicationAPersonne(this, publicationsAjoutees, personneSelectionnee.getId(), null);
|
- |
|
| 764 |
}
|
- |
|
| 765 |
|
672 |
mediateur.ajouterPublicationAPersonne(this, publicationsAjoutees, personneSelectionnee.getId(), null);
|
| 766 |
Debug.log("<8-8> PersonneFormPublication.soumettre() : publicationsSupprimees.size()="+publicationsSupprimees.size());
|
673 |
}
|
| 767 |
// Suppression des relations PublicationAPersonne
|
- |
|
| 768 |
if (publicationsSupprimees.size() != 0) {
|
- |
|
| 769 |
|
674 |
// Suppression des relations PublicationAPersonne
|
| 770 |
Debug.log("<8-8> PersonneFormPublication.soumettre() - Appel à mediateur.supprimerPublicationAPersonne()");
|
675 |
if (publicationsSupprimees.size() != 0) {
|
| 771 |
mediateur.supprimerPublicationAPersonne(this, publicationsSupprimees);
|
676 |
mediateur.supprimerPublicationAPersonne(this, publicationsSupprimees);
|
| 772 |
}
|
677 |
}
|
| 773 |
}
|
- |
|
| 774 |
}
|
- |
|
| 775 |
|
678 |
}
|
| Line 776... |
Line 679... |
| 776 |
Debug.log("<8-8> END PersonneFormPublication.soumettre()");
|
679 |
}
|
| 777 |
}
|
680 |
}
|
| 778 |
|
681 |
|