Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1261 → Rev 1262

/trunk/src/org/tela_botanica/client/vues/structure/StructureForm.java
17,6 → 17,7
import org.tela_botanica.client.modeles.Valeur;
import org.tela_botanica.client.modeles.ValeurListe;
import org.tela_botanica.client.modeles.aDonnee;
import org.tela_botanica.client.modeles.collection.CollectionAPersonne;
import org.tela_botanica.client.modeles.personne.Personne;
import org.tela_botanica.client.modeles.personne.PersonneListe;
import org.tela_botanica.client.modeles.projet.Projet;
262,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) {
280,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é.");
289,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 {
312,8 → 307,6
}
}
Debug.log("===> END StructureForm.soumettreFormulaire()");
return fomulaireValide;
}
700,6 → 693,7
structureCollectee.setTelephoneFixe(telChp.getValue());
structureCollectee.setFax(faxChp.getValue());
structureCollectee.setCourriel(emailChp.getValue());
structureCollectee.setUrl(Structure.URL_SITE, urlChp.getValue());
785,6 → 779,7
telChp.setValue(identification.getTelephoneFixe());
faxChp.setValue(identification.getFax());
emailChp.setValue(identification.getCourriel());
urlChp.setValue(identification.getUrl("WEB"));
1044,9 → 1039,6
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);
if (personnelGrilleMagazin.getModifiedRecords().contains(record) == true
1191,8 → 1183,6
personnelOnglet.addListener(Events.Select, new Listener<ComponentEvent>() {
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);
 
1200,11 → 1190,6
if (mode.equals(MODE_AJOUTER)) {
rafraichirPersonnel();
}
/*
else {
initialiserGrillePersonnelEnModification();
}
*/
}
});
1230,17 → 1215,7
}
});
/* TODELETE
personnelGrilleMagazin.addListener(Store.Update, new Listener<StoreEvent<StructureAPersonne>>() {
public void handleEvent(StoreEvent<StructureAPersonne> ce) {
personnelGrilleMagazin.getAt(ce.getIndex()).set("etat", StructureAPersonne.ETAT_MODIFIE);
Debug.log("Modification de : "+personnelGrilleMagazin.getAt(ce.getIndex()).getNom());
}
});
*/
RowNumberer r = new RowNumberer();
List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
1509,7 → 1484,16
personnelGrilleMagazin.addListener(Store.Update, new Listener<StoreEvent<StructureAPersonne>>() {
public void handleEvent(StoreEvent<StructureAPersonne> ce) {
ce.getModel().set("etat", aDonnee.ETAT_MODIFIE);
 
StructureAPersonne structureAPersonne = ce.getModel();
String etat = structureAPersonne.get("etat");
if (!etat.equals(aDonnee.ETAT_AJOUTE) && !UtilString.isEmpty(structureAPersonne.getId())) {
System.out.println("modifier");
ce.getModel().set("etat", aDonnee.ETAT_MODIFIE);
} else {
System.out.println("ajoute");
}
}
});
2012,7 → 1996,6
public void rafraichir(Object nouvellesDonnees) {
Debug.log("|0> StructureForm.rafraichir, nouvellesDonnees.getClass() = "+nouvellesDonnees.getClass());
try {
if (nouvellesDonnees instanceof Information) {
2039,7 → 2022,6
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());
2091,12 → 2073,11
}
}
} 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);
peuplerStructurePersonnel();
 
personnelOnglet.layout();
InfoLogger.display("Chargement du Personnel", "ok");
 
2240,7 → 2221,6
}
private void testerLancementRafraichirPersonnel() {
Debug.log("==> BEGIN StructureForm.testerLancementRafraichirPersonnel()");
decompteRafraichissementPersonnel--;
if (decompteRafraichissementPersonnel == 0) {
2247,12 → 2227,9
// Nous rechargeons la liste du Personnel
rafraichirPersonnel();
}
Debug.log("==> END StructureForm.testerLancementRafraichirPersonnel()");
}
private void rafraichirPersonnel() {
Debug.log("==> BEGIN StructureForm.rafraichirPersonnel()");
decompteRafraichissementPersonnel = 0;
if (mode.equals(MODE_MODIFIER)) {
initialiserGrillePersonnelEnModification();
2259,7 → 2236,6
} else if (mode.equals(MODE_AJOUTER)) {
initialiserGrillePersonnelEnAjout();
}
Debug.log("==> END StructureForm.rafraichirPersonnel()");
}
private void rafraichirPersonneExistante(String nom) {