| Line 9... |
Line 9... |
| 9 |
import org.tela_botanica.client.composants.InfoLogger;
|
9 |
import org.tela_botanica.client.composants.InfoLogger;
|
| 10 |
import org.tela_botanica.client.images.Images;
|
10 |
import org.tela_botanica.client.images.Images;
|
| 11 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
11 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
| 12 |
import org.tela_botanica.client.modeles.Information;
|
12 |
import org.tela_botanica.client.modeles.Information;
|
| 13 |
import org.tela_botanica.client.modeles.MenuApplicationId;
|
13 |
import org.tela_botanica.client.modeles.MenuApplicationId;
|
| 14 |
import org.tela_botanica.client.modeles.Valeur;
|
- |
|
| 15 |
import org.tela_botanica.client.modeles.aDonnee;
|
14 |
import org.tela_botanica.client.modeles.aDonnee;
|
| 16 |
import org.tela_botanica.client.modeles.personne.Personne;
|
15 |
import org.tela_botanica.client.modeles.personne.Personne;
|
| 17 |
import org.tela_botanica.client.modeles.personne.PersonneListe;
|
16 |
import org.tela_botanica.client.modeles.personne.PersonneListe;
|
| 18 |
import org.tela_botanica.client.modeles.projet.Projet;
|
17 |
import org.tela_botanica.client.modeles.projet.Projet;
|
| 19 |
import org.tela_botanica.client.modeles.projet.ProjetListe;
|
18 |
import org.tela_botanica.client.modeles.projet.ProjetListe;
|
| 20 |
import org.tela_botanica.client.modeles.publication.Publication;
|
19 |
import org.tela_botanica.client.modeles.publication.Publication;
|
| 21 |
import org.tela_botanica.client.modeles.publication.PublicationAPersonne;
|
20 |
import org.tela_botanica.client.modeles.publication.PublicationAPersonne;
|
| 22 |
import org.tela_botanica.client.modeles.publication.PublicationAPersonneListe;
|
21 |
import org.tela_botanica.client.modeles.publication.PublicationAPersonneListe;
|
| 23 |
import org.tela_botanica.client.modeles.structure.Structure;
|
22 |
import org.tela_botanica.client.modeles.structure.Structure;
|
| 24 |
import org.tela_botanica.client.modeles.structure.StructureListe;
|
23 |
import org.tela_botanica.client.modeles.structure.StructureListe;
|
| 25 |
import org.tela_botanica.client.util.Debug;
|
24 |
import org.tela_botanica.client.synchronisation.Sequenceur;
|
| 26 |
import org.tela_botanica.client.util.Pattern;
|
25 |
import org.tela_botanica.client.util.Pattern;
|
| 27 |
import org.tela_botanica.client.util.UtilArray;
|
26 |
import org.tela_botanica.client.util.UtilArray;
|
| 28 |
import org.tela_botanica.client.util.UtilString;
|
27 |
import org.tela_botanica.client.util.UtilString;
|
| 29 |
import org.tela_botanica.client.vues.FenetreForm;
|
28 |
import org.tela_botanica.client.vues.FenetreForm;
|
| 30 |
import org.tela_botanica.client.vues.Formulaire;
|
29 |
import org.tela_botanica.client.vues.Formulaire;
|
| 31 |
import org.tela_botanica.client.vues.FormulaireBarreValidation;
|
30 |
import org.tela_botanica.client.vues.FormulaireBarreValidation;
|
| 32 |
import org.tela_botanica.client.vues.personne.PersonneForm;
|
31 |
import org.tela_botanica.client.vues.personne.PersonneForm;
|
| Line 33... |
Line 32... |
| 33 |
|
32 |
|
| 34 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
33 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
| 35 |
import com.extjs.gxt.ui.client.Style.SortDir;
|
- |
|
| 36 |
import com.extjs.gxt.ui.client.core.XTemplate;
|
34 |
import com.extjs.gxt.ui.client.Style.SortDir;
|
| 37 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
35 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
| 38 |
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
36 |
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
| 39 |
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
37 |
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
| 40 |
import com.extjs.gxt.ui.client.event.Events;
|
38 |
import com.extjs.gxt.ui.client.event.Events;
|
| 41 |
import com.extjs.gxt.ui.client.event.KeyListener;
|
39 |
import com.extjs.gxt.ui.client.event.KeyListener;
|
| 42 |
import com.extjs.gxt.ui.client.event.Listener;
|
40 |
import com.extjs.gxt.ui.client.event.Listener;
|
| 43 |
import com.extjs.gxt.ui.client.event.SelectionListener;
|
41 |
import com.extjs.gxt.ui.client.event.SelectionListener;
|
| 44 |
import com.extjs.gxt.ui.client.store.ListStore;
|
42 |
import com.extjs.gxt.ui.client.store.ListStore;
|
| 45 |
import com.extjs.gxt.ui.client.store.Store;
|
43 |
import com.extjs.gxt.ui.client.store.Store;
|
| 46 |
import com.extjs.gxt.ui.client.store.StoreEvent;
|
- |
|
| 47 |
import com.extjs.gxt.ui.client.widget.HorizontalPanel;
|
44 |
import com.extjs.gxt.ui.client.store.StoreEvent;
|
| 48 |
import com.extjs.gxt.ui.client.widget.Info;
|
45 |
import com.extjs.gxt.ui.client.widget.Info;
|
| 49 |
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
46 |
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
| 50 |
import com.extjs.gxt.ui.client.widget.MessageBox;
|
47 |
import com.extjs.gxt.ui.client.widget.MessageBox;
|
| 51 |
import com.extjs.gxt.ui.client.widget.Text;
|
48 |
import com.extjs.gxt.ui.client.widget.Text;
|
| Line 56... |
Line 53... |
| 56 |
import com.extjs.gxt.ui.client.widget.form.FieldSet;
|
53 |
import com.extjs.gxt.ui.client.widget.form.FieldSet;
|
| 57 |
import com.extjs.gxt.ui.client.widget.form.FormPanel;
|
54 |
import com.extjs.gxt.ui.client.widget.form.FormPanel;
|
| 58 |
import com.extjs.gxt.ui.client.widget.form.TextField;
|
55 |
import com.extjs.gxt.ui.client.widget.form.TextField;
|
| 59 |
import com.extjs.gxt.ui.client.widget.form.Validator;
|
56 |
import com.extjs.gxt.ui.client.widget.form.Validator;
|
| 60 |
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
|
57 |
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
|
| 61 |
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
|
- |
|
| 62 |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
|
58 |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
|
| 63 |
import com.extjs.gxt.ui.client.widget.grid.ColumnData;
|
- |
|
| 64 |
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
|
59 |
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
|
| 65 |
import com.extjs.gxt.ui.client.widget.grid.EditorGrid;
|
60 |
import com.extjs.gxt.ui.client.widget.grid.EditorGrid;
|
| 66 |
import com.extjs.gxt.ui.client.widget.grid.Grid;
|
- |
|
| 67 |
import com.extjs.gxt.ui.client.widget.grid.GridCellRenderer;
|
- |
|
| 68 |
import com.extjs.gxt.ui.client.widget.grid.GridSelectionModel;
|
61 |
import com.extjs.gxt.ui.client.widget.grid.GridSelectionModel;
|
| 69 |
import com.extjs.gxt.ui.client.widget.grid.RowExpander;
|
- |
|
| 70 |
import com.extjs.gxt.ui.client.widget.grid.RowNumberer;
|
- |
|
| 71 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
62 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
| 72 |
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
|
63 |
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
|
| 73 |
import com.extjs.gxt.ui.client.widget.layout.FormData;
|
64 |
import com.extjs.gxt.ui.client.widget.layout.FormData;
|
| 74 |
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
|
65 |
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
|
| 75 |
import com.extjs.gxt.ui.client.widget.layout.RowData;
|
66 |
import com.extjs.gxt.ui.client.widget.layout.RowData;
|
| 76 |
import com.extjs.gxt.ui.client.widget.layout.RowLayout;
|
67 |
import com.extjs.gxt.ui.client.widget.layout.RowLayout;
|
| 77 |
import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
|
68 |
import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
|
| 78 |
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
69 |
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
| 79 |
import com.google.gwt.core.client.GWT;
|
70 |
import com.google.gwt.core.client.GWT;
|
| 80 |
import com.google.gwt.user.client.Window;
|
- |
|
| Line 81... |
Line 71... |
| 81 |
|
71 |
|
| Line -... |
Line 72... |
| - |
|
72 |
|
| - |
|
73 |
public class PublicationForm extends Formulaire implements Rafraichissable {
|
| 82 |
|
74 |
|
| - |
|
75 |
//Variables de classe:
|
| - |
|
76 |
// Relatives à la publication
|
| - |
|
77 |
private Publication publication;
|
| 83 |
public class PublicationForm extends Formulaire implements Rafraichissable {
|
78 |
|
| 84 |
|
- |
|
| 85 |
private Publication publication;
|
79 |
// Relatives aux auteurs
|
| 86 |
private PersonneListe auteursInitialListe = null;
|
80 |
private LayoutContainer auteursFieldset = null;
|
| Line 87... |
Line -... |
| 87 |
private static boolean publicationAPersonneListeChargementOk = false;
|
- |
|
| 88 |
private PersonneListe auteursAjoutes = null;
|
81 |
private PersonneListe auteursInitialListe = null;
|
| 89 |
private PersonneListe auteursSupprimes = null;
|
82 |
private PersonneListe auteursAjoutes = null;
|
| 90 |
|
83 |
private PersonneListe auteursSupprimes = null;
|
| 91 |
private LayoutContainer auteursFieldset = null;
|
- |
|
| Line 92... |
Line 84... |
| 92 |
private ComboBox<Projet> projetsCombo = null;
|
84 |
|
| 93 |
private ArrayList<ComboBox<Personne>> auteurComboboxListe = null;
|
85 |
private ComboBox<Projet> projetsCombo = null;
|
| 94 |
private ListStore<Personne> auteursStorePartage = null;
|
86 |
private ArrayList<ComboBox<Personne>> auteurComboboxListe = null;
|
| 95 |
private static boolean auteurStorePartageChargementOk = false;
|
87 |
private ListStore<Personne> auteursStorePartage = null;
|
| Line 96... |
Line 88... |
| 96 |
|
88 |
|
| 97 |
private FieldSet generalitesFieldset = null;
|
89 |
private FieldSet generalitesFieldset = null;
|
| 98 |
private TextField<String> titreChp = null;
|
- |
|
| 99 |
private TextField<String> collectionChp = null;
|
90 |
private TextField<String> titreChp = null;
|
| 100 |
private TextField<String> uriChp = null;
|
91 |
private TextField<String> collectionChp = null;
|
| 101 |
|
92 |
private TextField<String> uriChp = null;
|
| 102 |
private FieldSet editionFieldset = null;
|
93 |
|
| Line 103... |
Line -... |
| 103 |
private ComboBox<Structure> editeurCombobox = null;
|
- |
|
| 104 |
private static boolean editeursOk = false;
|
- |
|
| 105 |
private TextField<String> datePublicationChp = null;
|
- |
|
| 106 |
private TextField<String> tomeChp = null;
|
- |
|
| 107 |
private TextField<String> fasciculeChp = null;
|
- |
|
| 108 |
private TextField<String> pagesChp = null;
|
- |
|
| 109 |
|
- |
|
| 110 |
boolean auteursAffiches = false;
|
- |
|
| 111 |
private static boolean formulaireValideOk = false;
|
94 |
private FieldSet editionFieldset = null;
|
| Line 112... |
Line -... |
| 112 |
private static boolean publicationValideOk = false;
|
- |
|
| 113 |
private static boolean auteursValideOk = false;
|
95 |
private ComboBox<Structure> editeurCombobox = null;
|
| 114 |
private static boolean publicationOk = false;
|
96 |
private TextField<String> datePublicationChp = null;
|
| 115 |
private static boolean attenteAjoutAuteursOk = true;
|
- |
|
| 116 |
private static boolean attenteSuppressionAuteursOk = true;
|
- |
|
| 117 |
|
97 |
private TextField<String> tomeChp = null;
|
| 118 |
private LayoutContainer zoneHaut, zoneBas;
|
98 |
private TextField<String> fasciculeChp = null;
|
| 119 |
|
99 |
private TextField<String> pagesChp = null;
|
| 120 |
private static int idGenere = 1;
|
- |
|
| 121 |
private ToolBar barreOutils = null;
|
- |
|
| 122 |
private EditorGrid<Personne> grille;
|
100 |
|
| Line 123... |
Line 101... |
| 123 |
private PersonneListe personnesAjoutees = null;
|
101 |
private LayoutContainer zoneHaut, zoneBas;
|
| - |
|
102 |
|
| Line 124... |
Line 103... |
| 124 |
private PersonneListe personnesSupprimees = null;
|
103 |
private ToolBar barreOutils = null;
|
| 125 |
private ComboBox<Personne> personnesSaisiesComboBox = null;
|
104 |
private EditorGrid<Personne> grille;
|
| 126 |
private Button personnesBoutonSupprimer = null;
|
105 |
private ComboBox<Personne> personnesSaisiesComboBox = null;
|
| Line 139... |
Line 118... |
| 139 |
vueExterneARafraichirApresValidation = vueARafraichirApresValidation;
|
118 |
vueExterneARafraichirApresValidation = vueARafraichirApresValidation;
|
| 140 |
initialiserPublicationForm(mediateurCourrant, publicationId);
|
119 |
initialiserPublicationForm(mediateurCourrant, publicationId);
|
| 141 |
}
|
120 |
}
|
| Line 142... |
Line 121... |
| 142 |
|
121 |
|
| 143 |
private void initialiserPublicationForm(Mediateur mediateurCourrant, String publicationId) {
|
- |
|
| 144 |
|
122 |
private void initialiserPublicationForm(Mediateur mediateurCourrant, String publicationId) {
|
| 145 |
auteursInitialListe = new PersonneListe();
|
- |
|
| 146 |
initialiserValidation();
|
- |
|
| 147 |
initialiserAffichageAuteurs();
|
- |
|
| 148 |
|
123 |
sequenceur = new Sequenceur();
|
| 149 |
publication = new Publication();
|
124 |
publication = new Publication();
|
| - |
|
125 |
publication.setId(publicationId);
|
| - |
|
126 |
auteursInitialListe = new PersonneListe();
|
| Line 150... |
Line 127... |
| 150 |
publication.setId(publicationId);
|
127 |
initialiserAuteurs(); // Crée les listes d'auteurs ajoutés et supprimés
|
| 151 |
|
128 |
|
| 152 |
String modeDeCreation = (UtilString.isEmpty(publication.getId()) ? Formulaire.MODE_AJOUTER : Formulaire.MODE_MODIFIER);
|
129 |
String modeDeCreation = (UtilString.isEmpty(publicationId) ? Formulaire.MODE_AJOUTER : Formulaire.MODE_MODIFIER);
|
| 153 |
initialiserFormulaire(mediateurCourrant, modeDeCreation, MenuApplicationId.PUBLICATION);
|
130 |
initialiserFormulaire(mediateurCourrant, modeDeCreation, MenuApplicationId.PUBLICATION);
|
| - |
|
131 |
panneauFormulaire.setLayout(new RowLayout());
|
| 154 |
panneauFormulaire.setLayout(new RowLayout());
|
132 |
panneauFormulaire.setStyleAttribute("padding", "0");
|
| 155 |
panneauFormulaire.setStyleAttribute("padding", "0");
|
133 |
|
| 156 |
zoneHaut = new LayoutContainer(new FitLayout());
|
- |
|
| 157 |
zoneBas = new LayoutContainer(new FlowLayout());
|
134 |
zoneHaut = new LayoutContainer(new FitLayout());
|
| 158 |
|
135 |
zoneBas = new LayoutContainer(new FlowLayout());
|
| 159 |
panneauFormulaire.add(zoneHaut, new RowData(1, 0.3));
|
136 |
panneauFormulaire.add(zoneHaut, new RowData(1, 0.3));
|
| 160 |
panneauFormulaire.add(zoneBas, new RowData(1, 0.5));
|
137 |
panneauFormulaire.add(zoneBas, new RowData(1, 0.5));
|
| Line 169... |
Line 146... |
| 169 |
|
146 |
|
| 170 |
creerZoneEdition();
|
147 |
creerZoneEdition();
|
| Line 171... |
Line 148... |
| 171 |
zoneBas.add(editionFieldset);
|
148 |
zoneBas.add(editionFieldset);
|
| 172 |
|
149 |
|
| 173 |
if (modeDeCreation.equals(Formulaire.MODE_MODIFIER)) {
|
150 |
if (modeDeCreation.equals(Formulaire.MODE_MODIFIER)) {
|
| - |
|
151 |
mediateurCourrant.selectionnerPublication(this, publicationId, sequenceur);
|
| 174 |
mediateurCourrant.selectionnerPublication(this, publicationId);
|
152 |
mediateurCourrant.selectionnerPublicationAPersonne(this, publicationId, null, PublicationAPersonne.ROLE_AUTEUR, sequenceur);
|
| 175 |
mediateurCourrant.selectionnerPublicationAPersonne(this, publicationId, null, PublicationAPersonne.ROLE_AUTEUR);
|
153 |
sequenceur.empilerRafraichissement(this, new Information("chargement_modifier_ok"));
|
| Line 176... |
Line 154... |
| 176 |
}
|
154 |
}
|
| 177 |
}
|
155 |
}
|
| Line 480... |
Line 458... |
| 480 |
private void genererTitreFormulaire() {
|
458 |
private void genererTitreFormulaire() {
|
| 481 |
String titre = i18nC.publicationTitreFormAjout();
|
459 |
String titre = i18nC.publicationTitreFormAjout();
|
| 482 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
460 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
| 483 |
titre = i18nC.publicationTitreFormModif();
|
461 |
titre = i18nC.publicationTitreFormModif();
|
| 484 |
if (publication != null) {
|
462 |
if (publication != null) {
|
| 485 |
titre += " - "+i18nC.id()+": "+publication.getId()+" - "+publication.getObjetDeLaPublication();
|
463 |
titre += " - "+i18nC.id()+": "+publication.getId()+" - "+publication.getTitre();
|
| 486 |
}
|
464 |
}
|
| 487 |
}
|
465 |
}
|
| 488 |
panneauFormulaire.setHeading(titre);
|
466 |
panneauFormulaire.setHeading(titre);
|
| 489 |
}
|
467 |
}
|
| Line 505... |
Line 483... |
| 505 |
grille = creerGrille();
|
483 |
grille = creerGrille();
|
| 506 |
auteursFieldset.add(grille);
|
484 |
auteursFieldset.add(grille);
|
| 507 |
auteursFieldset.layout();
|
485 |
auteursFieldset.layout();
|
| 508 |
}
|
486 |
}
|
| Line 509... |
Line -... |
| 509 |
|
- |
|
| 510 |
public void creerChampAuteurEtBoutonSupprimer(Personne auteur) {
|
- |
|
| 511 |
/*final HorizontalPanel panneauHorizontal = new HorizontalPanel();
|
- |
|
| 512 |
|
- |
|
| 513 |
LayoutContainer panneauChampTxt = new LayoutContainer();
|
- |
|
| 514 |
panneauChampTxt.setLayout(new FormLayout());
|
- |
|
| 515 |
|
- |
|
| 516 |
final ComboBox<Personne> auteursSaisisComboBox = creerComboBoxAuteursSaisis();
|
- |
|
| 517 |
if (auteur != null) {
|
- |
|
| 518 |
auteursSaisisComboBox.setValue(auteur);
|
- |
|
| 519 |
auteursSaisisComboBox.validate();
|
- |
|
| 520 |
}
|
- |
|
| 521 |
auteurComboboxListe.add(auteursSaisisComboBox);
|
- |
|
| 522 |
auteursSaisisComboBox.setFieldLabel(i18nC.publicationAuteurSingulier()+" "+auteurComboboxListe.size());
|
- |
|
| 523 |
panneauChampTxt.add(auteursSaisisComboBox, new FormData(300, 0));
|
- |
|
| 524 |
panneauHorizontal.add(panneauChampTxt);
|
- |
|
| 525 |
|
- |
|
| 526 |
Button supprimerAuteurBouton = new Button();
|
- |
|
| 527 |
supprimerAuteurBouton.setIcon(Images.ICONES.supprimer());
|
- |
|
| 528 |
supprimerAuteurBouton.setToolTip(i18nC.supprimer());
|
- |
|
| 529 |
supprimerAuteurBouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
- |
|
| 530 |
@Override
|
- |
|
| 531 |
public void componentSelected(ButtonEvent be) {
|
- |
|
| 532 |
auteurComboboxListe.remove(auteursSaisisComboBox);
|
- |
|
| 533 |
conteneurChamps.remove(panneauHorizontal);
|
- |
|
| 534 |
|
- |
|
| 535 |
int numeroAuteurs = 1;
|
- |
|
| 536 |
for (Iterator<ComboBox<Personne>> it = auteurComboboxListe.iterator(); it.hasNext();) {
|
- |
|
| 537 |
it.next().setFieldLabel(i18nC.publicationAuteurSingulier()+" "+numeroAuteurs);
|
- |
|
| 538 |
numeroAuteurs++;
|
- |
|
| 539 |
}
|
- |
|
| 540 |
|
- |
|
| 541 |
auteursFieldset.layout();
|
- |
|
| 542 |
}
|
- |
|
| 543 |
});
|
- |
|
| 544 |
panneauHorizontal.add(supprimerAuteurBouton);
|
- |
|
| 545 |
|
- |
|
| 546 |
conteneurChamps.add(panneauHorizontal);
|
- |
|
| 547 |
auteursFieldset.layout();*/
|
- |
|
| 548 |
}
|
- |
|
| 549 |
|
487 |
|
| 550 |
private ComboBox<Personne> creerComboBoxAuteursSaisis() {
|
488 |
private ComboBox<Personne> creerComboBoxAuteursSaisis() {
|
| 551 |
ListStore<Personne> auteursStore = new ListStore<Personne>();
|
489 |
ListStore<Personne> auteursStore = new ListStore<Personne>();
|
| Line 552... |
Line 490... |
| 552 |
auteursStore.add(auteursStorePartage.getModels());
|
490 |
auteursStore.add(auteursStorePartage.getModels());
|
| Line 598... |
Line 536... |
| 598 |
projetsCombo.setTriggerAction(TriggerAction.ALL);
|
536 |
projetsCombo.setTriggerAction(TriggerAction.ALL);
|
| 599 |
projetsCombo.setStore(new ListStore<Projet>());
|
537 |
projetsCombo.setStore(new ListStore<Projet>());
|
| 600 |
projetsCombo.addStyleName(ComposantClass.OBLIGATOIRE);
|
538 |
projetsCombo.addStyleName(ComposantClass.OBLIGATOIRE);
|
| 601 |
projetsCombo.addListener(Events.Valid, Formulaire.creerEcouteurChampObligatoire());
|
539 |
projetsCombo.addListener(Events.Valid, Formulaire.creerEcouteurChampObligatoire());
|
| 602 |
generalitesFieldset.add(projetsCombo, new FormData(450, 0));
|
540 |
generalitesFieldset.add(projetsCombo, new FormData(450, 0));
|
| 603 |
mediateur.selectionnerProjet(this, null);
|
541 |
mediateur.selectionnerProjet(this, null, null);
|
| Line 604... |
Line 542... |
| 604 |
|
542 |
|
| 605 |
titreChp = new TextField<String>();
|
543 |
titreChp = new TextField<String>();
|
| 606 |
titreChp.setName("cpu");
|
544 |
titreChp.setName("cpu");
|
| 607 |
titreChp.setFieldLabel("Titre de l'article ou de l'ouvrage");
|
545 |
titreChp.setFieldLabel("Titre de l'article ou de l'ouvrage");
|
| Line 662... |
Line 600... |
| 662 |
}
|
600 |
}
|
| Line 663... |
Line 601... |
| 663 |
|
601 |
|
| 664 |
public void rafraichir(Object nouvellesDonnees) {
|
602 |
public void rafraichir(Object nouvellesDonnees) {
|
| 665 |
if (nouvellesDonnees instanceof Publication) {
|
603 |
if (nouvellesDonnees instanceof Publication) {
|
| - |
|
604 |
// Si on a reçu les details d'une publication
|
| 666 |
// Si on a reçu les details d'une publication
|
605 |
publication = (Publication) nouvellesDonnees;
|
| 667 |
rafraichirPublication((Publication) nouvellesDonnees);
|
606 |
//rafraichirPublication((Publication) nouvellesDonnees);
|
| 668 |
} else if (nouvellesDonnees instanceof StructureListe) {
|
607 |
} else if (nouvellesDonnees instanceof StructureListe) {
|
| 669 |
// Si on a reçu une liste des editeurs
|
608 |
// Si on a reçu une liste des editeurs
|
| 670 |
rafraichirListeEditeurs((StructureListe) nouvellesDonnees);
|
609 |
rafraichirListeEditeurs((StructureListe) nouvellesDonnees);
|
| 671 |
} else if (nouvellesDonnees instanceof PublicationAPersonneListe) {
|
610 |
} else if (nouvellesDonnees instanceof PublicationAPersonneListe) {
|
| Line 677... |
Line 616... |
| 677 |
Formulaire.rafraichirComboBox(projets, projetsCombo);
|
616 |
Formulaire.rafraichirComboBox(projets, projetsCombo);
|
| 678 |
setValeurComboProjets();
|
617 |
setValeurComboProjets();
|
| 679 |
} else {
|
618 |
} else {
|
| 680 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
619 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
| 681 |
}
|
620 |
}
|
| 682 |
|
- |
|
| 683 |
synchronisation();
|
- |
|
| 684 |
}
|
621 |
}
|
| Line 685... |
Line 622... |
| 685 |
|
622 |
|
| 686 |
private void synchronisation() {
|
- |
|
| 687 |
// Respecter l'ordre et faire attention à la réinitialisation des jetons
|
- |
|
| 688 |
// 1. gestion des auteurs (Modif ou Ajout)
|
- |
|
| 689 |
// 2. peupler le formulaire (Modif)
|
- |
|
| 690 |
// 3. initialisation de la gestion des auteurs ajoutés/supprimés (Modif)
|
- |
|
| 691 |
// 4. valider le formulaire (Modif ou Ajout)
|
- |
|
| 692 |
|
- |
|
| 693 |
if (etrePretAAfficherAuteurs()) {
|
- |
|
| 694 |
afficherAuteurs();
|
- |
|
| 695 |
initialiserAffichageAuteurs();
|
- |
|
| Line 696... |
Line -... |
| 696 |
}
|
- |
|
| 697 |
|
- |
|
| 698 |
if (etrePretAPeupler()) {
|
- |
|
| 699 |
peuplerFormulaire();
|
- |
|
| 700 |
genererTitreFormulaire();
|
- |
|
| 701 |
initialiserPeupler();
|
- |
|
| 702 |
}
|
- |
|
| 703 |
|
- |
|
| 704 |
if (avoirAuteursMiseAJourCorrectement()) {
|
- |
|
| 705 |
miseAJourAuteursInitialListe();
|
- |
|
| 706 |
initialiserAuteurs();
|
- |
|
| 707 |
auteursValideOk = true;
|
- |
|
| 708 |
}
|
- |
|
| 709 |
|
- |
|
| 710 |
if (etreValide()) {
|
- |
|
| 711 |
initialiserValidation();
|
- |
|
| 712 |
repandreRafraichissement();
|
- |
|
| 713 |
controlerFermeture();
|
623 |
private void synchronisation() {
|
| Line 714... |
Line 624... |
| 714 |
}
|
624 |
|
| 715 |
}
|
625 |
}
|
| 716 |
|
626 |
|
| Line 726... |
Line 636... |
| 726 |
Personne auteurSupprime = auteursSupprimes.get(clesSupprimees.next());
|
636 |
Personne auteurSupprime = auteursSupprimes.get(clesSupprimees.next());
|
| 727 |
auteursInitialListe.remove(auteurSupprime.getId());
|
637 |
auteursInitialListe.remove(auteurSupprime.getId());
|
| 728 |
}
|
638 |
}
|
| 729 |
}
|
639 |
}
|
| Line 730... |
Line -... |
| 730 |
|
- |
|
| 731 |
private void rafraichirPublication(Publication publi) {
|
- |
|
| 732 |
publicationOk = true;
|
- |
|
| 733 |
publication = publi;
|
- |
|
| 734 |
}
|
- |
|
| 735 |
|
640 |
|
| 736 |
private void rafraichirListeEditeurs(StructureListe editeurs) {
|
- |
|
| 737 |
editeursOk = true;
|
641 |
private void rafraichirListeEditeurs(StructureListe editeurs) {
|
| 738 |
editeurCombobox.getStore().removeAll();
|
642 |
editeurCombobox.getStore().removeAll();
|
| 739 |
editeurCombobox.getStore().add((List<Structure>) editeurs.toList());
|
643 |
editeurCombobox.getStore().add((List<Structure>) editeurs.toList());
|
| Line 740... |
Line 644... |
| 740 |
}
|
644 |
}
|
| Line 746... |
Line 650... |
| 746 |
auteursInitialListe.put(auteur.getId(), auteur);
|
650 |
auteursInitialListe.put(auteur.getId(), auteur);
|
| 747 |
}
|
651 |
}
|
| Line 748... |
Line 652... |
| 748 |
|
652 |
|
| 749 |
grille.getStore().removeAll();
|
653 |
grille.getStore().removeAll();
|
| 750 |
grille.getStore().add(auteursInitialListe.toList());
|
- |
|
| 751 |
|
654 |
grille.getStore().add(auteursInitialListe.toList());
|
| 752 |
publicationAPersonneListeChargementOk = true;
|
655 |
layout();
|
| Line 753... |
Line 656... |
| 753 |
}
|
656 |
}
|
| 754 |
|
657 |
|
| 755 |
private void rafraichirInformation(Information info) {
|
658 |
private void rafraichirInformation(Information info) {
|
| 756 |
String type = info.getType();
|
- |
|
| 757 |
if (type.equals("ajout_publication") || type.equals("modif_publication")) {
|
659 |
String type = info.getType();
|
| 758 |
// On vient de soumettre le formulaire, on doit passer à l'étape suivante:
|
- |
|
| 759 |
// Validation des auteurs ou fermeture du formulaire
|
- |
|
| 760 |
publicationValideOk = true;
|
- |
|
| 761 |
if (mode.equals(Formulaire.MODE_AJOUTER)) {
|
- |
|
| 762 |
if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
|
- |
|
| 763 |
String publicationId = (String) info.getDonnee(0);
|
- |
|
| 764 |
if (publicationId.matches("[0-9]+")) {
|
- |
|
| 765 |
publication.setId(publicationId);
|
- |
|
| 766 |
}
|
- |
|
| 767 |
}
|
- |
|
| 768 |
attenteAjoutAuteursOk = true;
|
660 |
if (type.equals("publication_enregistree")) {
|
| - |
|
661 |
// la publication vien d'etre enregistrée, on soumet les auteurs
|
| - |
|
662 |
soumettreAuteurs();
|
| - |
|
663 |
//System.out.println("pub enregistrée");
|
| - |
|
664 |
} else if (type.equals("auteurs_enregistres")) {
|
| - |
|
665 |
miseAJourAuteursInitialListe();
|
| - |
|
666 |
initialiserAuteurs();
|
| - |
|
667 |
repandreRafraichissement();
|
| - |
|
668 |
controlerFermeture();
|
| - |
|
669 |
} else if (type.equals("chargement_modifier_ok")) {
|
| 769 |
}
|
670 |
peuplerFormulaire();
|
| Line 770... |
Line -... |
| 770 |
soumettreAuteurs();
|
- |
|
| 771 |
}
|
671 |
genererTitreFormulaire();
|
| 772 |
|
672 |
}
|
| 773 |
|
- |
|
| 774 |
if (info.getType().equals("liste_personne")) {
|
- |
|
| 775 |
PersonneListe listePersonneAuteur = (PersonneListe) info.getDonnee(0);
|
- |
|
| 776 |
|
- |
|
| 777 |
/*List<Personne> liste = listePersonneAuteur.toList();
|
- |
|
| 778 |
auteursStorePartage.removeAll();
|
- |
|
| 779 |
auteursStorePartage.add(liste);
|
673 |
|
| 780 |
auteurStorePartageChargementOk = true;*/
|
674 |
if (info.getType().equals("liste_personne")) {
|
| 781 |
|
675 |
PersonneListe listePersonneAuteur = (PersonneListe) info.getDonnee(0);
|
| Line 782... |
Line -... |
| 782 |
ListStore store = personnesSaisiesComboBox.getStore();
|
- |
|
| 783 |
store.removeAll();
|
- |
|
| 784 |
store.add(listePersonneAuteur.toList());
|
- |
|
| 785 |
|
- |
|
| 786 |
} else if (info.getType().equals("ajout_publication_a_personne")) {
|
676 |
ListStore store = personnesSaisiesComboBox.getStore();
|
| 787 |
attenteAjoutAuteursOk = false;
|
677 |
store.removeAll();
|
| 788 |
} else if (info.getType().equals("suppression_publication_a_personne")) {
|
678 |
store.add(listePersonneAuteur.toList());
|
| 789 |
attenteSuppressionAuteursOk = false;
|
679 |
|
| 790 |
} else if (info.getType().equals("modif_publication")) {
|
680 |
} else if (info.getType().equals("modif_publication")) {
|
| Line 797... |
Line 687... |
| 797 |
InfoLogger.display("Ajout d'une publication", info.toString());
|
687 |
InfoLogger.display("Ajout d'une publication", info.toString());
|
| 798 |
}
|
688 |
}
|
| 799 |
}
|
689 |
}
|
| 800 |
}
|
690 |
}
|
| Line 801... |
Line -... |
| 801 |
|
- |
|
| 802 |
private boolean avoirAuteursMiseAJourCorrectement() {
|
- |
|
| 803 |
|
- |
|
| 804 |
boolean ok = false;
|
- |
|
| 805 |
if (attenteAjoutAuteursOk == false && attenteSuppressionAuteursOk == false) {
|
- |
|
| 806 |
ok = true;
|
- |
|
| 807 |
}
|
- |
|
| 808 |
return ok;
|
- |
|
| 809 |
}
|
- |
|
| 810 |
|
- |
|
| 811 |
private void afficherAuteurs() {
|
- |
|
| 812 |
if (mode.equals(Formulaire.MODE_AJOUTER)) {
|
- |
|
| 813 |
creerChampAuteurEtBoutonSupprimer(null);
|
- |
|
| 814 |
} else if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
- |
|
| 815 |
Iterator<String> itap = auteursInitialListe.keySet().iterator();
|
- |
|
| 816 |
while (itap.hasNext()) {
|
- |
|
| 817 |
creerChampAuteurEtBoutonSupprimer(auteursInitialListe.get(itap.next()));
|
- |
|
| 818 |
}
|
- |
|
| 819 |
}
|
- |
|
| 820 |
auteursAffiches = true;
|
- |
|
| 821 |
}
|
- |
|
| 822 |
|
- |
|
| 823 |
private void initialiserAffichageAuteurs() {
|
- |
|
| 824 |
auteurStorePartageChargementOk = false;
|
- |
|
| 825 |
publicationAPersonneListeChargementOk = false;
|
- |
|
| 826 |
}
|
- |
|
| 827 |
|
- |
|
| 828 |
private void initialiserPeupler() {
|
- |
|
| 829 |
publicationOk = false;
|
- |
|
| 830 |
editeursOk = false;
|
- |
|
| 831 |
auteursAffiches = false;
|
- |
|
| 832 |
}
|
- |
|
| 833 |
|
- |
|
| 834 |
private boolean etrePretAAfficherAuteurs() {
|
- |
|
| 835 |
boolean ok = false;
|
- |
|
| 836 |
if (auteurStorePartageChargementOk
|
- |
|
| 837 |
&& ((mode.equals(Formulaire.MODE_MODIFIER) && publicationOk && publicationAPersonneListeChargementOk)
|
- |
|
| 838 |
|| (mode.equals(Formulaire.MODE_AJOUTER)))) {
|
- |
|
| 839 |
ok = true;
|
- |
|
| 840 |
}
|
- |
|
| 841 |
return ok;
|
- |
|
| 842 |
}
|
- |
|
| 843 |
|
- |
|
| 844 |
private boolean etrePretAPeupler() {
|
- |
|
| 845 |
boolean ok = false;
|
- |
|
| 846 |
if (mode.equals(Formulaire.MODE_MODIFIER) && publicationOk && editeursOk) {
|
- |
|
| 847 |
ok = true;
|
- |
|
| 848 |
}
|
- |
|
| 849 |
return ok;
|
- |
|
| 850 |
}
|
- |
|
| 851 |
|
- |
|
| 852 |
private Boolean etreValide() {
|
- |
|
| 853 |
Boolean valide = false;
|
- |
|
| 854 |
if (formulaireValideOk && auteursValideOk) {
|
- |
|
| 855 |
valide = true;
|
- |
|
| 856 |
}
|
- |
|
| 857 |
return valide;
|
- |
|
| 858 |
}
|
- |
|
| 859 |
|
- |
|
| 860 |
private void initialiserValidation() {
|
- |
|
| 861 |
formulaireValideOk = false;
|
- |
|
| 862 |
publicationValideOk = false;
|
- |
|
| 863 |
initialiserAuteurs();
|
- |
|
| 864 |
auteursValideOk = false;
|
- |
|
| Line 865... |
Line 691... |
| 865 |
}
|
691 |
|
| 866 |
|
- |
|
| 867 |
private void initialiserAuteurs() {
|
692 |
|
| 868 |
attenteAjoutAuteursOk = true;
|
- |
|
| 869 |
auteursAjoutes = new PersonneListe();
|
693 |
private void initialiserAuteurs() {
|
| 870 |
attenteSuppressionAuteursOk = true;
|
694 |
auteursAjoutes = new PersonneListe();
|
| Line 871... |
Line 695... |
| 871 |
auteursSupprimes = new PersonneListe();
|
695 |
auteursSupprimes = new PersonneListe();
|
| 872 |
}
|
696 |
}
|
| Line 882... |
Line 706... |
| 882 |
vueExterneARafraichirApresValidation.rafraichir(info);
|
706 |
vueExterneARafraichirApresValidation.rafraichir(info);
|
| 883 |
}
|
707 |
}
|
| 884 |
}
|
708 |
}
|
| Line 885... |
Line 709... |
| 885 |
|
709 |
|
| 886 |
public boolean soumettreFormulaire() {
|
710 |
public boolean soumettreFormulaire() {
|
| 887 |
formulaireValideOk = verifierFormulaire();
|
711 |
boolean formulaireValideOk = verifierFormulaire();
|
| 888 |
if (formulaireValideOk) {
|
712 |
if (formulaireValideOk) {
|
| 889 |
soumettrePublication();
|
- |
|
| 890 |
//Les auteurs seront mis à jour lors du rafraichissement
|
713 |
soumettrePublication();
|
| - |
|
714 |
}
|
| - |
|
715 |
|
| 891 |
}
|
716 |
|
| 892 |
return formulaireValideOk;
|
717 |
return formulaireValideOk;
|
| 893 |
}
|
718 |
}
|
| 894 |
|
719 |
|
| 895 |
private void soumettrePublication() {
|
720 |
private void soumettrePublication() {
|
| 896 |
Publication publicationCollectee = collecterPublication();
|
721 |
Publication publicationCollectee = collecterPublication();
|
| - |
|
722 |
if (publicationCollectee != null) {
|
| - |
|
723 |
|
| - |
|
724 |
// Pour l'enregistrement des collections, on utilise le séquenceur
|
| - |
|
725 |
// Il doit attendre le retour de l'enregistrement pour poursuivre
|
| - |
|
726 |
sequenceur = new Sequenceur();
|
| 897 |
if (publicationCollectee != null) {
|
727 |
int seqId = sequenceur.lancerRequeteSynchrone(this);
|
| 898 |
if (mode.equals(Formulaire.MODE_AJOUTER)) {
|
728 |
if (mode.equals(Formulaire.MODE_AJOUTER)) {
|
| 899 |
mediateur.ajouterPublication(this, publicationCollectee);
|
729 |
mediateur.ajouterPublication(sequenceur, publicationCollectee, seqId);
|
| 900 |
} else if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
730 |
} else if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
| 901 |
mediateur.modifierPublication(this, publicationCollectee);
|
731 |
mediateur.modifierPublication(sequenceur, publicationCollectee, seqId);
|
| - |
|
732 |
}
|
| 902 |
}
|
733 |
sequenceur.empilerRafraichissement(this, new Information("publication_enregistree"));
|
| 903 |
}
|
734 |
}
|
| Line 904... |
Line 735... |
| 904 |
}
|
735 |
}
|
| - |
|
736 |
|
| 905 |
|
737 |
private void soumettreAuteurs() {
|
| 906 |
private void soumettreAuteurs() {
|
738 |
|
| Line 907... |
Line 739... |
| 907 |
attenteAjoutAuteursOk = false;
|
739 |
//attenteAjoutAuteursOk = false;
|
| 908 |
attenteSuppressionAuteursOk = false;
|
740 |
//attenteSuppressionAuteursOk = false;
|
| 909 |
|
741 |
|
| 910 |
//1) Auteurs ajoutés :
|
742 |
//1) Auteurs ajoutés :
|
| Line 919... |
Line 751... |
| 919 |
listeDesAuteurs.put(cle, publiAPersonne);
|
751 |
listeDesAuteurs.put(cle, publiAPersonne);
|
| 920 |
}
|
752 |
}
|
| Line 921... |
Line 753... |
| 921 |
|
753 |
|
| 922 |
// - envoyer au mediateur SSI personnes à ajouter
|
754 |
// - envoyer au mediateur SSI personnes à ajouter
|
| - |
|
755 |
if (listeDesAuteurs.size() > 0) {
|
| 923 |
if (listeDesAuteurs.size() > 0) {
|
756 |
int seqId = sequenceur.lancerRequeteSynchrone(this);
|
| 924 |
mediateur.ajouterPublicationAPersonne(this, publication.getId(), listeDesAuteurs, PublicationAPersonne.ROLE_AUTEUR);
|
757 |
mediateur.ajouterPublicationAPersonne(sequenceur, publication.getId(), listeDesAuteurs, PublicationAPersonne.ROLE_AUTEUR, seqId);
|
| 925 |
attenteAjoutAuteursOk = true;
|
758 |
//attenteAjoutAuteursOk = true;
|
| Line 926... |
Line 759... |
| 926 |
}
|
759 |
}
|
| 927 |
|
760 |
|
| 928 |
//2) Auteurs supprimés :
|
761 |
//2) Auteurs supprimés :
|
| Line 937... |
Line 770... |
| 937 |
listeDesAuteurs.put(cle, publiAPersonne);
|
770 |
listeDesAuteurs.put(cle, publiAPersonne);
|
| 938 |
}
|
771 |
}
|
| Line 939... |
Line 772... |
| 939 |
|
772 |
|
| 940 |
// - Envoyer au médiateur SSI personnes à supprimer
|
773 |
// - Envoyer au médiateur SSI personnes à supprimer
|
| - |
|
774 |
if (listeDesAuteurs.size() > 0) {
|
| 941 |
if (listeDesAuteurs.size() > 0) {
|
775 |
// Pour une suppression des auteurs, on a pas besoin d'attendre le retour
|
| 942 |
mediateur.supprimerPublicationAPersonne(this, listeDesAuteurs);
|
776 |
mediateur.supprimerPublicationAPersonne(this, listeDesAuteurs);
|
| 943 |
attenteSuppressionAuteursOk = true;
|
- |
|
| 944 |
}
|
- |
|
| 945 |
|
- |
|
| 946 |
/*
|
- |
|
| 947 |
attenteAjoutAuteursOk = false;
|
- |
|
| 948 |
attenteSuppressionAuteursOk = false;
|
- |
|
| 949 |
|
- |
|
| 950 |
PersonneListe personnesInitiales = auteursInitialListe;
|
- |
|
| 951 |
|
- |
|
| 952 |
PersonneListe personnesActuelles = new PersonneListe();
|
- |
|
| 953 |
if (auteurComboboxListe != null) {
|
- |
|
| 954 |
Iterator<ComboBox<Personne>> itcp = auteurComboboxListe.iterator();
|
- |
|
| 955 |
while (itcp.hasNext()) {
|
- |
|
| 956 |
ComboBox<Personne> combobox = itcp.next();
|
- |
|
| 957 |
Personne personne = combobox.getValue();
|
- |
|
| 958 |
if (personne != null) {
|
- |
|
| 959 |
personnesActuelles.put(personne.getId(), personne);
|
- |
|
| 960 |
} else {
|
- |
|
| 961 |
Debug.log("Etre valide :"+combobox.isValid()+" - "+combobox.getRawValue());
|
- |
|
| 962 |
}
|
- |
|
| 963 |
}
|
777 |
//attenteSuppressionAuteursOk = true;
|
| Line 964... |
Line -... |
| 964 |
}
|
- |
|
| 965 |
|
- |
|
| 966 |
// Auteurs ajoutés
|
- |
|
| 967 |
Iterator<String> clesActuelles = personnesActuelles.keySet().iterator();
|
- |
|
| 968 |
while (clesActuelles.hasNext()) {
|
- |
|
| 969 |
String idActuel = clesActuelles.next();
|
- |
|
| 970 |
if (personnesInitiales.size() == 0 || personnesInitiales.get(idActuel) == null) {
|
- |
|
| 971 |
Personne personne = personnesActuelles.get(idActuel);
|
- |
|
| 972 |
PublicationAPersonne publicationAAuteur = new PublicationAPersonne();
|
- |
|
| 973 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
- |
|
| 974 |
publicationAAuteur.setIdPublication(publication.getId());
|
- |
|
| 975 |
}
|
- |
|
| 976 |
publicationAAuteur.setPersonne(personne);
|
- |
|
| 977 |
publicationAAuteur.setIdRole(PublicationAPersonne.ROLE_AUTEUR);
|
- |
|
| 978 |
//FIXME : auteursAjoutes.put(publicationAAuteur.getId(), publicationAAuteur);
|
- |
|
| 979 |
attenteAjoutAuteursOk = true;
|
- |
|
| 980 |
}
|
- |
|
| 981 |
}
|
- |
|
| 982 |
|
- |
|
| 983 |
// Auteurs supprimés
|
- |
|
| 984 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
- |
|
| 985 |
Iterator<String> clesInitiales = personnesInitiales.keySet().iterator();
|
- |
|
| 986 |
while (clesInitiales.hasNext()) {
|
- |
|
| 987 |
String idInitial = clesInitiales.next();
|
- |
|
| 988 |
if (personnesActuelles.size() == 0 || personnesActuelles.get(idInitial) == null) {
|
- |
|
| 989 |
Personne personne = personnesInitiales.get(idInitial);
|
- |
|
| 990 |
PublicationAPersonne publicationAAuteur = new PublicationAPersonne();
|
- |
|
| 991 |
publicationAAuteur.setIdPublication(publication.getId());
|
- |
|
| 992 |
publicationAAuteur.setPersonne(personne);
|
- |
|
| 993 |
publicationAAuteur.setIdRole(PublicationAPersonne.ROLE_AUTEUR);
|
- |
|
| 994 |
//FIXME : auteursSupprimes.put(publicationAAuteur.getId(), publicationAAuteur);
|
- |
|
| 995 |
attenteSuppressionAuteursOk = true;
|
- |
|
| 996 |
}
|
- |
|
| 997 |
}
|
- |
|
| 998 |
}
|
- |
|
| 999 |
|
- |
|
| 1000 |
// Execution de les mise à jour pour le mode MODIFICATION
|
- |
|
| 1001 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
- |
|
| 1002 |
if (auteursAjoutes != null && auteursAjoutes.size() != 0) {
|
- |
|
| 1003 |
//FIXME : mediateur.ajouterPublicationAPersonne(this, publication.getId(), auteursAjoutes, PublicationAPersonne.ROLE_AUTEUR);
|
- |
|
| 1004 |
}
|
- |
|
| 1005 |
|
778 |
}
|
| 1006 |
if (auteursSupprimes != null && auteursSupprimes.size() != 0) {
|
- |
|
| 1007 |
//FIXME : mediateur.supprimerPublicationAPersonne(this, auteursSupprimes);
|
- |
|
| 1008 |
}
|
779 |
|
| Line 1009... |
Line 780... |
| 1009 |
}*/
|
780 |
sequenceur.empilerRafraichissement(this, new Information("auteurs_enregistres"));
|
| 1010 |
}
|
781 |
}
|
| 1011 |
|
782 |
|
| Line 1138... |
Line 909... |
| 1138 |
intituleAuteur += personneCourante.getNom().toUpperCase() + " " + personneCourante.getPrenom();
|
909 |
intituleAuteur += personneCourante.getNom().toUpperCase() + " " + personneCourante.getPrenom();
|
| 1139 |
if (itAuteurs.hasNext()) {
|
910 |
if (itAuteurs.hasNext()) {
|
| 1140 |
intituleAuteur+=", ";
|
911 |
intituleAuteur+=", ";
|
| 1141 |
}
|
912 |
}
|
| 1142 |
}
|
913 |
}
|
| 1143 |
/*
|
- |
|
| 1144 |
* TO DELETE:int auteursNombre = auteurComboboxListe.size();
|
- |
|
| 1145 |
*
|
- |
|
| 1146 |
for (int i = 0; i < auteursNombre; i++) {
|
- |
|
| 1147 |
if (auteurComboboxListe.get(i).getValue() != null) {
|
- |
|
| 1148 |
Personne auteur = auteurComboboxListe.get(i).getValue();
|
- |
|
| 1149 |
inituleAuteur += auteur.getNom().toUpperCase()+ " "+auteur.getPrenom();
|
- |
|
| 1150 |
if (i != (auteursNombre - 1)) {
|
- |
|
| 1151 |
inituleAuteur += ", ";
|
- |
|
| 1152 |
}
|
- |
|
| 1153 |
}
|
- |
|
| 1154 |
}*/
|
- |
|
| 1155 |
return intituleAuteur;
|
914 |
return intituleAuteur;
|
| 1156 |
}
|
915 |
}
|
| Line 1157... |
Line 916... |
| 1157 |
|
916 |
|
| 1158 |
private String construireNomComplet() {
|
917 |
private String construireNomComplet() {
|