1 |
package org.tela_botanica.client.vues.projet;
|
1 |
package org.tela_botanica.client.vues.projet;
|
2 |
|
2 |
|
3 |
import org.tela_botanica.client.ComposantClass;
|
3 |
import org.tela_botanica.client.ComposantClass;
|
4 |
import org.tela_botanica.client.ComposantId;
|
4 |
import org.tela_botanica.client.ComposantId;
|
5 |
import org.tela_botanica.client.Mediateur;
|
5 |
import org.tela_botanica.client.Mediateur;
|
6 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
6 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
7 |
import org.tela_botanica.client.modeles.ValeurListe;
|
7 |
import org.tela_botanica.client.modeles.ValeurListe;
|
8 |
import org.tela_botanica.client.modeles.projet.Projet;
|
8 |
import org.tela_botanica.client.modeles.projet.Projet;
|
9 |
import org.tela_botanica.client.modeles.projet.ProjetListe;
|
9 |
import org.tela_botanica.client.modeles.projet.ProjetListe;
|
10 |
import org.tela_botanica.client.synchronisation.Sequenceur;
|
10 |
import org.tela_botanica.client.synchronisation.Sequenceur;
|
- |
|
11 |
import org.tela_botanica.client.util.Debug;
|
11 |
import org.tela_botanica.client.util.UtilString;
|
12 |
import org.tela_botanica.client.util.UtilString;
|
12 |
import org.tela_botanica.client.vues.DetailVue;
|
13 |
import org.tela_botanica.client.vues.DetailVue;
|
13 |
|
14 |
|
14 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
15 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
15 |
import com.extjs.gxt.ui.client.util.Format;
|
16 |
import com.extjs.gxt.ui.client.util.Format;
|
16 |
import com.extjs.gxt.ui.client.util.Params;
|
17 |
import com.extjs.gxt.ui.client.util.Params;
|
17 |
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
18 |
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
18 |
import com.extjs.gxt.ui.client.widget.Html;
|
19 |
import com.extjs.gxt.ui.client.widget.Html;
|
19 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
20 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
20 |
import com.google.gwt.core.client.GWT;
|
21 |
import com.google.gwt.core.client.GWT;
|
21 |
|
22 |
|
22 |
public class ProjetDetailVue extends DetailVue implements Rafraichissable {
|
23 |
public class ProjetDetailVue extends DetailVue implements Rafraichissable {
|
23 |
|
24 |
|
24 |
private String enteteTpl = null;
|
25 |
private String enteteTpl = null;
|
25 |
private String contenuTpl = null;
|
26 |
private String contenuTpl = null;
|
26 |
private String indexationTpl = null;
|
27 |
private String indexationTpl = null;
|
27 |
|
28 |
|
28 |
private ContentPanel panneauPrincipal = null;
|
29 |
private ContentPanel panneauPrincipal = null;
|
29 |
private Html entete = null;
|
30 |
private Html entete = null;
|
30 |
private Html contenu = null;
|
31 |
private Html contenu = null;
|
31 |
|
32 |
|
32 |
private final String listeValeurIndexationDureeId = "dureesIndexation";
|
33 |
private final String listeValeurIndexationDureeId = "dureesIndexation";
|
33 |
private final int listeValeurIndexationDureeInt = 1072;
|
34 |
private final int listeValeurIndexationDureeInt = 1072;
|
34 |
private final String listeValeurIndexationFrequenceId = "frequencesIndexation";
|
35 |
private final String listeValeurIndexationFrequenceId = "frequencesIndexation";
|
35 |
private final int listeValeurIndexationFrequenceInt = 1073;
|
36 |
private final int listeValeurIndexationFrequenceInt = 1073;
|
36 |
private final String listeLanguesId = "langues";
|
37 |
private final String listeLanguesId = "langues";
|
37 |
private final int listeLanguesInt = 1071;
|
38 |
private final int listeLanguesInt = 1071;
|
38 |
|
39 |
|
39 |
private Projet projet = null;
|
40 |
private Projet projet = null;
|
40 |
private boolean projetChargementOk = false;
|
41 |
private boolean projetChargementOk = false;
|
41 |
private ValeurListe valeurListeIndexationDuree = null;
|
42 |
private ValeurListe valeurListeIndexationDuree = null;
|
42 |
private boolean listeIndexationDureeChargee = false;
|
43 |
private boolean listeIndexationDureeChargee = false;
|
43 |
private ValeurListe valeurListeIndexationFrequence = null;
|
44 |
private ValeurListe valeurListeIndexationFrequence = null;
|
44 |
private boolean listeIndexationFrequenceChargee = false;
|
45 |
private boolean listeIndexationFrequenceChargee = false;
|
45 |
private ValeurListe valeurListeLangue = null;
|
46 |
private ValeurListe valeurListeLangue = null;
|
46 |
private boolean listeLangueChargee = false;
|
47 |
private boolean listeLangueChargee = false;
|
47 |
|
48 |
|
48 |
private Sequenceur sequenceur;
|
49 |
private Sequenceur sequenceur;
|
49 |
|
50 |
|
50 |
public ProjetDetailVue(Mediateur mediateurCourant, Sequenceur sequenceur) {
|
51 |
public ProjetDetailVue(Mediateur mediateurCourant, Sequenceur sequenceur) {
|
51 |
super(mediateurCourant);
|
52 |
super(mediateurCourant);
|
52 |
this.sequenceur = sequenceur;
|
53 |
this.sequenceur = sequenceur;
|
53 |
|
54 |
|
54 |
initialiserTousLesTpl();
|
55 |
initialiserTousLesTpl();
|
55 |
|
56 |
|
56 |
panneauPrincipal = new ContentPanel();
|
57 |
panneauPrincipal = new ContentPanel();
|
57 |
panneauPrincipal.setLayout(new FitLayout());
|
58 |
panneauPrincipal.setLayout(new FitLayout());
|
58 |
panneauPrincipal.setHeaderVisible(false);
|
59 |
panneauPrincipal.setHeaderVisible(false);
|
59 |
panneauPrincipal.setBodyBorder(false);
|
60 |
panneauPrincipal.setBodyBorder(false);
|
60 |
panneauPrincipal.setScrollMode(Scroll.AUTO);
|
61 |
panneauPrincipal.setScrollMode(Scroll.AUTO);
|
61 |
|
62 |
|
62 |
entete = new Html();
|
63 |
entete = new Html();
|
63 |
entete.setId(ComposantId.ZONE_DETAIL_ENTETE);
|
64 |
entete.setId(ComposantId.ZONE_DETAIL_ENTETE);
|
64 |
panneauPrincipal.setTopComponent(entete);
|
65 |
panneauPrincipal.setTopComponent(entete);
|
65 |
|
66 |
|
66 |
contenu = new Html();
|
67 |
contenu = new Html();
|
67 |
panneauPrincipal.add(contenu);
|
68 |
panneauPrincipal.add(contenu);
|
68 |
|
69 |
|
69 |
add(panneauPrincipal);
|
70 |
add(panneauPrincipal);
|
70 |
|
71 |
|
71 |
mediateurCourant.obtenirListeValeurEtRafraichir(this, listeValeurIndexationDureeId, sequenceur);
|
72 |
mediateurCourant.obtenirListeValeurEtRafraichir(this, listeValeurIndexationDureeId, sequenceur);
|
72 |
mediateurCourant.obtenirListeValeurEtRafraichir(this, listeValeurIndexationFrequenceId, sequenceur);
|
73 |
mediateurCourant.obtenirListeValeurEtRafraichir(this, listeValeurIndexationFrequenceId, sequenceur);
|
73 |
mediateurCourant.obtenirListeValeurEtRafraichir(this, listeLanguesId, sequenceur);
|
74 |
mediateurCourant.obtenirListeValeurEtRafraichir(this, listeLanguesId, sequenceur);
|
74 |
}
|
75 |
}
|
75 |
|
76 |
|
76 |
private void initialiserTousLesTpl() {
|
77 |
private void initialiserTousLesTpl() {
|
77 |
initialiserEnteteHtmlTpl();
|
78 |
initialiserEnteteHtmlTpl();
|
78 |
initialiserGeneralTpl();
|
79 |
initialiserGeneralTpl();
|
79 |
initialiserIndexationTpl();
|
80 |
initialiserIndexationTpl();
|
80 |
}
|
81 |
}
|
81 |
|
82 |
|
82 |
private void initialiserEnteteHtmlTpl() {
|
83 |
private void initialiserEnteteHtmlTpl() {
|
83 |
enteteTpl =
|
84 |
enteteTpl =
|
84 |
"<div id='{css_id}'>"+
|
85 |
"<div id='{css_id}'>"+
|
85 |
" <h1>{projet}</h1>"+
|
86 |
" <h1>{projet}</h1>"+
|
86 |
" <h2>{abreviation} <span class='{css_meta}'>{projet} <br /> {i18n_id}:{id} - {guid}</span></h2>" +
|
87 |
" <h2>{abreviation} <span class='{css_meta}'>{projet} <br /> {i18n_id}:{id} - {guid}</span></h2>" +
|
87 |
"</div>";
|
88 |
"</div>";
|
88 |
}
|
89 |
}
|
89 |
|
90 |
|
90 |
private void initialiserGeneralTpl() {
|
91 |
private void initialiserGeneralTpl() {
|
91 |
contenuTpl =
|
92 |
contenuTpl =
|
92 |
"<div class='{css_corps}'>"+
|
93 |
"<div class='{css_corps}'>"+
|
93 |
" <div class='{css_fieldset}'>"+
|
94 |
" <div class='{css_fieldset}'>"+
|
94 |
" <h2>{i18n_titre_info_generale}</h2>"+
|
95 |
" <h2>{i18n_titre_info_generale}</h2>"+
|
95 |
" <span class='{css_label}'>{i18n_nom} :</span> {nom}<br />"+
|
96 |
" <span class='{css_label}'>{i18n_nom} :</span> {nom}<br />"+
|
96 |
" <span class='{css_label}'>{i18n_abreviation} :</span> {abreviation}<br />"+
|
97 |
" <span class='{css_label}'>{i18n_abreviation} :</span> {abreviation}<br />"+
|
97 |
" <span class='{css_label}'>{i18n_resume} :</span> {resume}<br />"+
|
98 |
" <span class='{css_label}'>{i18n_resume} :</span> {resume}<br />"+
|
98 |
" <span class='{css_label}'>{i18n_description} :</span> {description}<br />"+
|
99 |
" <span class='{css_label}'>{i18n_description} :</span> {description}<br />"+
|
99 |
" <span class='{css_label}'>{i18n_url} :</span> <a class='{css_lien_ext}' href='{url}' onclick='window.open(this.href); return false;'>{url}</a><br />"+
|
100 |
" <span class='{css_label}'>{i18n_url} :</span> <a class='{css_lien_ext}' href='{url}' onclick='window.open(this.href); return false;'>{url}</a><br />"+
|
100 |
" </div>"+
|
101 |
" </div>"+
|
101 |
" <div class='{css_fieldset}'>"+
|
102 |
" <div class='{css_fieldset}'>"+
|
102 |
" <h2>{i18n_titre_complement}</h2>"+
|
103 |
" <h2>{i18n_titre_complement}</h2>"+
|
103 |
" <span class='{css_label}'>{i18n_mot_cles} :</span> {mot_cles}<br />"+
|
104 |
" <span class='{css_label}'>{i18n_mot_cles} :</span> {mot_cles}<br />"+
|
104 |
" <span class='{css_label}'>{i18n_citation} :</span> {citation}<br />"+
|
105 |
" <span class='{css_label}'>{i18n_citation} :</span> {citation}<br />"+
|
105 |
" <span class='{css_label}'>{i18n_licence} :</span> {licence}<br />"+
|
106 |
" <span class='{css_label}'>{i18n_licence} :</span> {licence}<br />"+
|
106 |
" <span class='{css_label}'>{i18n_langue} :</span> {langue}<br />"+
|
107 |
" <span class='{css_label}'>{i18n_langue} :</span> {langue}<br />"+
|
107 |
" </div>"+
|
108 |
" </div>"+
|
108 |
" <hr class='{css_clear}'/>"+
|
109 |
" <hr class='{css_clear}'/>"+
|
109 |
" <div class='{css_fieldset}'>"+
|
110 |
" <div class='{css_fieldset}'>"+
|
110 |
" <h2>{i18n_titre_indexation}</h2>"+
|
111 |
" <h2>{i18n_titre_indexation}</h2>"+
|
111 |
" <span class='{css_label}'>{i18n_mark_public} :</span> {mark_public}<br />"+
|
112 |
" <span class='{css_label}'>{i18n_mark_public} :</span> {mark_public}<br />"+
|
112 |
" {indexation}"+
|
113 |
" {indexation}"+
|
113 |
" </div>"+
|
114 |
" </div>"+
|
114 |
"</div>";
|
115 |
"</div>";
|
115 |
}
|
116 |
}
|
116 |
|
117 |
|
117 |
private void initialiserIndexationTpl() {
|
118 |
private void initialiserIndexationTpl() {
|
118 |
indexationTpl =
|
119 |
indexationTpl =
|
119 |
" <span class='{css_label}'>{i18n_indexation_heure} :</span> {indexation_heure}<br />"+
|
120 |
" <span class='{css_label}'>{i18n_indexation_heure} :</span> {indexation_heure}<br />"+
|
120 |
" <span class='{css_label}'>{i18n_indexation_duree} :</span> {indexation_duree}<br />"+
|
121 |
" <span class='{css_label}'>{i18n_indexation_duree} :</span> {indexation_duree}<br />"+
|
121 |
" <span class='{css_label}'>{i18n_indexation_frequence} :</span> {indexation_frequence}<br />";
|
122 |
" <span class='{css_label}'>{i18n_indexation_frequence} :</span> {indexation_frequence}<br />";
|
122 |
}
|
123 |
}
|
123 |
|
124 |
|
124 |
public void afficherDetail() {
|
125 |
public void afficherDetail() {
|
125 |
if (projet != null) {
|
126 |
if (projet != null) {
|
126 |
afficherEntete();
|
127 |
afficherEntete();
|
127 |
afficherDetailProjet();
|
128 |
afficherDetailProjet();
|
128 |
}
|
129 |
};
|
129 |
layout();
|
130 |
layout();
|
130 |
}
|
131 |
}
|
131 |
|
132 |
|
132 |
private void afficherEntete() {
|
133 |
private void afficherEntete() {
|
133 |
Params enteteParams = new Params();
|
134 |
Params enteteParams = new Params();
|
134 |
enteteParams.set("css_id", ComposantId.ZONE_DETAIL_ENTETE);
|
135 |
enteteParams.set("css_id", ComposantId.ZONE_DETAIL_ENTETE);
|
135 |
enteteParams.set("css_meta", ComposantClass.META);
|
136 |
enteteParams.set("css_meta", ComposantClass.META);
|
136 |
|
137 |
|
137 |
enteteParams.set("i18n_id", i18nC.id());
|
138 |
enteteParams.set("i18n_id", i18nC.id());
|
138 |
|
139 |
|
139 |
enteteParams.set("id", projet.getId());
|
140 |
enteteParams.set("id", projet.getId());
|
140 |
enteteParams.set("guid", getGuid());
|
141 |
enteteParams.set("guid", getGuid());
|
141 |
enteteParams.set("projet", construireTxtProjet(projet.getId()));
|
142 |
enteteParams.set("projet", construireTxtProjet(projet.getId()));
|
142 |
enteteParams.set("abreviation", projet.getAbreviation());
|
143 |
enteteParams.set("abreviation", projet.getAbreviation());
|
143 |
|
144 |
|
144 |
String eHtml = Format.substitute(enteteTpl, enteteParams);
|
145 |
String eHtml = Format.substitute(enteteTpl, enteteParams);
|
145 |
entete.getElement().setInnerHTML(eHtml);
|
146 |
entete.getElement().setInnerHTML(eHtml);
|
146 |
}
|
147 |
}
|
147 |
|
148 |
|
148 |
public String getGuid() {
|
149 |
public String getGuid() {
|
149 |
String guid = "URN:tela-botanica.org:";
|
150 |
String guid = "URN:tela-botanica.org:";
|
150 |
guid += "coel"+projet.getId()+":";
|
151 |
guid += "coel"+projet.getId()+":";
|
151 |
guid += "pro"+projet.getId();
|
152 |
guid += "pro"+projet.getId();
|
152 |
return guid;
|
153 |
return guid;
|
153 |
}
|
154 |
}
|
154 |
|
155 |
|
155 |
public void afficherDetailProjet() {
|
156 |
public void afficherDetailProjet() {
|
156 |
Params contenuParams = new Params();
|
157 |
Params contenuParams = new Params();
|
157 |
|
158 |
|
158 |
contenuParams.set("i18n_titre_info_generale", i18nC.projetTitreInfoGenerale());
|
159 |
contenuParams.set("i18n_titre_info_generale", i18nC.projetTitreInfoGenerale());
|
159 |
|
160 |
|
160 |
contenuParams.set("i18n_nom", i18nC.nom());
|
161 |
contenuParams.set("i18n_nom", i18nC.nom());
|
161 |
contenuParams.set("nom", projet.getNom());
|
162 |
contenuParams.set("nom", projet.getNom());
|
162 |
|
163 |
|
163 |
contenuParams.set("i18n_abreviation", i18nC.projetAbreviation());
|
164 |
contenuParams.set("i18n_abreviation", i18nC.projetAbreviation());
|
164 |
contenuParams.set("abreviation", projet.getAbreviation());
|
165 |
contenuParams.set("abreviation", projet.getAbreviation());
|
165 |
|
166 |
|
166 |
contenuParams.set("i18n_resume", i18nC.projetResume());
|
167 |
contenuParams.set("i18n_resume", i18nC.projetResume());
|
167 |
contenuParams.set("resume", projet.getResume());
|
168 |
contenuParams.set("resume", projet.getResume());
|
168 |
|
169 |
|
169 |
contenuParams.set("i18n_description", i18nC.projetDescription());
|
170 |
contenuParams.set("i18n_description", i18nC.projetDescription());
|
170 |
contenuParams.set("description", projet.getDescription());
|
171 |
contenuParams.set("description", projet.getDescription());
|
171 |
|
172 |
|
172 |
contenuParams.set("i18n_url", i18nC.projetUrl());
|
173 |
contenuParams.set("i18n_url", i18nC.projetUrl());
|
173 |
contenuParams.set("url", projet.getUrl());
|
174 |
contenuParams.set("url", projet.getUrl());
|
174 |
|
175 |
|
175 |
contenuParams.set("i18n_titre_complement", i18nC.projetTitreComplement());
|
176 |
contenuParams.set("i18n_titre_complement", i18nC.projetTitreComplement());
|
176 |
|
177 |
|
177 |
contenuParams.set("i18n_mot_cles", i18nC.projetMotsCles());
|
178 |
contenuParams.set("i18n_mot_cles", i18nC.projetMotsCles());
|
178 |
contenuParams.set("mot_cles", projet.getMotsCles());
|
179 |
contenuParams.set("mot_cles", projet.getMotsCles());
|
179 |
|
180 |
|
180 |
contenuParams.set("i18n_citation", i18nC.projetCitation());
|
181 |
contenuParams.set("i18n_citation", i18nC.projetCitation());
|
181 |
contenuParams.set("citation", projet.getCitation());
|
182 |
contenuParams.set("citation", projet.getCitation());
|
182 |
|
183 |
|
183 |
contenuParams.set("i18n_licence", i18nC.projetLicence());
|
184 |
contenuParams.set("i18n_licence", i18nC.projetLicence());
|
184 |
contenuParams.set("licence", projet.getLicence());
|
185 |
contenuParams.set("licence", projet.getLicence());
|
185 |
|
186 |
|
186 |
contenuParams.set("i18n_langue", i18nC.projetLangue());
|
187 |
contenuParams.set("i18n_langue", i18nC.projetLangue());
|
187 |
contenuParams.set("langue", obtenirValeurLangue(projet.getLangue()));
|
188 |
contenuParams.set("langue", obtenirValeurLangue(projet.getLangue()));
|
188 |
|
189 |
|
189 |
contenuParams.set("i18n_titre_indexation", i18nC.projetTitreIndexation());
|
190 |
contenuParams.set("i18n_titre_indexation", i18nC.projetTitreIndexation());
|
190 |
|
191 |
|
191 |
contenuParams.set("i18n_mark_public", i18nC.projetMarkPublic());
|
192 |
contenuParams.set("i18n_mark_public", i18nC.projetMarkPublic());
|
192 |
contenuParams.set("mark_public", obtenirValeurPublic(projet.getMarkPublic()));
|
193 |
contenuParams.set("mark_public", obtenirValeurPublic(projet.getMarkPublic()));
|
193 |
|
194 |
|
194 |
contenuParams.set("indexation", creerIndexation());
|
195 |
contenuParams.set("indexation", creerIndexation());
|
195 |
|
196 |
|
196 |
String gHtml = formaterContenu(contenuTpl, contenuParams);
|
197 |
String gHtml = formaterContenu(contenuTpl, contenuParams);
|
197 |
contenu.getElement().setInnerHTML(gHtml);
|
198 |
contenu.getElement().setInnerHTML(gHtml);
|
198 |
}
|
199 |
}
|
199 |
|
200 |
|
200 |
private String corrigerIndexationHeure(String heureMinuteSecondeEnBdd) {
|
201 |
private String corrigerIndexationHeure(String heureMinuteSecondeEnBdd) {
|
201 |
String heureMinute = "";
|
202 |
String heureMinute = "";
|
202 |
if (!UtilString.isEmpty(heureMinuteSecondeEnBdd)) {
|
203 |
if (!UtilString.isEmpty(heureMinuteSecondeEnBdd)) {
|
203 |
heureMinute = heureMinuteSecondeEnBdd.replaceAll(":00$", "");
|
204 |
heureMinute = heureMinuteSecondeEnBdd.replaceAll(":00$", "");
|
204 |
}
|
205 |
}
|
205 |
return heureMinute;
|
206 |
return heureMinute;
|
206 |
}
|
207 |
}
|
207 |
|
208 |
|
208 |
private String creerIndexation() {
|
209 |
private String creerIndexation() {
|
209 |
String html = "";
|
210 |
String html = "";
|
210 |
if (projet.getMarkPublic().equals("1")) {
|
211 |
if (projet.getMarkPublic().equals("1")) {
|
211 |
Params indexationParams = new Params();
|
212 |
Params indexationParams = new Params();
|
212 |
|
213 |
|
213 |
indexationParams.set("i18n_indexation_heure", i18nC.projetIndexationHeure());
|
214 |
indexationParams.set("i18n_indexation_heure", i18nC.projetIndexationHeure());
|
214 |
indexationParams.set("indexation_heure", corrigerIndexationHeure(projet.getIndexationHeure()));
|
215 |
indexationParams.set("indexation_heure", corrigerIndexationHeure(projet.getIndexationHeure()));
|
215 |
|
216 |
|
216 |
indexationParams.set("i18n_indexation_duree", i18nC.projetIndexationDuree());
|
217 |
indexationParams.set("i18n_indexation_duree", i18nC.projetIndexationDuree());
|
217 |
indexationParams.set("indexation_duree", obtenirValeurIndexationDuree(projet.getIndexationDuree()));
|
218 |
indexationParams.set("indexation_duree", obtenirValeurIndexationDuree(projet.getIndexationDuree()));
|
218 |
|
219 |
|
219 |
indexationParams.set("i18n_indexation_frequence", i18nC.projetIndexationFrequence());
|
220 |
indexationParams.set("i18n_indexation_frequence", i18nC.projetIndexationFrequence());
|
220 |
indexationParams.set("indexation_frequence", obtenirValeurIndexationFrequence(projet.getIndexationFreq()));
|
221 |
indexationParams.set("indexation_frequence", obtenirValeurIndexationFrequence(projet.getIndexationFreq()));
|
221 |
|
222 |
|
222 |
html = Format.substitute(indexationTpl, indexationParams);
|
223 |
html = Format.substitute(indexationTpl, indexationParams);
|
223 |
}
|
224 |
}
|
224 |
return html;
|
225 |
return html;
|
225 |
}
|
226 |
}
|
226 |
|
227 |
|
227 |
public void rafraichir(Object nouvellesDonnees) {
|
228 |
public void rafraichir(Object nouvellesDonnees) {
|
228 |
if (nouvellesDonnees instanceof Projet) {
|
229 |
if (nouvellesDonnees instanceof Projet) {
|
- |
|
230 |
if (Mediateur.DEBUG) System.out.println("|| ProjetDetailVue > Réception d'un Projet");
|
229 |
projet = (Projet) nouvellesDonnees;
|
231 |
projet = (Projet) nouvellesDonnees;
|
230 |
projetChargementOk = true;
|
232 |
projetChargementOk = true;
|
231 |
} else if (nouvellesDonnees instanceof ProjetListe) {
|
233 |
} else if (nouvellesDonnees instanceof ProjetListe) {
|
- |
|
234 |
if (Mediateur.DEBUG) System.out.println("|| ProjetDetailVue > Réception d'une ProjetListe");
|
232 |
projets = (ProjetListe) nouvellesDonnees;
|
235 |
projets = (ProjetListe) nouvellesDonnees;
|
233 |
projetsChargementOk = true;
|
236 |
projetsChargementOk = true;
|
234 |
} else if(nouvellesDonnees instanceof ValeurListe) {
|
237 |
} else if(nouvellesDonnees instanceof ValeurListe) {
|
- |
|
238 |
if (Mediateur.DEBUG) System.out.println("|| ProjetDetailVue > Réception d'une ValeurListe");
|
- |
|
239 |
|
235 |
ValeurListe nValeurListe = (ValeurListe)nouvellesDonnees;
|
240 |
ValeurListe nValeurListe = (ValeurListe)nouvellesDonnees;
|
236 |
|
241 |
|
237 |
if (nValeurListe.getId() == listeValeurIndexationDureeInt) {
|
242 |
if (nValeurListe.getId() == listeValeurIndexationDureeInt) {
|
238 |
valeurListeIndexationDuree = (ValeurListe)nouvellesDonnees;
|
243 |
valeurListeIndexationDuree = (ValeurListe)nouvellesDonnees;
|
239 |
listeIndexationDureeChargee = true;
|
244 |
listeIndexationDureeChargee = true;
|
240 |
}
|
245 |
}
|
241 |
|
246 |
|
242 |
if (nValeurListe.getId() == listeValeurIndexationFrequenceInt) {
|
247 |
if (nValeurListe.getId() == listeValeurIndexationFrequenceInt) {
|
243 |
valeurListeIndexationFrequence = (ValeurListe)nouvellesDonnees;
|
248 |
valeurListeIndexationFrequence = (ValeurListe)nouvellesDonnees;
|
244 |
listeIndexationFrequenceChargee = true;
|
249 |
listeIndexationFrequenceChargee = true;
|
245 |
}
|
250 |
}
|
246 |
|
251 |
|
247 |
if (nValeurListe.getId() == listeLanguesInt) {
|
252 |
if (nValeurListe.getId() == listeLanguesInt) {
|
248 |
valeurListeLangue = (ValeurListe)nouvellesDonnees;
|
253 |
valeurListeLangue = (ValeurListe)nouvellesDonnees;
|
249 |
listeLangueChargee = true;
|
254 |
listeLangueChargee = true;
|
250 |
}
|
255 |
}
|
251 |
} else {
|
256 |
} else {
|
252 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
257 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
253 |
}
|
258 |
}
|
254 |
|
259 |
|
255 |
if (avoirDonneesChargees()) {
|
260 |
if (avoirDonneesChargees()) {
|
256 |
afficherDetail();
|
261 |
afficherDetail();
|
257 |
}
|
262 |
}
|
258 |
}
|
263 |
}
|
259 |
|
264 |
|
260 |
private boolean avoirDonneesChargees() {
|
265 |
private boolean avoirDonneesChargees() {
|
261 |
boolean ok = false;
|
266 |
boolean ok = false;
|
262 |
if (projetsChargementOk && projetChargementOk && listeIndexationDureeChargee && listeIndexationFrequenceChargee && listeLangueChargee) {
|
267 |
if (projetsChargementOk && projetChargementOk && listeIndexationDureeChargee && listeIndexationFrequenceChargee && listeLangueChargee) {
|
263 |
ok = true;
|
268 |
ok = true;
|
264 |
}
|
269 |
}
|
265 |
return ok;
|
270 |
return ok;
|
266 |
}
|
271 |
}
|
267 |
|
272 |
|
268 |
private String obtenirValeurIndexationDuree(String id) {
|
273 |
private String obtenirValeurIndexationDuree(String id) {
|
269 |
if (valeurListeIndexationDuree.get(id) != null) {
|
274 |
if (valeurListeIndexationDuree.get(id) != null) {
|
270 |
return valeurListeIndexationDuree.get(id).getNom();
|
275 |
return valeurListeIndexationDuree.get(id).getNom();
|
271 |
}
|
276 |
}
|
272 |
return "";
|
277 |
return "";
|
273 |
}
|
278 |
}
|
274 |
|
279 |
|
275 |
private String obtenirValeurIndexationFrequence(String id) {
|
280 |
private String obtenirValeurIndexationFrequence(String id) {
|
276 |
if (valeurListeIndexationFrequence.get(id) != null) {
|
281 |
if (valeurListeIndexationFrequence.get(id) != null) {
|
277 |
return valeurListeIndexationFrequence.get(id).getNom();
|
282 |
return valeurListeIndexationFrequence.get(id).getNom();
|
278 |
}
|
283 |
}
|
279 |
return "";
|
284 |
return "";
|
280 |
}
|
285 |
}
|
281 |
|
286 |
|
282 |
private String obtenirValeurLangue(String id) {
|
287 |
private String obtenirValeurLangue(String id) {
|
283 |
if (valeurListeLangue.get(id) != null) {
|
288 |
if (valeurListeLangue.get(id) != null) {
|
284 |
return valeurListeLangue.get(id).getNom();
|
289 |
return valeurListeLangue.get(id).getNom();
|
285 |
}
|
290 |
}
|
286 |
return "";
|
291 |
return "";
|
287 |
}
|
292 |
}
|
288 |
|
293 |
|
289 |
private String obtenirValeurPublic(String ouiNon) {
|
294 |
private String obtenirValeurPublic(String ouiNon) {
|
290 |
if (ouiNon.equals("1")) {
|
295 |
if (ouiNon.equals("1")) {
|
291 |
return i18nC.oui();
|
296 |
return i18nC.oui();
|
292 |
}
|
297 |
}
|
293 |
return i18nC.non();
|
298 |
return i18nC.non();
|
294 |
}
|
299 |
}
|
295 |
}
|
300 |
}
|