Subversion Repositories eFlore/Applications.cel

Rev

Rev 104 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
101 jpm 1
package org.tela_botanica.client.modeles;
2
 
3
import org.tela_botanica.client.observation.ObservationModele;
4
import com.google.gwt.user.client.Window;
5
 
6
public class ExportObservationsDAO {
7
 
8
	ObservationModele om = null ;
9
 
10
	public ExportObservationsDAO(ObservationModele observationModele) {
11
		om = observationModele ;
12
	}
13
 
14
	public void exporterObservations(String identifiant, String[][] criteres) {
15
 
16
		String requete = "" ;
17
 
18
		if(criteres != null)
19
		{
20
			// on construit les paramètres du get avec les critères (&critere1=valeur1&critere2=valeur2 etc...)
21
			for (int i = 0; i < criteres.length; i++) {
22
 
23
				if(!criteres[i][1].equals(""))
24
				{
25
					if(i!= 0)
26
					{
27
						requete += "&";
28
					}
104 jpm 29
 
101 jpm 30
					requete += criteres[i][0]+"="+criteres[i][1] ;
31
				}
32
			}
33
		}
34
 
103 jpm 35
		Window.open(Configuration.getServiceBaseUrl()+"/InventoryExport/"+identifiant+"/"+requete,"Export",null) ;
101 jpm 36
 
37
	}
38
 
39
 
40
 
41
}