Subversion Repositories eFlore/Applications.del

Rev

Rev 1222 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1222 Rev 1350
Line 56... Line 56...
56
	public String genererUrl() {
56
	public String genererUrl() {
57
		String url = Window.Location.getHref();
57
		String url = Window.Location.getHref();
58
		CacheClient cache = CacheClient.getInstance();
58
		CacheClient cache = CacheClient.getInstance();
Line 59... Line 59...
59
		
59
		
60
		String arguments = "";
60
		String arguments = "";
61
		if (cache.getPageCourante() == ConstantesNavigation.PAGE_RECHERCHE_IMAGES) {
61
		if (cache.getPageCourante().equals(ConstantesNavigation.PAGE_RECHERCHE_IMAGES)) {
62
			InformationsRecherche infoRecherche;
62
			InformationsRecherche infoRecherche;
63
			infoRecherche = cache.getInformationsRechercheImage();
63
			infoRecherche = cache.getInformationsRechercheImage();
64
			arguments = infoRecherche.versChaineRequete() + "#" + ConstantesNavigation.PAGE_RECHERCHE_IMAGES;
64
			arguments = infoRecherche.versChaineRequete() + "#" + ConstantesNavigation.PAGE_RECHERCHE_IMAGES;
65
			// Ajout du protocole
65
			// Ajout du protocole
Line 69... Line 69...
69
			}
69
			}
70
			url = new Config().getUrl("del") + "?" + arguments;
70
			url = new Config().getUrl("del") + "?" + arguments;
71
			if (protocole != "~") {
71
			if (protocole != "~") {
72
				url += protocole;
72
				url += protocole;
73
			}
73
			}
74
		} else if (cache.getPageCourante() == ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS) {
74
		} else if (cache.getPageCourante().equals(ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS) || cache.getPageCourante().equals("")) {
75
			InformationsRecherche infoRecherche;
75
			InformationsRecherche infoRecherche;
76
			infoRecherche = cache.getInformationsRechercheObservation();
76
			infoRecherche = cache.getInformationsRechercheObservation();
77
			arguments = infoRecherche.versChaineRequete() + "#" + ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS;
77
			arguments = infoRecherche.versChaineRequete() + "#" + ConstantesNavigation.PAGE_RECHERCHE_OBSERVATIONS;
78
			url = new Config().getUrl("del") + "?" + arguments;
78
			url = new Config().getUrl("del") + "?" + arguments;
79
		} else {
79
		} else {
80
			url = Window.Location.getHref();
80
			url = Window.Location.getHref();
81
		}
81
		}
-
 
82
		// remplacement batard pour corriger l'url
-
 
83
		// TODO: factoriser toute la fonction 
-
 
84
		url = url.replaceAll("\\?&", "?");
Line 82... Line 85...
82
		
85
		
83
		return url;
86
		return url;
Line 84... Line 87...
84
	}
87
	}