Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 878 → Rev 879

/trunk/src/org/tela_botanica/client/modeles/ProjetAsyncDao.java
6,6 → 6,7
import org.tela_botanica.client.util.UtilDAO;
 
import com.google.gwt.json.client.JSONArray;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.json.client.JSONValue;
 
public class ProjetAsyncDao {
36,4 → 37,26
}
});
}
 
public void selectionnerProjet(String idProjet) {
String[] param = {idProjet};
final JsonRestRequestBuilder rb = UtilDAO.construireRequete(SERVICE_NOM,param);
rb.envoyerRequete(null, new JsonRestRequestCallback() {
@Override
public void surReponse(JSONValue responseValue) {
Projet projet;
// Si la requête est un succès, reception d'un tableau
if (responseValue.isObject() != null) {
final JSONObject reponse = responseValue.isObject();
// Transformation du tableau JSON réponse en ListePersonnes
projet = new Projet(reponse);
} else {
projet = new Projet();
}
// Mise à jour du demandeur des données
vueARafraichir.rafraichir(projet);
}
});
}
}