Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1254 → Rev 1255

/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) {