Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1470 → Rev 1472

/branches/v1.1-aramon/src/org/tela_botanica/client/vues/structure/StructureForm.java
3,6 → 3,7
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
 
import org.tela_botanica.client.ComposantClass;
792,14 → 793,7
}
String dateFondation = identification.getAnneeOuDateFondation();
if (!dateFondation.equals("")) {
if (dateFondation.endsWith("00-00")) {
dateFondationChp.setValue(dateFondation.substring(0, 4));
} else {
Date date = DateTimeFormat.getFormat("yyyy-MM-dd").parse(dateFondation);
dateFondationChp.setValue(DateTimeFormat.getFormat("dd/MM/yyyy").format(date));
}
}
dateFondationChp.setValue(dateFondation);
descriptionChp.setValue(identification.getDescription());
conditionAccesChp.setValue(identification.getConditionAcces());
2034,7 → 2028,7
public void rafraichir(Object nouvellesDonnees) {
Debug.log("nouvellesDonnees="+nouvellesDonnees.getClass().toString());
try {
if (nouvellesDonnees instanceof Information) {
Information info = (Information) nouvellesDonnees;
2053,15 → 2047,21
}
public void rafraichirInformation(Information info) {
Debug.log("rafraichirInformation");
if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
GWT.log("MESSAGES:\n"+info.getMessages().toString(), null);
}
 
Debug.log("ici");
if (info.getType().equals("modif_structure")) {
InfoLogger.display("Modification d'une institution", info.toString());
} else if (info.getType().equals("ajout_structure")) {
Debug.log("1");
if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
Debug.log("2");
String structureId = (String) info.getDonnee(0);
InfoLogger.display("Ajout d'une Institution", "L'intitution '"+structureId+"' a bien été ajoutée");
2081,30 → 2081,46
testerLancementRafraichirPersonnel();
} else if (info.getType().equals("selection_structure")) {
InfoLogger.display("Modification d'une institution", info.toString());
Debug.log("3");
String titre = i18nC.titreModifFormStructurePanneau();
if (info.getDonnee(0) != null) {
identification = (Structure) info.getDonnee(0);
if (onglets.getSelectedItem().equals(identificationOnglet)) {
peuplerStructureIdentification();
Debug.log("3.2");
Debug.log("info.getDonnee(0)="+info.getDonnee(0).toString());
try {
identification = (Structure) info.getDonnee(0);
if (onglets.getSelectedItem().equals(identificationOnglet)) {
Debug.log("3.3");
peuplerStructureIdentification();
}
} catch(Exception e) {
GWT.log("Problème de cast. "+info.getDonnee(0)+" ne peut être casté en Structure", e);
}
// Composition du titre
titre += " - ID : "+identification.getId();
}
if (info.getDonnee(1) != null) {
Debug.log("4");
conservation = (StructureConservation) info.getDonnee(1);
if (onglets.getSelectedItem().equals(conservationOnglet)) {
peuplerStructureConservation();
Debug.log("4.1");
}
}
if (info.getDonnee(2) != null) {
Debug.log("5");
valorisation = (StructureValorisation) info.getDonnee(2);
if (valorisation != null) {
if (onglets.getSelectedItem().equals(valorisationOnglet)) {
peuplerStructureValorisation();
Debug.log("5.1");
}
}
}
} else if (info.getType().equals("liste_structure_a_personne")) {
Debug.log("6");
if (info.getDonnee(0) != null) {
personnel = (StructureAPersonneListe) info.getDonnee(0);
2270,4 → 2286,5
private void initialiserGrillePersonnelEnModification() {
mediateur.selectionnerStructureAPersonne(this, identification.getId(), StructureAPersonne.ROLE_EQUIPE, null);
}
}