Line 6... |
Line 6... |
6 |
import org.tela_botanica.client.ComposantId;
|
6 |
import org.tela_botanica.client.ComposantId;
|
7 |
import org.tela_botanica.client.Mediateur;
|
7 |
import org.tela_botanica.client.Mediateur;
|
8 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
8 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
9 |
import org.tela_botanica.client.modeles.Information;
|
9 |
import org.tela_botanica.client.modeles.Information;
|
10 |
import org.tela_botanica.client.modeles.ValeurListe;
|
10 |
import org.tela_botanica.client.modeles.ValeurListe;
|
11 |
import org.tela_botanica.client.modeles.projet.Projet;
|
- |
|
12 |
import org.tela_botanica.client.modeles.projet.ProjetListe;
|
11 |
import org.tela_botanica.client.modeles.projet.ProjetListe;
|
13 |
import org.tela_botanica.client.modeles.structure.Structure;
|
12 |
import org.tela_botanica.client.modeles.structure.Structure;
|
14 |
import org.tela_botanica.client.modeles.structure.StructureAPersonne;
|
13 |
import org.tela_botanica.client.modeles.structure.StructureAPersonne;
|
15 |
import org.tela_botanica.client.modeles.structure.StructureAPersonneListe;
|
14 |
import org.tela_botanica.client.modeles.structure.StructureAPersonneListe;
|
16 |
import org.tela_botanica.client.modeles.structure.StructureConservation;
|
15 |
import org.tela_botanica.client.modeles.structure.StructureConservation;
|
17 |
import org.tela_botanica.client.modeles.structure.StructureValorisation;
|
16 |
import org.tela_botanica.client.modeles.structure.StructureValorisation;
|
- |
|
17 |
import org.tela_botanica.client.synchronisation.Sequenceur;
|
18 |
import org.tela_botanica.client.vues.DetailVue;
|
18 |
import org.tela_botanica.client.vues.DetailVue;
|
Line 19... |
Line 19... |
19 |
|
19 |
|
20 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
20 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
21 |
import com.extjs.gxt.ui.client.util.Format;
|
21 |
import com.extjs.gxt.ui.client.util.Format;
|
Line 25... |
Line 25... |
25 |
import com.extjs.gxt.ui.client.widget.TabItem;
|
25 |
import com.extjs.gxt.ui.client.widget.TabItem;
|
26 |
import com.extjs.gxt.ui.client.widget.TabPanel;
|
26 |
import com.extjs.gxt.ui.client.widget.TabPanel;
|
27 |
import com.extjs.gxt.ui.client.widget.layout.AnchorLayout;
|
27 |
import com.extjs.gxt.ui.client.widget.layout.AnchorLayout;
|
28 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
28 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
29 |
import com.google.gwt.core.client.GWT;
|
29 |
import com.google.gwt.core.client.GWT;
|
- |
|
30 |
import com.google.gwt.user.client.Window;
|
Line 30... |
Line 31... |
30 |
|
31 |
|
Line 31... |
Line 32... |
31 |
public class StructureDetailVue extends DetailVue implements Rafraichissable {
|
32 |
public class StructureDetailVue extends DetailVue implements Rafraichissable {
|
32 |
|
33 |
|
Line 54... |
Line 55... |
54 |
private TabItem identificationOnglet = null;
|
55 |
private TabItem identificationOnglet = null;
|
55 |
private TabItem personnelOnglet = null;
|
56 |
private TabItem personnelOnglet = null;
|
56 |
private TabItem conservationOnglet = null;
|
57 |
private TabItem conservationOnglet = null;
|
57 |
private TabItem valorisationOnglet = null;
|
58 |
private TabItem valorisationOnglet = null;
|
Line -... |
Line 59... |
- |
|
59 |
|
- |
|
60 |
private Sequenceur sequenceur;
|
58 |
|
61 |
|
59 |
public StructureDetailVue(Mediateur mediateurCourant) {
|
62 |
public StructureDetailVue(Mediateur mediateurCourant, Sequenceur sequenceur) {
|
- |
|
63 |
super(mediateurCourant);
|
Line 60... |
Line 64... |
60 |
super(mediateurCourant);
|
64 |
this.sequenceur = sequenceur;
|
61 |
|
65 |
|
Line 62... |
Line 66... |
62 |
initialiserTousLesTpl();
|
66 |
initialiserTousLesTpl();
|
Line 98... |
Line 102... |
98 |
panneauPrincipal.add(onglets);
|
102 |
panneauPrincipal.add(onglets);
|
99 |
add(panneauPrincipal);
|
103 |
add(panneauPrincipal);
|
100 |
}
|
104 |
}
|
Line 101... |
Line 105... |
101 |
|
105 |
|
102 |
private void chargerOntologie() {
|
106 |
private void chargerOntologie() {
|
103 |
String[] listesCodes = {"stpr", "stpu", "statut", "fonction", "pays", "localStockage", "meubleStockage",
|
107 |
String[] listesCodes = {"stpr", "stpu", "pays", "statut", "fonction", "localStockage", "meubleStockage",
|
104 |
"parametreStockage", "autreCollection", "onep", "opRestau", "autreMateriel", "poisonTraitement",
|
108 |
"parametreStockage", "autreCollection", "onep", "opRestau", "autreMateriel", "poisonTraitement",
|
105 |
"insecteTraitement", "actionValorisation", "continentEtFr", "typeRecherche"};
|
109 |
"insecteTraitement", "actionValorisation", "continentEtFr", "typeRecherche"};
|
- |
|
110 |
lancerChargementListesValeurs(listesCodes, this.sequenceur);
|
- |
|
111 |
sequenceur.empilerRafraichissement(this, new Information("ontologie_chargee"));
|
106 |
lancerChargementListesValeurs(listesCodes);
|
112 |
|
Line 107... |
Line 113... |
107 |
}
|
113 |
}
|
108 |
|
114 |
|
109 |
private void afficherDetailInstitution() {
|
115 |
private void afficherDetailInstitution() {
|
Line 174... |
Line 180... |
174 |
identificationParams.set("i18n_web", i18nC.siteWeb());
|
180 |
identificationParams.set("i18n_web", i18nC.siteWeb());
|
Line 175... |
Line 181... |
175 |
|
181 |
|
176 |
String acronyme = construireTxtTruck(structure.getIdAlternatif());
|
182 |
String acronyme = construireTxtTruck(structure.getIdAlternatif());
|
177 |
String typePrive = construireTxtListeOntologie(structure.getTypePrive());
|
183 |
String typePrive = construireTxtListeOntologie(structure.getTypePrive());
|
178 |
String typePublic = construireTxtListeOntologie(structure.getTypePublic());
|
184 |
String typePublic = construireTxtListeOntologie(structure.getTypePublic());
|
179 |
String pays = construireTxtListeOntologie(structure.getPays());
|
185 |
String pays = construireTxtListeOntologie(structure.getPays());
|
180 |
String web = construireTxtTruck(structure.getUrl());
|
186 |
String web = construireTxtTruck(structure.getUrl());
|
181 |
String latitude = structure.getLatitude();
|
187 |
String latitude = structure.getLatitude();
|
182 |
String longitude = structure.getLongitude();
|
188 |
String longitude = structure.getLongitude();
|
Line 193... |
Line 199... |
193 |
|
199 |
|
194 |
identificationParams.set("adresse", structure.getAdresse());
|
200 |
identificationParams.set("adresse", structure.getAdresse());
|
195 |
identificationParams.set("adresse_complement", structure.getAdresseComplement());
|
201 |
identificationParams.set("adresse_complement", structure.getAdresseComplement());
|
196 |
identificationParams.set("cp", structure.getCodePostal());
|
202 |
identificationParams.set("cp", structure.getCodePostal());
|
197 |
identificationParams.set("ville", structure.getVille());
|
203 |
identificationParams.set("ville", structure.getVille());
|
198 |
identificationParams.set("region", structure.getRegion());
|
204 |
identificationParams.set("region", construireTxtListeOntologie(structure.getRegion()));
|
199 |
identificationParams.set("pays", pays);
|
205 |
identificationParams.set("pays", pays);
|
Line 200... |
Line 206... |
200 |
identificationParams.set("latitude_longitude", latitudeLongitude);
|
206 |
identificationParams.set("latitude_longitude", latitudeLongitude);
|
201 |
|
207 |
|
Line 613... |
Line 619... |
613 |
"<span class='{css_indentation} {css_label}'>{i18n_recherche_provenance} :</span> {recherche_provenance}<br />"+
|
619 |
"<span class='{css_indentation} {css_label}'>{i18n_recherche_provenance} :</span> {recherche_provenance}<br />"+
|
614 |
"<span class='{css_indentation} {css_label}'>{i18n_recherche_type} :</span> {recherche_type}<br />";
|
620 |
"<span class='{css_indentation} {css_label}'>{i18n_recherche_type} :</span> {recherche_type}<br />";
|
615 |
}
|
621 |
}
|
Line 616... |
Line 622... |
616 |
|
622 |
|
- |
|
623 |
public void rafraichir(Object nouvellesDonnees) {
|
617 |
public void rafraichir(Object nouvellesDonnees) {
|
624 |
|
618 |
if (nouvellesDonnees instanceof Structure) {
|
625 |
if (nouvellesDonnees instanceof Structure) {
|
619 |
structure = (Structure) nouvellesDonnees;
|
626 |
structure = (Structure) nouvellesDonnees;
|
620 |
structureChargementOk = true;
|
627 |
structureChargementOk = true;
|
621 |
} else if (nouvellesDonnees instanceof ProjetListe) {
|
628 |
} else if (nouvellesDonnees instanceof ProjetListe) {
|
Line 627... |
Line 634... |
627 |
} else if (nouvellesDonnees instanceof Information) {
|
634 |
} else if (nouvellesDonnees instanceof Information) {
|
628 |
Information info = (Information) nouvellesDonnees;
|
635 |
Information info = (Information) nouvellesDonnees;
|
629 |
if (info.getType().equals("liste_structure_a_personne")) {
|
636 |
if (info.getType().equals("liste_structure_a_personne")) {
|
630 |
allouerPersonnelAStructure((StructureAPersonneListe) info.getDonnee(0));
|
637 |
allouerPersonnelAStructure((StructureAPersonneListe) info.getDonnee(0));
|
631 |
personnelChargementOk = true;
|
638 |
personnelChargementOk = true;
|
- |
|
639 |
} else if (info.getType().equals("ontologie_chargee")) {
|
- |
|
640 |
ontologieChargementOk = true;
|
632 |
}
|
641 |
}
|
633 |
} else {
|
642 |
} else {
|
634 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
643 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
635 |
}
|
644 |
}
|
636 |
if (avoirDonneesChargees()) {
|
645 |
if (avoirDonneesChargees()) {
|
637 |
afficherDetailInstitution();
|
646 |
afficherDetailInstitution();
|
638 |
}
|
647 |
}
|
639 |
}
|
648 |
}
|