Subversion Repositories eFlore/Applications.del

Rev

Rev 1467 | Rev 1501 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1467 Rev 1496
1
package org.tela_botanica.del.client.cache;
1
package org.tela_botanica.del.client.cache;
2
 
2
 
3
import java.util.Arrays;
3
import java.util.Arrays;
4
import java.util.List;
4
import java.util.List;
5
 
5
 
6
import org.tela_botanica.del.client.config.Config;
6
import org.tela_botanica.del.client.config.Config;
7
import org.tela_botanica.del.client.gestionhistorique.ConstantesNavigation;
7
import org.tela_botanica.del.client.gestionhistorique.ConstantesNavigation;
8
import org.tela_botanica.del.client.modeles.Image;
8
import org.tela_botanica.del.client.modeles.Image;
9
import org.tela_botanica.del.client.modeles.InformationsRecherche;
9
import org.tela_botanica.del.client.modeles.InformationsRecherche;
-
 
10
import org.tela_botanica.del.client.modeles.ModeTri;
10
import org.tela_botanica.del.client.modeles.Observation;
11
import org.tela_botanica.del.client.modeles.Observation;
11
import org.tela_botanica.del.client.modeles.Protocole;
12
import org.tela_botanica.del.client.modeles.Protocole;
12
import org.tela_botanica.del.client.modeles.Utilisateur;
13
import org.tela_botanica.del.client.modeles.Utilisateur;
13
 
14
 
14
import com.google.gwt.core.client.GWT;
15
import com.google.gwt.core.client.GWT;
15
import com.google.gwt.user.client.Window;
16
import com.google.gwt.user.client.Window;
16
import com.google.gwt.user.client.Window.Location;
17
import com.google.gwt.user.client.Window.Location;
17
 
18
 
