Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1231 Rev 1292
Line 25... Line 25...
25
		vueARafraichir = vue;
25
		vueARafraichir = vue;
26
		utilisateurId = ((Mediateur) Registry.get(RegistreId.MEDIATEUR)).getUtilisateurId();
26
		utilisateurId = ((Mediateur) Registry.get(RegistreId.MEDIATEUR)).getUtilisateurId();
27
	}
27
	}
Line 28... Line 28...
28
 
28
 
29
	public void selectionner(String personneId, String projetId, String nomComplet, final int pageCourante, final int nbElements) {
-
 
30
 
29
	public void selectionner(String personneId, String projetId, String nomComplet, final int pageCourante, final int nbElements) {
Line 31... Line 30...
31
		String[] parametres = {personneId, projetId, nomComplet};
30
		String[] parametres = {personneId, projetId, nomComplet};
32
		
31
		
Line 50... Line 49...
50
					PersonneListe personnes;
49
					PersonneListe personnes;
51
					if (reponse.get(0).isArray() != null)	{
50
					if (reponse.get(0).isArray() != null)	{
52
						personnes = new PersonneListe(reponse);
51
						personnes = new PersonneListe(reponse);
53
					} else {
52
					} else {
54
						personnes = new PersonneListe(reponse.get(1).isArray(), reponse.get(0).isNumber(), vueARafraichir);
53
						personnes = new PersonneListe(reponse.get(1).isArray(), reponse.get(0).isNumber(), vueARafraichir);
55
					}			
54
					}				
56
					
-
 
57
					personnes.setTaillePage(nbElements);
55
					personnes.setTaillePage(nbElements);
58
					personnes.setPageCourante(pageCourante);							
56
					personnes.setPageCourante(pageCourante);							
59
					info.setDonnee(0, personnes);
57
					info.setDonnee(0, personnes);
Line 60... Line 58...
60
					
58
					
Line 65... Line 63...
65
				}
63
				}
66
			}
64
			}
67
		});	
65
		});	
68
	}
66
	}
Line 69... Line 67...
69
	
67
	
70
	public void ajouter(Personne personne) {
-
 
71
		
68
	public void ajouter(Personne personne) {		
72
		String postDonneesEncodees = personne.obtenirChainePOST();
69
		String postDonneesEncodees = personne.obtenirChainePOST();
73
		postDonneesEncodees += "&cmhl_ce_modifier_par=" + utilisateurId;
-
 
74
		
70
		postDonneesEncodees += "&cmhl_ce_modifier_par=" + utilisateurId;		
75
		final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM);	
71
		final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM);	
76
		rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
72
		rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
77
			@Override
73
			@Override
78
			public void surReponse(JSONValue responseValue) {
74
			public void surReponse(JSONValue responseValue) {
Line 87... Line 83...
87
					vueARafraichir.rafraichir(info);
83
					vueARafraichir.rafraichir(info);
88
				} else {
84
				} else {
89
					GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas une chaine JSON.", null);
85
					GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas une chaine JSON.", null);
90
				}
86
				}
91
			}
87
			}
92
		});	
88
		});		
93
	}
89
	}
Line 94... Line 90...
94
	
90
	
95
	public void modifier(Personne personne) {
91
	public void modifier(Personne personne) {
96
		String postDonneesEncodees = personne.obtenirChainePOST();
92
		String postDonneesEncodees = personne.obtenirChainePOST();