Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1254 → Rev 1255

/branches/v1.0-syrah/src/org/tela_botanica/client/vues/personne/PersonneFormPublication.java
84,9 → 84,6
private FenetreForm fenetreFormulaire = null;
public PersonneFormPublication(Formulaire formulaireCourrant) {
Debug.log("|> PersonneFormPublication : [constructeur]");
 
initialiserOnglet(formulaireCourrant);
setId("publication");
setText(Mediateur.i18nC.collectionPublication());
103,8 → 100,6
}
private void initialiser() {
Debug.log("|> PersonneFormPublication.initialiser()");
 
// Remise à zéro des modification dans la liste des auteurs
idGenere = 1;
115,16 → 110,9
actualiserEtatBoutonsBarreOutils();
}
public void mettreAJourPersonne() {
public void mettreAJourPersonne() {
Debug.log("|> *** BEGIN PersonneFormPublication.mettreAJourPersonne()");
personneSelectionnee = ((PersonneForm) formulaire).personneSelectionnee;
Debug.log("|--> PersonneFormPublication.mettreAJourPersonne : personneSelectionnee="+personneSelectionnee.toString());
if (personneSelectionnee==null) Debug.log("|> *** (personneSelectionnee==null)");
else Debug.log("|> *** (personneSelectionnee!=null)");
personneSelectionnee = ((PersonneForm) formulaire).personneSelectionnee;
 
//Boucle sur les role pour trouver les publication à personne
 
141,10 → 129,6
if ((roles != null) && (personneSelectionnee!=null) && (!personneSelectionnee.toString().equals(""))) {
 
mediateur.selectionnerPublicationAPersonne(this, null, personneSelectionnee.getId(), roles);
Debug.log("|--> PersonneFormPublication.mettreAJourPersonne : selectionnerPublicationAPersonne(this, null, personneSelectionnee.getId(), roles)");
Debug.log("| avec personneSelectionnee.getId()="+personneSelectionnee.getId());
Debug.log("|> END PersonneFormPublication.mettreAJourPersonne()");
}
}
298,9 → 282,6
}
private void actualiserGrille() {
Debug.log("|> PersonneFormPublication.actualiserGrille()");
 
if (mode.equals(Formulaire.MODE_MODIFIER)) {
mediateur.selectionnerPublicationAPersonne(this, null, personneSelectionnee.getId(), "%");
} else {
345,22 → 326,15
}
private void ajouterDansGrille(Publication publication, int index) {
Debug.log("|> PersonneFormPublication.ajouterDansGrille(Publication publication, int index)");
if (publication != null) {
Debug.log("|--> publication != null");
if (!listePublicationsLiees.containsKey(publication.getId())) {
PublicationAPersonne publicationLiee = new PublicationAPersonne();
publicationLiee.setPersonne(personneSelectionnee);
publicationLiee.setPublicationLiee(publication);
publicationLiee.setIdPublication(publication.getId());
Debug.log("\\\\> set ETAT_AJOUTE");
 
publicationLiee.set("_etat_", aDonnee.ETAT_AJOUTE);
listePublicationsLiees.put(publication.getId(), publicationLiee);
Debug.log("|--> personneSelectionneeID="+personneSelectionnee.getId());
Debug.log("|--> publicationID="+publication.getId());
 
// Ajout à la grille
grille.stopEditing();
377,8 → 351,6
* Met à jour la grille avec les informations contenus dans la variable listePublicationsLiees
*/
private void mettreAJourGrille() {
Debug.log("|> PersonneFormPublication.mettreAJourGrille()");
 
grille.getStore().removeAll();
grille.getStore().add(listePublicationsLiees.toList());
390,10 → 362,7
if ((publicationLiee.get("_etat_").equals("") || !publicationLiee.get("_etat_").equals(aDonnee.ETAT_AJOUTE))
&& publicationLiee.getId() != null
&& !publicationLiee.getId().equals("")) {
Debug.log("Nbre publications supprimées avant:"+publicationsSupprimees.size());
publicationsSupprimees.put("id"+idGenere++, publicationLiee);
//GWT.log("Publications supprimée : "+publicationLiee.getIdPublication()+" "+publicationLiee.get.getNomComplet(), null);
Debug.log("Nbre publications supprimées :"+publicationsSupprimees.size());
}
// Suppression de l'enregistrement de la grille
403,8 → 372,6
 
private EditorGrid<PublicationAPersonne> creerGrille() {
Debug.log("|> PersonneFormPublication.creerGrille()");
ListStore<PublicationAPersonne> storeGrille = new ListStore<PublicationAPersonne>();
storeGrille.addListener(Store.Add, new Listener<StoreEvent<PublicationAPersonne>>() {
public void handleEvent(StoreEvent<PublicationAPersonne> ce) {
419,7 → 386,6
storeGrille.addListener(Store.Update, new Listener<StoreEvent<PublicationAPersonne>>() {
public void handleEvent(StoreEvent<PublicationAPersonne> ce) {
if (ce.getRecord().isModified("_role_") && !ce.getModel().get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
Debug.log("||| PersonneFormPublication.creerGrille, storeGrille LISTENER : set ETAT_MODIFIE");
ce.getModel().set("_etat_", aDonnee.ETAT_MODIFIE);
}
}
569,20 → 535,14
}
public void rafraichir(Object nouvellesDonnees) {
Debug.log("|> PersonneFormPublication.rafraichir() BEGIN");
 
if (nouvellesDonnees instanceof Information)
{
Debug.log("|>>>>>>>>>>>>>");
Information info = (Information) nouvellesDonnees;
rafraichirInformation(info);
}
else if (nouvellesDonnees instanceof ValeurListe)
{
Debug.log("|--> instanceof ValeurListe");
{
ValeurListe listeValeurs = (ValeurListe) nouvellesDonnees;
if (listeValeurs.getId().equals(config.getListeId("relationPersonnePublication"))) {
Formulaire.rafraichirComboBox(listeValeurs, typeRelationCombo);
592,51 → 552,29
}
else if (nouvellesDonnees instanceof PublicationListe)
{
Debug.log("|--> instanceof PublicationListe");
 
PublicationListe listePublications = (PublicationListe) nouvellesDonnees;
rafraichirPublicationListe(listePublications);
}
else if (nouvellesDonnees instanceof PublicationAPersonneListe)
{
Debug.log("|--> instanceof PublicationAPersonneListe");
{
PublicationAPersonneListe papl = (PublicationAPersonneListe) nouvellesDonnees;
List<PublicationAPersonne> paplListe = papl.toList();
if (paplListe.size()>0){
Debug.log("|--> paplListe.size()>0");
Debug.log("|--> paplListe="+paplListe.toString());
if (paplListe.size()>0){
Iterator<PublicationAPersonne> it = paplListe.iterator();
while (it.hasNext()) {
PublicationAPersonne pap = it.next();
Debug.log("|--> listePublicationsLiees.size="+listePublicationsLiees.size());
 
listePublicationsLiees.put(pap.getPublicationLiee().getId(), pap);
}
mettreAJourGrille();
}
else {
Debug.log("|--> paplListe.size()<=0");
}
}
else
{
Debug.log("|>*** CROTTE");
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
}
Debug.log("|> PersonneFormPublication.rafraichir() END");
}
private void rafraichirPublicationListe(PublicationListe listePublications) {
Debug.log("|> PersonneFormPublication.rafraichirPublicationListe(PublicationListe listePublications)");
 
publicationsSaisiesComboBox.getStore().removeAll();
publicationsSaisiesComboBox.getStore().add(listePublications.toList());
publicationsSaisiesComboBox.expand();
643,11 → 581,6
}
public void rafraichirInformation(Information info) {
Debug.log("|> PersonneFormPublication.rafraichirInformation(Information info) BEGIN");
 
Debug.log("|*^*| type de l'info="+info.getType());
 
if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
GWT.log("MESSAGES:\n"+info.getMessages().toString(), null);
}
677,9 → 610,7
InfoLogger.display("Suppression publication à personne", info.getMessages().toString());
} else {
GWT.log(Mediateur.i18nM.erreurRafraichir(info.getClass(), this.getClass()), null);
}
Debug.log("|> PersonneFormPublication.rafraichirInformation(Information info) END");
}
}
 
public void peupler() {
690,32 → 621,21
}
 
public void collecter() {
Debug.log("|*** PersonneFormPublication.collecter() BEGIN");
public void collecter() {
if (etreAccede()) {
int nbrePublication = grille.getStore().getCount();
for (int i = 0; i < nbrePublication; i++) {
PublicationAPersonne publicationLiee = grille.getStore().getAt(i);
if (publicationLiee.get("_etat_") != null) {
if (publicationLiee.get("_etat_").equals(aDonnee.ETAT_MODIFIE)) {
Debug.log(">300> ETAT_MODIFE, PublicationLiee = "+publicationLiee.toString());
Debug.log(">300> PersonneFormPublication.collecter(), ETAT_MODIFIE, publicationsSupprimees.put(\"id\"+idGenere++, publicationLiee)");
if (publicationLiee.get("_etat_").equals(aDonnee.ETAT_MODIFIE)) {
// Comme il est impossible de modifier les relations nous supprimons l'ancien enregistrement et ajoutons un nouveau avec le nouveau id_role
publicationsSupprimees.put("id"+idGenere++, publicationLiee);
PublicationAPersonne relationAAjouter = (PublicationAPersonne) publicationLiee.cloner(new PublicationAPersonne());
Debug.log(">300> PersonneFormPublication.collecter(), ETAT_MODIFIE, publicationsAjoutees.put(\"id\"+idGenere++, relationAAjouter)");
publicationsAjoutees.put("id"+idGenere++, relationAAjouter);
}
if (publicationLiee.get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
publicationsAjoutees.put("id"+idGenere++, publicationLiee);
Debug.log(">300> ETAT_AJOUTE, PublicationLiee = "+publicationLiee.toString());
}
// Initialisation de la grille
publicationLiee.set("_etat_", "");
723,15 → 643,10
}
}
grille.getStore().commitChanges();
}
Debug.log("|*** PersonneFormPublication.collecter() END");
}
}
public List verifier() {
 
Debug.log("|> PersonneFormPublication.verifier()");
public List verifier() {
List lstMessageErreur = new LinkedList<String>();
//Vérifier les roles
List<PublicationAPersonne> listePublis = grille.getStore().getModels();
747,33 → 662,21
public void soumettre() {
Debug.log("<8-8> BEGIN PersonneFormPublication.soumettre()");
if (mode.equals(Formulaire.MODE_MODIFIER)) {
if (publicationsAjoutees.size() == 0 && publicationsSupprimees.size() == 0) {
InfoLogger.display("Modification des publications liées", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
} else {
Debug.log("<8-8> PersonneFormPublication.soumettre() : publicationsAjoutees.size()="+publicationsAjoutees.size());
} else {
// Ajout des relations PublicationAPersonne
if (publicationsAjoutees.size() != 0) {
//TODO : utiliser le role d'une liste déroulante
Debug.log("<8-8> PersonneFormPublication.soumettre() - Appel à mediateur.ajouterPublicationAPersonne()");
//TODO : utiliser le role d'une liste déroulante
mediateur.ajouterPublicationAPersonne(this, publicationsAjoutees, personneSelectionnee.getId(), null);
}
Debug.log("<8-8> PersonneFormPublication.soumettre() : publicationsSupprimees.size()="+publicationsSupprimees.size());
}
// Suppression des relations PublicationAPersonne
if (publicationsSupprimees.size() != 0) {
Debug.log("<8-8> PersonneFormPublication.soumettre() - Appel à mediateur.supprimerPublicationAPersonne()");
if (publicationsSupprimees.size() != 0) {
mediateur.supprimerPublicationAPersonne(this, publicationsSupprimees);
}
}
}
Debug.log("<8-8> END PersonneFormPublication.soumettre()");
}
private void obtenirPublicationsSaisies(String nom) {
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/personne/PersonneForm.java
673,7 → 673,6
ajouterPubli.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
Debug.log("|> PersonneForm.creerComposantsPubli() : A MODIFIER ! ajout publi");
/*StructureAPersonne membreDuPersonnel = new StructureAPersonne("", StructureAPersonne.ROLE_EQUIPE, StructureAPersonne.ETAT_AJOUTE);
ajouterMembreAGrillePersonnel(membreDuPersonnel);*/
}
750,10 → 749,7
tiPubli.add(cp);
}
 
public void rafraichirPublicationsExistante(String nomPubli) {
Debug.log("|> PersonneForm.rafraichirPublicationsExistante()");
public void rafraichirPublicationsExistante(String nomPubli) {
nomPubli +="%";
mediateur.selectionnerPublicationParNomComplet(this, null, nomPubli);
}
783,25 → 779,16
// RAFRAICHISSEMENT DU PANNEAU
 
public void rafraichir(Object nouvellesDonnees) {
Debug.log("|> PersonneForm.rafraichir(Object nouvellesDonnees) BEGIN");
 
if (nouvellesDonnees instanceof PublicationAPersonneListe) {
if (nouvellesDonnees instanceof PublicationAPersonneListe) {
Debug.log("|--> PersonneForm.rafraichir(Object nouvellesDonnees) : nouvellesDonnees instanceof PublicationAPersonneListe");
Information info = new Information();
info.setType("publication_liees");
info.setDonnee(0, (PublicationAPersonneListe) nouvellesDonnees);
 
Debug.log("|--> tiPubli.rafraichir(info)");
tiPubli.rafraichir(info);
 
} else if (nouvellesDonnees instanceof ValeurListe) {
} else if (nouvellesDonnees instanceof ValeurListe) {
Debug.log("|--> PersonneForm.rafraichir(Object nouvellesDonnees) : nouvellesDonnees instanceof ValeurListe");
ValeurListe listeValeurs = (ValeurListe) nouvellesDonnees;
// Créer une liste de valeurs
810,11 → 797,7
liste.add(listeValeurs.get(it.next()));
}
if (listeValeurs.getId().equals(config.getListeId("relationPersonnePublication"))) {
Debug.log("|--> tiPubli.rafraichir(nouvellesDonnees)");
tiPubli.rafraichir(nouvellesDonnees);
tiPubli.rafraichir(nouvellesDonnees);
} else if (listeValeurs.getId().equals(config.getListeId("prefixe"))) {
remplirCombobox("cbPrefixe", liste, "hmIdentite");
} else if (listeValeurs.getId().equals(config.getListeId("suffixes"))) {
849,14 → 832,9
hmAdresse.getComboBox("cbRegion").setVisible(true);
}
} else if (nouvellesDonnees instanceof ProjetListe) {
Debug.log("|--> PersonneForm.rafraichir(Object nouvellesDonnees) : nouvellesDonnees instanceof ProjetListe");
} else if (nouvellesDonnees instanceof ProjetListe) {
ProjetListe projets = (ProjetListe) nouvellesDonnees;
List<Projet> liste = projets.toList();
ComboBox cbProjets = hmIdentite.getComboBox("cbProjets");
ListStore<Projet> storeProjets= cbProjets.getStore();
storeProjets.removeAll();
863,25 → 841,12
storeProjets.add(liste);
cbProjets.setStore(storeProjets);
} else if (nouvellesDonnees instanceof PublicationListe) {
 
Debug.log("|> PersonneForm.rafraichir");
Debug.log("|--> nouvellesDonnees instanceof PublicationListe");
 
PublicationListe publicationListe = (PublicationListe) nouvellesDonnees;
Debug.log("|--> nouvellesDonnees ="+publicationListe.toString());
List<Publication> liste = publicationListe.toList();
storePubli.removeAll();
storePubli.add(liste);
cbPubli.setStore(storePubli);
} else if (nouvellesDonnees instanceof Information) {
Debug.log("|--> PersonneForm.rafraichir(Object nouvellesDonnees) : nouvellesDonnees instanceof Information");
} else if (nouvellesDonnees instanceof Information) {
Information info = (Information) nouvellesDonnees;
if (info.getType().equals("ajout_personne")) {
if (info.getDonnee(0) != null) {
923,10 → 888,7
}
}
if (nouvellesDonnees == null) {
Debug.log("|--> PersonneForm.rafraichir(Object nouvellesDonnees) : nouvellesDonnees == null");
if (nouvellesDonnees == null) {
ComboBox<Valeur> cb= hmIdentite.getComboBoxValeur("cbPrefixe");
//Met à jour le nom Complet du formulaire
977,15 → 939,10
if (this.mode.equals(MODE_AJOUTER)) {
gererEtatActivationBouton();
}
Debug.log("|> PersonneForm.rafraichir(Object nouvellesDonnees) END");
}
}
 
private void repandreRafraichissement() {
Debug.log("|> PersonneForm.repandreRafraichissement()");
private void repandreRafraichissement() {
if (vueExterneARafraichirApresValidation != null) {
String type = "personne_modifiee";
if (mode.equals(Formulaire.MODE_AJOUTER)) {
1011,10 → 968,7
}
private void mettreAJourPersonne(Personne personne) {
Debug.log("|> BEGIN PersonneForm.mettreAJourPersonne()");
 
//Mise à jour de la personne
//Personne personne = (Personne) nouvellesDonnees;
ComboBox cbProjets = hmIdentite.getComboBox("cbProjets");
1134,13 → 1088,9
String tr = personne.getString("truk_recolte");
hmInfosNat.getChampMultiValeursMultiTypes("recolte").peupler(tr);
//Onglet publi
Debug.log("|--> appel à tiPubli.mettreAJourPersonne()");
//Onglet publi
tiPubli.mettreAJourPersonne();
gererEtatActivationBouton();
Debug.log("|> BEGIN PersonneForm.mettreAJourPersonne()");
}
public void remplirCombobox(String idComboBox, List liste, String hashMapId) {
1177,9 → 1127,6
}
public void binderPersonne(Personne personne) {
Debug.log("|> BEGIN PersonneForm.binderPersonne()");
 
binding = new FormBinding(getFormulaire());
personneSelectionnee = personne;
1190,9 → 1137,6
binding.bind(personneSelectionnee);
layout();
Debug.log("|> END PersonneForm.binderPersonne()");
 
}
private String obtenirValeurCombo(String strComboName) {
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/collection/CollectionDetailVue.java
552,7 → 552,6
private boolean avoirDonneesChargees() {
boolean ok = false;
//Debug.log("projetsChargementOk:"+projetsChargementOk+"-collectionChargementOk:"+collectionChargementOk+"-ontologieChargementOk:"+ontologieChargementOk+"-personnesLieesChargementOk:"+personnesLieesChargementOk+"-publicationsLieesChargementOk:"+publicationsLieesChargementOk);
if (projetsChargementOk && collectionChargementOk && ontologieChargementOk && personnesLieesChargementOk && publicationsLieesChargementOk && commentairesLieesChargementOk) {
ok = true;
}
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/collection/CollectionForm.java
276,6 → 276,7
publicationOnglet.rafraichir(info);
commentaireOnglet.rafraichir(info);
} else {
Debug.log("CollectionForm.rafraichirInformation() > ICI étrange");
InfoLogger.display("Ajout d'une collection", info.toString());
}
} else if (infoType.equals("liste_collection_a_personne")) {
306,16 → 307,13
 
public boolean soumettreFormulaire() {
Debug.log("<$$$> BEGIN CollectionForm.soumettreFormulaire()");
// Vérification de la validité des champs du formulaire
boolean formulaireValide = verifierFormulaire();
 
if (formulaireValide) {
// Collecte des données du formulaire
Collection collectionAEnregistrer = collecterCollection();
Debug.log("<$$$> CollectionForm.soumettreFormulaire(), collectionAEnregistrer.getProperties()="+collectionAEnregistrer.getProperties().toString());
if (mode.equals(MODE_AJOUTER)) {
mediateur.ajouterCollection(this, collectionAEnregistrer);
} else if (mode.equals(MODE_MODIFIER)) {
329,9 → 327,6
soumettreOnglets();
}
Debug.log("<$$$> END CollectionForm.soumettreFormulaire()");
return formulaireValide;
}
351,7 → 346,6
private Collection collecterCollection() {
collectionCollectee = (Collection) collection.cloner(new Collection());
this.collecter();
collecterOnglets();
366,7 → 360,7
collectionCollectee.setNom(nomChp.getValue());
collectionCollectee.setTypeNcd(typesCollectionCombo.getValue().getId());
}
 
private void collecterOnglets() {
generalOnglet.collecter();
personneOnglet.collecter();
376,7 → 370,7
inventaireOnglet.collecter();
commentaireOnglet.collecter();
}
 
public boolean verifierFormulaire() {
ArrayList<String> messages = new ArrayList<String>();
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/structure/StructureForm.java
263,8 → 263,6
public boolean soumettreFormulaire() {
Debug.log("===> BEGIN StructureForm.soumettreFormulaire()");
// Vérification de la validité des champs du formulaire
boolean fomulaireValide = verifierFormulaire();
if (fomulaireValide) {
281,8 → 279,6
// Voir la méthode rafraichir().
} else if (mode.equals(MODE_MODIFIER)) {
Debug.log("===> StructureForm.soumettreFormulaire(), mode="+mode);
// Modification des informations sur la Structure
if (structure == null && conservation == null && valorisation == null) {
InfoLogger.display("Modification d'une institution", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
290,8 → 286,6
mediateur.modifierStructure(this, identification.getId(), structure, conservation, valorisation);
}
Debug.log("===> StructureForm.soumettreFormulaire(), personnelModifie.size="+personnelModifie.size() + ", personnelAjoute.size()="+personnelAjoute.size());
if (personnelModifie.size() == 0 && personnelAjoute.size() == 0 && personnelSupprime.size() == 0) {
InfoLogger.display("Modification du personnel", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
} else {
313,8 → 307,6
}
}
Debug.log("===> END StructureForm.soumettreFormulaire()");
return fomulaireValide;
}
1046,9 → 1038,6
int nbrePersonne = personnelGrilleMagazin.getCount();
for (int i = 0; i < nbrePersonne; i++) {
StructureAPersonne personne = personnelGrilleMagazin.getAt(i);
Debug.log(":::> StructureForm.collecterStructurePersonnel()");
Debug.log(":::> etat="+personne.get("etat"));
 
// Seules les lignes ajoutées ou modifiées sont prises en compte.
Record record = personnelGrilleMagazin.getRecord(personne);
1192,10 → 1181,8
personnelOnglet.setLayout(creerFormLayout(400, LabelAlign.LEFT));
personnelOnglet.setStyleAttribute("padding", "0");
personnelOnglet.addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent be) {
public void handleEvent(ComponentEvent be) {
Debug.log(":::> StructureForm.creerOngletPersonnel.HandleEvent()");
// Indique que l'onglet a été rempli et a pu être modifié pour la méthode collecter...
personnelOnglet.setData("acces", true);
 
1203,11 → 1190,6
if (mode.equals(MODE_AJOUTER)) {
rafraichirPersonnel();
}
/*
else {
initialiserGrillePersonnelEnModification();
}
*/
}
});
2005,8 → 1987,6
public void rafraichir(Object nouvellesDonnees) {
Debug.log("|0> StructureForm.rafraichir, nouvellesDonnees.getClass() = "+nouvellesDonnees.getClass());
try {
if (nouvellesDonnees instanceof Information) {
Information info = (Information) nouvellesDonnees;
2031,8 → 2011,6
if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
GWT.log("MESSAGES:\n"+info.getMessages().toString(), null);
}
 
Debug.log("|0> StructureForm.rafraichirInformation, info.getType() = "+info.getType());
if (info.getType().equals("modif_structure")) {
InfoLogger.display("Modification d'une institution", info.toString());
2084,7 → 2062,6
}
}
} else if (info.getType().equals("liste_structure_a_personne")) {
Debug.log("==> StructureForm.rafraichirInformation, typeInfo=liste_structure_a_personne");
if (info.getDonnee(0) != null) {
personnel = (StructureAPersonneListe) info.getDonnee(0);
2232,20 → 2209,15
projetsCombo.setStore(projetsMagazin);
}
private void testerLancementRafraichirPersonnel() {
Debug.log("==> BEGIN StructureForm.testerLancementRafraichirPersonnel()");
private void testerLancementRafraichirPersonnel() {
decompteRafraichissementPersonnel--;
if (decompteRafraichissementPersonnel == 0) {
// Nous rechargeons la liste du Personnel
rafraichirPersonnel();
}
Debug.log("==> END StructureForm.testerLancementRafraichirPersonnel()");
}
}
private void rafraichirPersonnel() {
Debug.log("==> BEGIN StructureForm.rafraichirPersonnel()");
private void rafraichirPersonnel() {
decompteRafraichissementPersonnel = 0;
if (mode.equals(MODE_MODIFIER)) {
initialiserGrillePersonnelEnModification();
2252,7 → 2224,6
} else if (mode.equals(MODE_AJOUTER)) {
initialiserGrillePersonnelEnAjout();
}
Debug.log("==> END StructureForm.rafraichirPersonnel()");
}
private void rafraichirPersonneExistante(String nom) {
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/publication/PublicationListeVue.java
188,10 → 188,7
}
}
public void rafraichir(Object nouvellesDonnees) {
Debug.log("|> PublicationListeVue.rafraichir(Object nouvellesDonnees) BEGIN");
public void rafraichir(Object nouvellesDonnees) {
if (nouvellesDonnees instanceof PublicationListe) {
PublicationListe publications = (PublicationListe) nouvellesDonnees;
223,8 → 220,6
}
layout();
Debug.log("|> PublicationListeVue.rafraichir(Object nouvellesDonnees) END");
}
 
private void supprimerPublicationsSelectionnees() {
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/publication/PublicationForm.java
143,7 → 143,6
auteursFieldset.setCollapsible(true);
auteursFieldset.setLayout(layout);
Debug.log("Dans creerZoneAuteurs");
auteurComboboxListe = new ArrayList<ComboBox<Personne>>(0);
auteursStorePartage = new ListStore<Personne>();
mediateur.clicObtenirListeAuteurs(this);
357,7 → 356,6
}
if (etrePretAPeupler()) {
Debug.log("Entrain de peupler");
peuplerFormulaire();
genererTitreFormulaire();
initialiserPeupler();
364,7 → 362,6
}
if (avoirAuteursMiseAJourCorrectement()) {
Debug.log("Mise à jour liste auteur");
miseAJourAuteursInitialListe();
initialiserAuteurs();
auteursValideOk = true;
408,13 → 405,10
Personne auteur = auteurs.get(it.next()).getPersonne();
auteursInitialListe.put(auteur.getId(), auteur);
}
Debug.log("Réception liste des auteurs : "+auteurs.size());
publicationAPersonneListeChargementOk = true;
}
private void rafraichirInformation(Information info) {
Debug.log("<8-8> BEGIN PublicationForm.rafraichirInformation()");
private void rafraichirInformation(Information info) {
String type = info.getType();
if (type.equals("ajout_publication") || type.equals("modif_publication")) {
publicationValideOk = true;
425,9 → 419,7
publication.setId(publicationId);
}
}
attenteAjoutAuteursOk = true;
Debug.log("<8-8> PublicationForm.rafraichirInformation() - Appel à mediateur.ajouterPublicationAPersonne()");
attenteAjoutAuteursOk = true;
mediateur.ajouterPublicationAPersonne(this, publication.getId(), auteursAjoutes, PublicationAPersonne.ROLE_AUTEUR);
}
}
438,14 → 430,11
List<Personne> liste = listePersonneAuteur.toList();
auteursStorePartage.removeAll();
auteursStorePartage.add(liste);
Debug.log("Reception nouvelle liste auteurs");
auteurStorePartageChargementOk = true;
} else if (info.getType().equals("ajout_publication_a_personne")) {
attenteAjoutAuteursOk = false;
Debug.log("attenteAjoutAuteursOk");
} else if (info.getType().equals("suppression_publication_a_personne")) {
attenteSuppressionAuteursOk = false;
Debug.log("attenteSuppressionAuteursOk");
} else if (info.getType().equals("modif_publication")) {
InfoLogger.display("Modification d'une publication", info.toString());
} else if (info.getType().equals("ajout_publication")) {
455,9 → 444,7
} else {
InfoLogger.display("Ajout d'une publication", info.toString());
}
}
Debug.log("<8-8> END PublicationForm.rafraichirInformation()");
}
}
private boolean avoirAuteursMiseAJourCorrectement() {
503,7 → 490,6
private boolean etrePretAPeupler() {
boolean ok = false;
Debug.log("Mode :"+mode.equals(Formulaire.MODE_MODIFIER)+" - PublicationOk :"+publicationOk+" - AuteursAffiches :"+auteursAffiches);
if (mode.equals(Formulaire.MODE_MODIFIER) && publicationOk && auteursAffiches && editeursOk) {
ok = true;
}
512,7 → 498,6
private Boolean etreValide() {
Boolean valide = false;
//Debug.log("formulaire"+formulaireValideOk+" - Publication :"+publicationValideOk+" - Auteurs :"+auteursValideOk, null);
if (formulaireValideOk && publicationValideOk && auteursValideOk) {
valide = true;
}
629,7 → 614,6
mediateur.supprimerPublicationAPersonne(this, auteursSupprimes);
}
}
Debug.log("personnesInitiales:"+personnesInitiales.size()+" - personnesActuelles :"+personnesActuelles.size()+" - auteursSupprimes :"+auteursSupprimes.size()+" - auteursAjoutes :"+auteursAjoutes.size());
}
public boolean verifierFormulaire() {