18
public class CacheClient {
19
public class CacheClient {
19
 
20
 
20
	private List<Protocole> listeProtocoles;
21
	private List<Protocole> listeProtocoles;
21
	
22
	
22
	private String home = ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS;
23
	private String home = ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS;
23
	private Observation observationCourante;
24
	private Observation observationCourante;
24
	private Image imageCourante;
25
	private Image imageCourante;
25
	private String taxonPourRechercheEflore;
26
	private String taxonPourRechercheEflore;
26
	private Protocole protocoleCourant;
27
	private Protocole protocoleCourant;
27
	private String referentielCourant;
28
	private String referentielCourant;
28
	private int numPageRechercheImage = 0;
29
	private int numPageRechercheImage = 0;
29
	private int nbTotalImagesRecherchees = 0;
30
	private int nbTotalImagesRecherchees = 0;
30
	
31
	
31
	private boolean referentielNonModifiable = false;
32
	private boolean referentielNonModifiable = false;
32
 
33
 
33
	private int pasPagination = 12;
34
	private int pasPagination = 12;
34
	private int pageCouranteRechercheImage = 1;
35
	private int pageCouranteRechercheImage = 1;
35
	private int pageCouranteRechercheObservations = 1;
36
	private int pageCouranteRechercheObservations = 1;
36
	private InformationsRecherche informationsRechercheImage;
37
	private InformationsRecherche informationsRechercheImage;
37
	private InformationsRecherche informationsRechercheObservation;
38
	private InformationsRecherche informationsRechercheObservation;
38
	private Utilisateur utilisateur;
39
	private Utilisateur utilisateur;
39
	private String pageCourante = home;
40
	private String pageCourante = home;
40
	private String statut;
41
	private String statut;
41
	private String[] statutsPossibles = {ConstantesNavigation.PARAM_TYPE_TOUS, 
42
	private String[] statutsPossibles = {ConstantesNavigation.PARAM_TYPE_TOUS, 
42
										ConstantesNavigation.PARAM_TYPE_A_DETERMINER,
43
										ConstantesNavigation.PARAM_TYPE_A_DETERMINER,
43
										ConstantesNavigation.PARAM_TYPE_EN_DISCUSSION,
44
										ConstantesNavigation.PARAM_TYPE_EN_DISCUSSION,
44
										ConstantesNavigation.PARAM_TYPE_VALIDEES};
45
										ConstantesNavigation.PARAM_TYPE_VALIDEES};
45
	
46
	
46
	public void supprimerFiltreStatut() {
47
	public void supprimerFiltreStatut() {
47
		this.statut = null;
48
		this.statut = null;
48
	}
49
	}
49
	
50
	
50
	public void setFiltreStatut(String statut) {
51
	public void setFiltreStatut(String statut) {
51
		this.statut = statut;
52
		this.statut = statut;
52
	}
53
	}
53
	
54
	
54
	public String getFiltreStatut() {
55
	public String getFiltreStatut() {
55
		return this.statut;
56
		return this.statut;
56
	}
57
	}
57
	
58
	
58
	public String getPageCourante() {
59
	public String getPageCourante() {
59
		return pageCourante;
60
		return pageCourante;
60
	}
61
	}
61
 
62
 
62
	public void setPageCourante(String pageCourante) {
63
	public void setPageCourante(String pageCourante) {
63
		this.pageCourante = pageCourante;
64
		this.pageCourante = pageCourante;
64
	}
65
	}
65
 
66
 
66
	private static CacheClient instance;
67
	private static CacheClient instance;
67
 
68
 
68
	private CacheClient() {
69
	private CacheClient() {
69
		instance = this;
70
		instance = this;
70
	}
71
	}
71
 
72
 
72
	public void initialiserAvecParametres() {
73
	public void initialiserAvecParametres() {
73
		String rechercheLibre = Location.getParameter("masque");
74
		String rechercheLibre = Location.getParameter("masque");
74
		String famille = Location.getParameter("masque.famille");
75
		String famille = Location.getParameter("masque.famille");
75
		String taxon = Location.getParameter("masque.ns");
76
		String taxon = Location.getParameter("masque.ns");
76
		String genre = Location.getParameter("masque.genre");
77
		String genre = Location.getParameter("masque.genre");
77
		String commune = Location.getParameter("masque.commune");
78
		String commune = Location.getParameter("masque.commune");
78
		String dept = Location.getParameter("masque.departement");
79
		String dept = Location.getParameter("masque.departement");
79
		String auteur = Location.getParameter("masque.auteur");
80
		String auteur = Location.getParameter("masque.auteur");
80
		String date = Location.getParameter("masque.date");
81
		String date = Location.getParameter("masque.date");
81
		String tag = Location.getParameter("masque.tag");
82
		String tag = Location.getParameter("masque.tag");
82
		String tagCel = Location.getParameter("masque.tag_cel");
83
		String tagCel = Location.getParameter("masque.tag_cel");
83
		String tagDel = Location.getParameter("masque.tag_pictoflora");
84
		String tagDel = Location.getParameter("masque.tag_pictoflora");
84
		String referentiel = Location.getParameter("masque.referentiel");
85
		String referentiel = Location.getParameter("masque.referentiel");
85
		
86
		
86
		String statutParam = Location.getParameter("masque.type");
87
		String statutParam = Location.getParameter("masque.type");
87
		
88
		
88
		InformationsRecherche rechercheParArguments = new InformationsRecherche();
89
		InformationsRecherche rechercheParArguments = new InformationsRecherche();
89
		rechercheParArguments.setRechercheLibre(rechercheLibre);
90
		rechercheParArguments.setRechercheLibre(rechercheLibre);
90
		rechercheParArguments.setFamille(famille);
91
		rechercheParArguments.setFamille(famille);
91
		rechercheParArguments.setTaxon(taxon);
92
		rechercheParArguments.setTaxon(taxon);
92
		rechercheParArguments.setGenre(genre);
93
		rechercheParArguments.setGenre(genre);
93
		rechercheParArguments.setCommune(commune);
94
		rechercheParArguments.setCommune(commune);
94
		rechercheParArguments.setDepartement(dept);
95
		rechercheParArguments.setDepartement(dept);
95
		rechercheParArguments.setAuteur(auteur);
96
		rechercheParArguments.setAuteur(auteur);
96
		rechercheParArguments.setDate(date);
97
		rechercheParArguments.setDate(date);
97
		rechercheParArguments.setTag(tag);
98
		rechercheParArguments.setTag(tag);
98
		if(pageCourante.equals(ConstantesNavigation.PAGE_RECHERCHE_IMAGES)) {
99
		if(pageCourante.equals(ConstantesNavigation.PAGE_RECHERCHE_IMAGES)) {
99
			rechercheParArguments.setMotClefCel(tagCel);
100
			rechercheParArguments.setMotClefCel(tagCel);
100
			rechercheParArguments.setMotClefDel(tagDel);
101
			rechercheParArguments.setMotClefDel(tagDel);
101
		}
102
		}
-
 
103
		
-
 
104
		
-
 
105
		String tri = Location.getParameter("tri");		
-
 
106
		String ordre = Location.getParameter("ordre");
-
 
107
		
-
 
108
		if(tri != null) {
-
 
109
			ModeTri modeTri = ModeTri.TRI_ASCENDANT;
-
 
110
			if(ordre.equals("asc")) {
-
 
111
				modeTri = ModeTri.TRI_ASCENDANT;
-
 
112
			}
-
 
113
			
-
 
114
			if(ordre.equals("desc")) {
-
 
115
				modeTri = ModeTri.TRI_DESCENDANT;
-
 
116
			}
-
 
117
			
-
 
118
			if(tri.equals("votes")) {
-
 
119
				rechercheParArguments.setTriParNbVotes(modeTri);
-
 
120
			}
-
 
121
			
-
 
122
			if(tri.equals("tags")) {
-
 
123
				rechercheParArguments.setTriParNbTags(modeTri);
-
 
124
			}
-
 
125
			
-
 
126
			if(tri.equals("date_observation")) {
-
 
127
				rechercheParArguments.setTriParDate(modeTri);
-
 
128
			}
-
 
129
			
-
 
130
		}
102
		
131
		
103
		rechercheParArguments.setMotClef(tag);
132
		rechercheParArguments.setMotClef(tag);
104
		
133
		
105
		// si le référentiel est passé dans l'url alors il ne doit pas être modifiable
134
		// si le référentiel est passé dans l'url alors il ne doit pas être modifiable
106
		if(referentiel != null && !referentiel.equals("")) {
135
		if(referentiel != null && !referentiel.equals("")) {
107
			setReferentielCourant(referentiel);
136
			setReferentielCourant(referentiel);
108
			rechercheParArguments.setReferentiel(referentiel);
137
			rechercheParArguments.setReferentiel(referentiel);
109
			referentielNonModifiable = true;
138
			referentielNonModifiable = true;
110
		}
139
		}
111
		
140
		
112
		if(Location.getParameterMap().size() == 0) {
141
		if(Location.getParameterMap().size() == 0) {
113
			// par défaut l'application s'ouvre sur l'onglet à déterminer
142
			// par défaut l'application s'ouvre sur l'onglet à déterminer
114
			statut = ConstantesNavigation.PARAM_TYPE_DEFAUT;
143
			statut = ConstantesNavigation.PARAM_TYPE_DEFAUT;
115
		} else {
144
		} else {
116
			if(Arrays.asList(statutsPossibles).contains(statutParam)) {
145
			if(Arrays.asList(statutsPossibles).contains(statutParam)) {
117
				statut = statutParam;
146
				statut = statutParam;
118
			} else {
147
			} else {
119
				statut = ConstantesNavigation.PARAM_TYPE_DEFAUT;
148
				statut = ConstantesNavigation.PARAM_TYPE_DEFAUT;
120
			}
149
			}
121
		}
150
		}
122
		
151
		
123
		informationsRechercheImage = rechercheParArguments;
152
		informationsRechercheImage = rechercheParArguments;
124
		informationsRechercheObservation = rechercheParArguments;
153
		informationsRechercheObservation = rechercheParArguments;
125
	}
154
	}
126
	
155
	
127
	public Utilisateur getUtilisateur() {
156
	public Utilisateur getUtilisateur() {
128
		if (this.utilisateur == null) {
157
		if (this.utilisateur == null) {
129
			this.utilisateur = new Utilisateur(null);
158
			this.utilisateur = new Utilisateur(null, null);
130
		}
159
		}
131
		return this.utilisateur;
160
		return this.utilisateur;
132
	}
161
	}
133
	
162
	
134
	public void setUtilisateur(Utilisateur utilisateur) {
163
	public void setUtilisateur(Utilisateur utilisateur) {
135
		this.utilisateur = utilisateur; 
164
		this.utilisateur = utilisateur; 
136
	}
165
	}
137
	
166
	
138
	public void setHome(String home) {
167
	public void setHome(String home) {
139
		this.home = home;
168
		this.home = home;
140
		setPageCourante(home);
169
		setPageCourante(home);
141
	}
170
	}
142
	
171
	
143
	public String getHome() {
172
	public String getHome() {
144
		return home;
173
		return home;
145
	}
174
	}
146
	
175
	
147
	public Observation getObservationCourante() {
176
	public Observation getObservationCourante() {
148
		return observationCourante;
177
		return observationCourante;
149
	}
178
	}
150
 
179
 
151
	public void setObservationCourante(Observation observationCourante) {
180
	public void setObservationCourante(Observation observationCourante) {
152
		this.observationCourante = observationCourante;
181
		this.observationCourante = observationCourante;
153
	}
182
	}
154
 
183
 
155
	public static CacheClient getInstance() {
184
	public static CacheClient getInstance() {
156
		if (instance == null) {
185
		if (instance == null) {
157
			instance = new CacheClient();
186
			instance = new CacheClient();
158
		}
187
		}
159
		return instance;
188
		return instance;
160
	}
189
	}
161
 
190
 
162
	public String getTaxonPourRechercheEflore() {
191
	public String getTaxonPourRechercheEflore() {
163
		return taxonPourRechercheEflore;
192
		return taxonPourRechercheEflore;
164
	}
193
	}
165
 
194
 
166
	public void setTaxonPourRechercheEflore(String taxonPourRechercheEflore) {
195
	public void setTaxonPourRechercheEflore(String taxonPourRechercheEflore) {
167
		this.taxonPourRechercheEflore = taxonPourRechercheEflore;
196
		this.taxonPourRechercheEflore = taxonPourRechercheEflore;
168
	}
197
	}
169
 
198
 
170
	public int getNumPageRechercheImage() {
199
	public int getNumPageRechercheImage() {
171
		return numPageRechercheImage;
200
		return numPageRechercheImage;
172
	}
201
	}
173
 
202
 
174
	// Pour la recherche :
203
	// Pour la recherche :
175
	public int getPasPagination() {
204
	public int getPasPagination() {
176
		return pasPagination;
205
		return pasPagination;
177
	}
206
	}
178
 
207
 
179
	public void setPasPagination(int pasPagination) {
208
	public void setPasPagination(int pasPagination) {
180
		this.pasPagination = pasPagination;
209
		this.pasPagination = pasPagination;
181
	}
210
	}
182
 
211
 
183
	public void setPageCouranteRechercheImages(int pageCouranteRecherche) {
212
	public void setPageCouranteRechercheImages(int pageCouranteRecherche) {
184
		this.pageCouranteRechercheImage = pageCouranteRecherche;
213
		this.pageCouranteRechercheImage = pageCouranteRecherche;
185
	}
214
	}
186
 
215
 
187
	public int getPageCouranteRechercheImage() {
216
	public int getPageCouranteRechercheImage() {
188
		return this.pageCouranteRechercheImage;
217
		return this.pageCouranteRechercheImage;
189
	}
218
	}
190
 
219
 
191
	public void setNbTotalImagesRecherchees(int nbTotalImagesRecherchees) {
220
	public void setNbTotalImagesRecherchees(int nbTotalImagesRecherchees) {
192
		this.nbTotalImagesRecherchees = nbTotalImagesRecherchees;
221
		this.nbTotalImagesRecherchees = nbTotalImagesRecherchees;
193
	}
222
	}
194
 
223
 
195
	public int getNbTotalImagesRecherchees() {
224
	public int getNbTotalImagesRecherchees() {
196
		return this.nbTotalImagesRecherchees;
225
		return this.nbTotalImagesRecherchees;
197
	}
226
	}
198
 
227
 
199
	public Image getImageCourante() {
228
	public Image getImageCourante() {
200
		return imageCourante;
229
		return imageCourante;
201
	}
230
	}
202
 
231
 
203
	public void setImageCourante(Image imageCourante) {
232
	public void setImageCourante(Image imageCourante) {
204
		this.imageCourante = imageCourante;
233
		this.imageCourante = imageCourante;
205
	}
234
	}
206
	
235
	
207
	public void setListeProtocoles(List<Protocole> listeProtocole) {
236
	public void setListeProtocoles(List<Protocole> listeProtocole) {
208
		this.listeProtocoles = listeProtocole;
237
		this.listeProtocoles = listeProtocole;
209
	}
238
	}
210
	
239
	
211
	public List<Protocole> getListeProtocoles() {
240
	public List<Protocole> getListeProtocoles() {
212
		return this.listeProtocoles;
241
		return this.listeProtocoles;
213
	}
242
	}
214
 
243
 
215
	public Protocole getProtocoleCourant() {
244
	public Protocole getProtocoleCourant() {
216
		return protocoleCourant;
245
		return protocoleCourant;
217
	}
246
	}
218
 
247
 
219
	public void setProtocoleCourant(Protocole protocoleCourant) {
248
	public void setProtocoleCourant(Protocole protocoleCourant) {
220
		this.protocoleCourant = protocoleCourant;
249
		this.protocoleCourant = protocoleCourant;
221
	}
250
	}
222
 
251
 
223
	public InformationsRecherche getInformationsRechercheImage() {
252
	public InformationsRecherche getInformationsRechercheImage() {
224
		if(informationsRechercheImage == null) {
253
		if(informationsRechercheImage == null) {
225
			informationsRechercheImage = new InformationsRecherche();
254
			informationsRechercheImage = new InformationsRecherche();
226
		}
255
		}
227
		return informationsRechercheImage;
256
		return informationsRechercheImage;
228
	}
257
	}
229
 
258
 
230
	public InformationsRecherche getInformationsRechercheObservation() {
259
	public InformationsRecherche getInformationsRechercheObservation() {
231
		if(informationsRechercheObservation == null) {
260
		if(informationsRechercheObservation == null) {
232
			informationsRechercheObservation = new InformationsRecherche();
261
			informationsRechercheObservation = new InformationsRecherche();
233
		}
262
		}
234
		return informationsRechercheObservation;
263
		return informationsRechercheObservation;
235
	}
264
	}
236
 
265
 
237
	public void setInformationsRechercheImage(InformationsRecherche informationsRechercheImage) {
266
	public void setInformationsRechercheImage(InformationsRecherche informationsRechercheImage) {
238
		this.informationsRechercheImage = informationsRechercheImage;
267
		this.informationsRechercheImage = informationsRechercheImage;
239
	}
268
	}
240
 
269
 
241
	public void setInformationsRechercheObservation(InformationsRecherche informationsRechercheObservation) {
270
	public void setInformationsRechercheObservation(InformationsRecherche informationsRechercheObservation) {
242
		this.informationsRechercheObservation = informationsRechercheObservation;
271
		this.informationsRechercheObservation = informationsRechercheObservation;
243
	}
272
	}
244
 
273
 
245
	public int getPageCouranteRechercheObservations() {
274
	public int getPageCouranteRechercheObservations() {
246
		return pageCouranteRechercheObservations;
275
		return pageCouranteRechercheObservations;
247
	}
276
	}
248
 
277
 
249
	public void setPageCouranteRechercheObservations(int pageCouranteRechercheObservations) {
278
	public void setPageCouranteRechercheObservations(int pageCouranteRechercheObservations) {
250
		this.pageCouranteRechercheObservations = pageCouranteRechercheObservations;
279
		this.pageCouranteRechercheObservations = pageCouranteRechercheObservations;
251
	}
280
	}
252
	
281
	
253
	public void setReferentielCourant(String referentielCourant) {
282
	public void setReferentielCourant(String referentielCourant) {
254
		this.referentielCourant = referentielCourant;
283
		this.referentielCourant = referentielCourant;
255
	}
284
	}
256
	
285
	
257
	public String getReferentielCourant() {
286
	public String getReferentielCourant() {
258
		return referentielCourant;
287
		return referentielCourant;
259
	}
288
	}
260
	
289
	
261
	public void setReferentielNonModifiable(boolean referentielNonModifiable) {
290
	public void setReferentielNonModifiable(boolean referentielNonModifiable) {
262
		this.referentielNonModifiable = referentielNonModifiable;
291
		this.referentielNonModifiable = referentielNonModifiable;
263
	}
292
	}
264
	
293
	
265
	public boolean getReferentielNonModifiable() {
294
	public boolean getReferentielNonModifiable() {
266
		return referentielNonModifiable;
295
		return referentielNonModifiable;
267
	}
296
	}
268
	
297
	
269
	public String genererUrlCourante() {
298
	public String genererUrlCourante() {
270
		String url = Window.Location.getHref();
299
		String url = Window.Location.getHref();
271
		CacheClient cache = CacheClient.getInstance();
300
		CacheClient cache = CacheClient.getInstance();
272
		
301
		
273
		String arguments = "";
302
		String arguments = "";
274
		String argumentsRecherche = "";
303
		String argumentsRecherche = "";
275
		if (cache.getPageCourante().equals(ConstantesNavigation.PAGE_RECHERCHE_IMAGES)) {
304
		if (cache.getPageCourante().equals(ConstantesNavigation.PAGE_RECHERCHE_IMAGES)) {
276
			
305
			
277
			InformationsRecherche infoRecherche;
306
			InformationsRecherche infoRecherche;
278
			infoRecherche = cache.getInformationsRechercheImage();			
307
			infoRecherche = cache.getInformationsRechercheImage();			
279
			argumentsRecherche = infoRecherche.versChaineRequete();
308
			argumentsRecherche = infoRecherche.versChaineRequete();
280
			
309
			
281
			if(!GWT.isScript()) {
310
			if(!GWT.isScript()) {
282
				argumentsRecherche += "&gwt.codesvr="+Location.getParameter("gwt.codesvr")+"";
311
				argumentsRecherche += "&gwt.codesvr="+Location.getParameter("gwt.codesvr")+"";
283
			}
312
			}
284
			
313
			
285
			argumentsRecherche = (argumentsRecherche.isEmpty()) ? argumentsRecherche : "?" + argumentsRecherche;
314
			argumentsRecherche = (argumentsRecherche.isEmpty()) ? argumentsRecherche : "?" + argumentsRecherche;
286
			arguments = argumentsRecherche + "#" + ConstantesNavigation.PAGE_RECHERCHE_IMAGES;
315
			arguments = argumentsRecherche + "#" + ConstantesNavigation.PAGE_RECHERCHE_IMAGES;
287
			url = new Config().getUrl("del") + arguments;
316
			url = new Config().getUrl("del") + arguments;
288
 
317
 
289
			if (CacheClient.getInstance().getProtocoleCourant() != null) {
318
			if (CacheClient.getInstance().getProtocoleCourant() != null) {
290
				url += "~"+String.valueOf(CacheClient.getInstance().getProtocoleCourant().getId());
319
				url += "~"+String.valueOf(CacheClient.getInstance().getProtocoleCourant().getId());
291
			}
320
			}
292
		} else if (cache.getPageCourante().equals(ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS) || cache.getPageCourante().equals("")) {
321
		} else if (cache.getPageCourante().equals(ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS) || cache.getPageCourante().equals("")) {
293
			
322
			
294
			InformationsRecherche infoRecherche;
323
			InformationsRecherche infoRecherche;
295
			infoRecherche = cache.getInformationsRechercheObservation();
324
			infoRecherche = cache.getInformationsRechercheObservation();
296
			argumentsRecherche = "masque.type="+statut;
325
			argumentsRecherche = "masque.type="+statut;
297
			argumentsRecherche += "&"+infoRecherche.versChaineRequete();
326
			argumentsRecherche += "&"+infoRecherche.versChaineRequete();
298
			
327
			
299
			if(!GWT.isScript()) {
328
			if(!GWT.isScript()) {
300
				argumentsRecherche += "&gwt.codesvr="+Location.getParameter("gwt.codesvr")+"";
329
				argumentsRecherche += "&gwt.codesvr="+Location.getParameter("gwt.codesvr")+"";
301
			}
330
			}
302
			arguments = "?"+argumentsRecherche + "#" + ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS;
331
			arguments = "?"+argumentsRecherche + "#" + ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS;
303
			url = new Config().getUrl("del") + arguments;
332
			url = new Config().getUrl("del") + arguments;
304
		} else if (cache.getPageCourante().contains(ConstantesNavigation.PAGE_VALIDATION) || cache.getPageCourante().contains(ConstantesNavigation.PAGE_VALIDATION_PICTOFLORA)) {
333
		} else if (cache.getPageCourante().contains(ConstantesNavigation.PAGE_VALIDATION) || cache.getPageCourante().contains(ConstantesNavigation.PAGE_VALIDATION_PICTOFLORA)) {
305
			url = new Config().getUrl("del");
334
			url = new Config().getUrl("del");
306
			if(!GWT.isScript()) {
335
			if(!GWT.isScript()) {
307
				url += "?gwt.codesvr="+Location.getParameter("gwt.codesvr");
336
				url += "?gwt.codesvr="+Location.getParameter("gwt.codesvr");
308
			}
337
			}
309
			url += "#"+cache.getPageCourante();
338
			url += "#"+cache.getPageCourante();
310
		}
339
		}
311
		// remplacements batards pour corriger l'url
340
		// remplacements batards pour corriger l'url
312
		// TODO: factoriser toute la fonction 
341
		// TODO: factoriser toute la fonction 
313
		url = url.replaceAll("&#", "#");
342
		url = url.replaceAll("&#", "#");
314
		url = url.replaceAll("&&", "&");
343
		url = url.replaceAll("&&", "&");
315
		url = url.replaceAll("\\?&", "?");
344
		url = url.replaceAll("\\?&", "?");
316
		
345
		
317
		return url;
346
		return url;
318
	}
347
	}
319
	
348
	
320
	
349
	
321
	public void mettreAjourUrlCourante() {
350
	public void mettreAjourUrlCourante() {
322
		mettreAJourUrlCouranteSansRecharger(genererUrlCourante());
351
		mettreAJourUrlCouranteSansRecharger(genererUrlCourante());
323
	}
352
	}
324
	
353
	
325
	private static native void mettreAJourUrlCouranteSansRecharger(String nouvelleUrl) /*-{
354
	private static native void mettreAJourUrlCouranteSansRecharger(String nouvelleUrl) /*-{
326
    	$wnd.history.pushState(nouvelleUrl, "", nouvelleUrl);
355
    	$wnd.history.pushState(nouvelleUrl, "", nouvelleUrl);
327
	}-*/;
356
	}-*/;
328
	
357
	
329
}
358
}