Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1103 Rev 1319
Line 7... Line 7...
7
import org.tela_botanica.client.http.JsonRestRequestBuilder;
7
import org.tela_botanica.client.http.JsonRestRequestBuilder;
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.util.UtilDAO;
13
import org.tela_botanica.client.util.UtilDAO;
Line 13... Line 14...
13
 
14
 
14
import com.extjs.gxt.ui.client.Registry;
15
import com.extjs.gxt.ui.client.Registry;
15
import com.extjs.gxt.ui.client.widget.Info;
16
import com.extjs.gxt.ui.client.widget.Info;
Line 27... Line 28...
27
	public ProjetAsyncDao(Rafraichissable vueARafraichirCourrante) {
28
	public ProjetAsyncDao(Rafraichissable vueARafraichirCourrante) {
28
		vueARafraichir = vueARafraichirCourrante;
29
		vueARafraichir = vueARafraichirCourrante;
29
		utilisateurId = ((Mediateur) Registry.get(RegistreId.MEDIATEUR)).getUtilisateurId();
30
		utilisateurId = ((Mediateur) Registry.get(RegistreId.MEDIATEUR)).getUtilisateurId();
30
	}
31
	}
Line 31... Line 32...
31
	
32
	
32
	public void selectionner(final String projetId, final String nom, final int pageCourante, final int nbElements) {
33
	public void selectionner(final String projetId, final String nom, final int pageCourante, final int nbElements, final Integer seqId) {
Line 33... Line 34...
33
		String[] param = {projetId, nom};
34
		String[] param = {projetId, nom};
34
		
35
		
35
		HashMap<String, String> restrictions = new HashMap<String, String>();
36
		HashMap<String, String> restrictions = new HashMap<String, String>();
Line 61... Line 62...
61
							projets = new ProjetListe(reponse.get(1).isArray(), reponse.get(0).isNumber(), vueARafraichir);
62
							projets = new ProjetListe(reponse.get(1).isArray(), reponse.get(0).isNumber(), vueARafraichir);
62
						}
63
						}
63
						projets.setTaillePage(nbElements);
64
						projets.setTaillePage(nbElements);
64
						projets.setPageCourante(pageCourante);							
65
						projets.setPageCourante(pageCourante);							
Line -... Line 66...
-
 
66
						
-
 
67
						if (seqId != null)	{
-
 
68
							Reponse retourRequete = new Reponse(projets, seqId);
-
 
69
							vueARafraichir.rafraichir(retourRequete);
65
						
70
						} else {
-
 
71
							vueARafraichir.rafraichir(projets);
66
						vueARafraichir.rafraichir(projets);
72
						}
67
					} else {
73
					} else {
68
						GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas un objet ou un talbeau JSON et vaut : "+responseValue.toString(), null);
74
						GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas un objet ou un talbeau JSON et vaut : "+responseValue.toString(), null);
69
					}
75
					}
70
				} else {
76
				} else {