Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1417 Rev 1468
Line 8... Line 8...
8
import org.tela_botanica.client.http.JsonRestRequestCallback;
8
import org.tela_botanica.client.http.JsonRestRequestCallback;
9
import org.tela_botanica.client.interfaces.Rafraichissable;
9
import org.tela_botanica.client.interfaces.Rafraichissable;
10
import org.tela_botanica.client.modeles.Information;
10
import org.tela_botanica.client.modeles.Information;
11
import org.tela_botanica.client.modeles.structure.StructureListe;
11
import org.tela_botanica.client.modeles.structure.StructureListe;
12
import org.tela_botanica.client.synchronisation.Reponse;
12
import org.tela_botanica.client.synchronisation.Reponse;
-
 
13
import org.tela_botanica.client.util.Debug;
13
import org.tela_botanica.client.util.UtilDAO;
14
import org.tela_botanica.client.util.UtilDAO;
Line 14... Line 15...
14
 
15
 
15
import com.extjs.gxt.ui.client.Registry;
16
import com.extjs.gxt.ui.client.Registry;
16
import com.extjs.gxt.ui.client.widget.Info;
17
import com.extjs.gxt.ui.client.widget.Info;
Line 38... Line 39...
38
	 * 						fur et à mesure de la consultation des données par l'utilisateur.
39
	 * 						fur et à mesure de la consultation des données par l'utilisateur.
39
	 * 			- False :	la consultation des données est classique : un seul appel à la base de données est effectué, le retour
40
	 * 			- False :	la consultation des données est classique : un seul appel à la base de données est effectué, le retour
40
	 * 						est renvoyé à l'appelant
41
	 * 						est renvoyé à l'appelant
41
	 * 			// FIXME : si la taille de la liste est supérieure à la limite du JREST (150), ce deuxieme mode ne fonctionne pas
42
	 * 			// FIXME : si la taille de la liste est supérieure à la limite du JREST (150), ce deuxieme mode ne fonctionne pas
42
	 */
43
	 */
43
	public void selectionner(final boolean paginationProgressive, final String projetId, final String nomProjet, final int start, final int nbElements, final Integer seqId) {
44
	public void selectionner(final boolean paginationProgressive, final String projetId, final String nomProjet, final int start, final int nbElements, final String formatRetour, final Integer seqId) {
Line 44... Line 45...
44
		
45
		
45
		String nom = (nomProjet == null) ? "%" : nomProjet+"%";
46
		String nom = (nomProjet == null) ? "%" : nomProjet+"%";
Line 46... Line 47...
46
		String[] param = {projetId, nom};
47
		String[] param = {projetId, nom};
Line 47... Line 48...
47
		
48
		
48
		HashMap<String, String> restrictions = new HashMap<String, String>();
49
		HashMap<String, String> restrictions = new HashMap<String, String>();
49
		
50
		
Line -... Line 51...
-
 
51
		if (nbElements != -1) {
-
 
52
			restrictions.put("limit", String.valueOf(nbElements));
-
 
53
		}
-
 
54
 
50
		if (nbElements != -1)	{
55
		if ((formatRetour != null) && (formatRetour != "")) {
51
			restrictions.put("limit", String.valueOf(nbElements));
56
			restrictions.put("formatRetour", formatRetour);
Line 52... Line 57...
52
		}
57
		}
53
		
58
		
Line 110... Line 115...
110
									vueARafraichir.rafraichir(retourRequete);
115
									vueARafraichir.rafraichir(retourRequete);
111
								} else {
116
								} else {
112
									vueARafraichir.rafraichir(projets);
117
									vueARafraichir.rafraichir(projets);
113
								}
118
								}
Line 114... Line 119...
114
							
119
							
115
							// Si la réponse est un objet, alors c'est un unique projet qui a été retournée
120
							// Si la réponse est un objet, alors c'est un unique projet qui a été retourné
Line 116... Line 121...
116
							} else if (responseObject.get("projets").isObject() != null) {
121
							} else if (responseObject.get("projets").isObject() != null) {
117
								
122