Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 755 Rev 772
Line 69... Line 69...
69
		final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM);	
69
		final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM);	
70
		rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
70
		rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
71
			@Override
71
			@Override
72
			public void surReponse(JSONValue responseValue) {
72
			public void surReponse(JSONValue responseValue) {
73
				if (responseValue.isString() != null) {
73
				if (responseValue.isString() != null) {
74
					Information info = new Information("ajout_personne", responseValue.isString().stringValue());
74
					Information info = new Information("ajout_personne");
-
 
75
					info.setMessage(responseValue.isString().stringValue());
75
					vueARafraichir.rafraichir(info);
76
					vueARafraichir.rafraichir(info);
76
				} else {
77
				} else {
77
					GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas une chaine JSON.", null);
78
					GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas une chaine JSON.", null);
78
				}
79
				}
79
			}
80
			}
Line 89... Line 90...
89
		rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
90
		rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
90
			@Override
91
			@Override
91
			public void surReponse(JSONValue responseValue) {
92
			public void surReponse(JSONValue responseValue) {
92
				// Si la requête est un succès, reception d'une chaine
93
				// Si la requête est un succès, reception d'une chaine
93
				if (responseValue.isString() != null) {
94
				if (responseValue.isString() != null) {
94
					Information info = new Information("modification_personne", responseValue.isString().stringValue());					
95
					Information info = new Information("modification_personne");
-
 
96
					info.setMessage(responseValue.isString().stringValue());
95
					vueARafraichir.rafraichir(info);
97
					vueARafraichir.rafraichir(info);
96
				} else {
98
				} else {
97
					GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas une chaine JSON.", null);
99
					GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas une chaine JSON.", null);
98
				}
100
				}
99
			}
101
			}
100
		});
102
		});
101
	}
103
	}
Line 102... Line 104...
102
 
104
 
103
	public void supprimer(String structureId) {
105
	public void supprimer(String personnesId) {
104
		String[] parametres = {utilisateurId, structureId};
106
		String[] parametres = {utilisateurId, personnesId};
105
		final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM, parametres);
107
		final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM, parametres);
106
		rb.envoyerRequeteSuppression(new JsonRestRequestCallback() {
108
		rb.envoyerRequeteSuppression(new JsonRestRequestCallback() {
107
			@Override
109
			@Override
108
			public void surReponse(JSONValue responseValue) {
110
			public void surReponse(JSONValue responseValue) {
109
				if (responseValue.isString() != null) {
111
				if (responseValue.isString() != null) {
-
 
112
					Information info = new Information("suppression_personne");
110
					Information info = new Information("suppression_personne", responseValue.isString().stringValue());
113
					info.setMessage(responseValue.isString().stringValue());
111
					vueARafraichir.rafraichir(info);
114
					vueARafraichir.rafraichir(info);
112
				} else {
115
				} else {
113
					GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas une chaine JSON.", null);
116
					GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas une chaine JSON.", null);
114
				}
117
				}