| Line 436... |
Line 436... |
| 436 |
modelTypePersonnes.addField("cp_code_postal");
|
436 |
modelTypePersonnes.addField("cp_code_postal");
|
| 437 |
modelTypePersonnes.addField("cp_ville");
|
437 |
modelTypePersonnes.addField("cp_ville");
|
| 438 |
modelTypePersonnes.addField("cp_truk_courriel");
|
438 |
modelTypePersonnes.addField("cp_truk_courriel");
|
| Line 439... |
Line 439... |
| 439 |
|
439 |
|
| 440 |
String displayNamePersonnes = "cp_fmt_nom_complet";
|
440 |
String displayNamePersonnes = "cp_fmt_nom_complet";
|
| Line 441... |
Line 441... |
| 441 |
ProxyPersonnes<ModelData> proxyPersonnes = new ProxyPersonnes<ModelData>(sequenceur);
|
441 |
ProxyPersonnes<ModelData> proxyPersonnes = new ProxyPersonnes<ModelData>(null);
|
| Line 442... |
Line 442... |
| 442 |
|
442 |
|
| 443 |
personnesSaisiesComboBox = new ChampComboBoxRechercheTempsReelPaginable(proxyPersonnes, modelTypePersonnes, displayNamePersonnes);
|
443 |
personnesSaisiesComboBox = new ChampComboBoxRechercheTempsReelPaginable(proxyPersonnes, modelTypePersonnes, displayNamePersonnes);
|
| 444 |
|
444 |
|
| 445 |
personnesSaisiesComboBox.getCombo().addListener(Events.Select, new Listener<BaseEvent>() {
|
445 |
personnesSaisiesComboBox.getCombo().addListener(Events.Select, new Listener<BaseEvent>() {
|
| 446 |
public void handleEvent(BaseEvent be) {
|
446 |
public void handleEvent(BaseEvent be) {
|
| 447 |
if (personnesSaisiesComboBox.getValeur() instanceof ModelData) {
|
447 |
if (personnesSaisiesComboBox.getValeur() instanceof ModelData) {
|
| 448 |
// N'ajouter l'auteur que s'il n'est pas déjà présent dans la grille et dans les valeurs initiales
|
448 |
// N'ajouter l'auteur que s'il n'est pas déjà présent dans la grille et dans les valeurs initiales
|
| - |
|
449 |
Personne personneSaisieSelectionnee = new Personne(personnesSaisiesComboBox.getValeur());
|
| 449 |
Personne personneSaisieSelectionnee = new Personne(personnesSaisiesComboBox.getValeur());
|
450 |
PublicationAPersonne pap = new PublicationAPersonne();
|
| - |
|
451 |
pap.setPersonne(personneSaisieSelectionnee);
|
| - |
|
452 |
pap.setOrdreAuteurs(String.valueOf(grilleAuteurs.getStore().getCount()+1));
|
| - |
|
453 |
if (modeDeCreation != Formulaire.MODE_AJOUTER) {
|
| 450 |
PublicationAPersonne pap = new PublicationAPersonne();
|
454 |
pap.setPublicationLiee(publication);
|
| 451 |
pap.setPersonne(personneSaisieSelectionnee);
|
455 |
pap.setIdPublication(publicationId);
|
| 452 |
if (modeDeCreation != Formulaire.MODE_AJOUTER) pap.setPublicationLiee(publication);
|
456 |
}
|
| 453 |
if (grilleAuteurs.getStore().findModel(pap) != null) {
|
457 |
if (grilleAuteurs.getStore().findModel(pap) != null) {
|
| 454 |
Info.display("Information", "La personne est déjà présente dans la liste d'auteurs");
|
458 |
Info.display("Information", "La personne est déjà présente dans la liste d'auteurs");
|
| Line 460... |
Line 464... |
| 460 |
}
|
464 |
}
|
| 461 |
});
|
465 |
});
|
| 462 |
}
|
466 |
}
|
| Line 463... |
Line 467... |
| 463 |
|
467 |
|
| 464 |
private void ajouterDansGrille(PublicationAPersonne pap) {
|
468 |
private void ajouterDansGrille(PublicationAPersonne pap) {
|
| 465 |
ajouterDansGrille(pap, 0);
|
469 |
ajouterDansGrille(pap, grilleAuteurs.getStore().getCount());
|
| Line 466... |
Line 470... |
| 466 |
}
|
470 |
}
|
| 467 |
|
471 |
|
| 468 |
private void ajouterDansGrille(PublicationAPersonne pap, int index) {
|
472 |
private void ajouterDansGrille(PublicationAPersonne pap, int index) {
|
| Line 665... |
Line 669... |
| 665 |
modelTypeProjets.setTotalName("nbElements");
|
669 |
modelTypeProjets.setTotalName("nbElements");
|
| 666 |
modelTypeProjets.addField("cpr_nom");
|
670 |
modelTypeProjets.addField("cpr_nom");
|
| 667 |
modelTypeProjets.addField("cpr_id_projet");
|
671 |
modelTypeProjets.addField("cpr_id_projet");
|
| Line 668... |
Line 672... |
| 668 |
|
672 |
|
| 669 |
String displayNameProjets = "cpr_nom";
|
673 |
String displayNameProjets = "cpr_nom";
|
| Line 670... |
Line 674... |
| 670 |
ProxyProjets<ModelData> proxyProjets = new ProxyProjets<ModelData>(sequenceur);
|
674 |
ProxyProjets<ModelData> proxyProjets = new ProxyProjets<ModelData>(null);
|
| 671 |
|
675 |
|
| 672 |
projetsCombo = new ChampComboBoxRechercheTempsReelPaginable(proxyProjets, modelTypeProjets, displayNameProjets);
|
676 |
projetsCombo = new ChampComboBoxRechercheTempsReelPaginable(proxyProjets, modelTypeProjets, displayNameProjets);
|
| 673 |
projetsCombo.setWidth(200, 600);
|
677 |
projetsCombo.setWidth(200, 600);
|
| Line 727... |
Line 731... |
| 727 |
modelTypeStructures.setTotalName("nbElements");
|
731 |
modelTypeStructures.setTotalName("nbElements");
|
| 728 |
modelTypeStructures.addField("cs_nom");
|
732 |
modelTypeStructures.addField("cs_nom");
|
| 729 |
modelTypeStructures.addField("cs_id_structure");
|
733 |
modelTypeStructures.addField("cs_id_structure");
|
| Line 730... |
Line 734... |
| 730 |
|
734 |
|
| 731 |
String displayNameStructures = "cs_nom";
|
735 |
String displayNameStructures = "cs_nom";
|
| Line 732... |
Line 736... |
| 732 |
ProxyStructures<ModelData> proxyStructures = new ProxyStructures<ModelData>(sequenceur);
|
736 |
ProxyStructures<ModelData> proxyStructures = new ProxyStructures<ModelData>(null);
|
| 733 |
|
737 |
|
| 734 |
editeurCombobox = new ChampComboBoxRechercheTempsReelPaginable(proxyStructures, modelTypeStructures, displayNameStructures);
|
738 |
editeurCombobox = new ChampComboBoxRechercheTempsReelPaginable(proxyStructures, modelTypeStructures, displayNameStructures);
|
| 735 |
editeurCombobox.setWidth(200, 600);
|
739 |
editeurCombobox.setWidth(200, 600);
|
| Line 865... |
Line 869... |
| 865 |
}
|
869 |
}
|
| Line 866... |
Line 870... |
| 866 |
|
870 |
|
| 867 |
// - Envoyer au médiateur SSI personnes à modifier
|
871 |
// - Envoyer au médiateur SSI personnes à modifier
|
| 868 |
if (listeAuteursAModifier.size() > 0) {
|
872 |
if (listeAuteursAModifier.size() > 0) {
|
| 869 |
int seqId = sequenceur.lancerRequeteSynchrone(this);
|
873 |
int seqId = sequenceur.lancerRequeteSynchrone(this);
|
| 870 |
mediateur.modifierPublicationAPersonne(sequenceur, publication.getId(), listeAuteursAModifier, PublicationAPersonne.ROLE_AUTEUR, seqId);
|
874 |
mediateur.modifierPublicationAPersonne(sequenceur, this.publicationId, listeAuteursAModifier, PublicationAPersonne.ROLE_AUTEUR, seqId);
|
| Line 871... |
Line 875... |
| 871 |
}
|
875 |
}
|
| 872 |
|
876 |
|
| Line 1187... |
Line 1191... |
| 1187 |
soumettreAuteurs();
|
1191 |
soumettreAuteurs();
|
| 1188 |
} else if (info.getType().equals("ajout_publication")) {
|
1192 |
} else if (info.getType().equals("ajout_publication")) {
|
| 1189 |
if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String && ((String) info.getDonnee(0)).matches("[0-9]+")) {
|
1193 |
if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String && ((String) info.getDonnee(0)).matches("[0-9]+")) {
|
| 1190 |
String idPublication = (String) info.getDonnee(0);
|
1194 |
String idPublication = (String) info.getDonnee(0);
|
| 1191 |
this.publicationId = idPublication;
|
1195 |
this.publicationId = idPublication;
|
| - |
|
1196 |
this.publication.setId(idPublication);
|
| 1192 |
soumettreAuteurs();
|
1197 |
soumettreAuteurs();
|
| 1193 |
InfoLogger.display("Ajout d'une publication", "La publication '"+publicationId+"' a bien été ajoutée");
|
1198 |
InfoLogger.display("Ajout d'une publication", "La publication '"+publicationId+"' a bien été ajoutée");
|
| 1194 |
} else {
|
1199 |
} else {
|
| 1195 |
InfoLogger.display("Ajout d'une publication", info.toString());
|
1200 |
InfoLogger.display("Ajout d'une publication", info.toString());
|
| 1196 |
}
|
1201 |
}
|