Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 813 → Rev 814

/trunk/src/org/tela_botanica/client/vues/StructureDetailVue.java
41,7 → 41,9
private String rechercheValorisationTpl = null;
private Structure structure = null;
private boolean structureChargementOk = false;
private StructureAPersonneListe personnel = null;
private boolean personnelChargementOk = false;
private StructureValorisation valorisation = null;
private StructureConservation conservation = null;
98,23 → 100,10
}
 
private void chargerOntologie() {
mediateur.obtenirListeValeurEtRafraichir(this, "stpr");
mediateur.obtenirListeValeurEtRafraichir(this, "stpu");
mediateur.obtenirListeValeurEtRafraichir(this, "statut");
mediateur.obtenirListeValeurEtRafraichir(this, "fonction");
mediateur.obtenirListeValeurEtRafraichir(this, "pays");
mediateur.obtenirListeValeurEtRafraichir(this, "localStockage");
mediateur.obtenirListeValeurEtRafraichir(this, "meubleStockage");
mediateur.obtenirListeValeurEtRafraichir(this, "parametreStockage");
mediateur.obtenirListeValeurEtRafraichir(this, "autreCollection");
mediateur.obtenirListeValeurEtRafraichir(this, "onep");
mediateur.obtenirListeValeurEtRafraichir(this, "opRestau");
mediateur.obtenirListeValeurEtRafraichir(this, "autreMateriel");
mediateur.obtenirListeValeurEtRafraichir(this, "poisonTraitement");
mediateur.obtenirListeValeurEtRafraichir(this, "insecteTraitement");
mediateur.obtenirListeValeurEtRafraichir(this, "actionValorisation");
mediateur.obtenirListeValeurEtRafraichir(this, "continentEtFr");
mediateur.obtenirListeValeurEtRafraichir(this, "typeRecherche");
String[] listesCodes = {"stpr", "stpu", "statut", "fonction", "pays", "localStockage", "meubleStockage",
"parametreStockage", "autreCollection", "onep", "opRestau", "autreMateriel", "poisonTraitement",
"insecteTraitement", "actionValorisation", "continentEtFr", "typeRecherche"};
lancerChargementListesValeurs(listesCodes);
}
 
private void afficherDetailInstitution() {
143,6 → 132,8
enteteParams.set("css_id", ComposantId.ZONE_DETAIL_ENTETE);
enteteParams.set("css_meta", ComposantClass.META);
enteteParams.set("i18n_id", i18nC.id());
enteteParams.set("nom", structure.getNom());
enteteParams.set("ville", structure.getVille());
enteteParams.set("id", structure.getId());
428,7 → 419,7
}
private void initialiserTousLesTpl() {
initialiserEnteteHtmlTpl();
initialiserEnteteTpl();
initialiserIdentificationTpl();
initialiserPersonnelTpl();
initialiserTableauPersonnelTpl();
440,11 → 431,11
initialiserRechercheValorisationTpl();
}
private void initialiserEnteteHtmlTpl() {
private void initialiserEnteteTpl() {
enteteTpl =
"<div id='{css_id}'>"+
" <h1>{nom}</h1>"+
" <h2>{ville}<span class='{css_meta}'>{projet} - {id} - {guid}</span></h2>" +
" <h2>{ville}<span class='{css_meta}'>{projet} <br /> {i18n_id}:{id} - {guid}</span></h2>" +
" " +
"</div>";
}
609,41 → 600,40
"<span class='{css_indentation} {css_label}'>{i18n_recherche_type} :</span> {recherche_type}<br />";
}
public void rafraichir(Object nouvelleDonnees) {
if (nouvelleDonnees instanceof Structure) {
structure = (Structure) nouvelleDonnees;
afficherDetailInstitution();
} else if (nouvelleDonnees instanceof ProjetListe) {
projets = (ProjetListe) nouvelleDonnees;
} else if (nouvelleDonnees instanceof ValeurListe) {
ValeurListe ontologieReceptionnee = (ValeurListe) nouvelleDonnees;
ajouterListeValeursAOntologie(ontologieReceptionnee);
} else if (nouvelleDonnees instanceof Information) {
Information info = (Information) nouvelleDonnees;
public void rafraichir(Object nouvellesDonnees) {
if (nouvellesDonnees instanceof Structure) {
structure = (Structure) nouvellesDonnees;
structureChargementOk = true;
} else if (nouvellesDonnees instanceof ProjetListe) {
projets = (ProjetListe) nouvellesDonnees;
projetsChargementOk = true;
} else if (nouvellesDonnees instanceof ValeurListe) {
ValeurListe listeValeursReceptionnee = (ValeurListe) nouvellesDonnees;
receptionerOntologie(listeValeursReceptionnee);
} else if (nouvellesDonnees instanceof Information) {
Information info = (Information) nouvellesDonnees;
if (info.getType().equals("liste_structure_a_personne")) {
allouerPersonnelAStructure((StructureAPersonneListe) info.getDonnee(0));
afficherDetailInstitution();
personnelChargementOk = true;
}
} else {
GWT.log("Pas de correspondance dans la méthode rafraichir() de la classe "+this.getClass(), null);
}
if (avoirDonneesChargees()) {
afficherDetailInstitution();
afficherDetailInstitution();
}
}
 
protected void allouerPersonnelAStructure(StructureAPersonneListe personnel) {
structure.setPersonnel(personnel);
}
 
protected String construireTxtProjet(String idProjet) {
String chaineARetourner = idProjet;
if (projets != null) {
Projet projet = projets.get(idProjet);
String nomDuProjet = projet.getNom();
if (!nomDuProjet.equals("")) {
chaineARetourner = nomDuProjet;
}
private boolean avoirDonneesChargees() {
boolean ok = false;
if (projetsChargementOk && structureChargementOk && personnelChargementOk && ontologieChargementOk) {
ok = true;
}
return chaineARetourner;
return ok;
}
}