82,5 → 82,54 |
|
} |
} |
|
/** |
* Envoie requete au serveur pour modifier une observations |
* |
* @param motcle |
* le mots clés à ajouter avec son parent et son identifiant |
*/ |
|
public void modifier(final Rafraichissable r, String utilisateur, final Observation obs, final String numeroOrdre) { |
|
|
|
// private void addElement(String nom_sel, String num_nom_sel, String nom_ret, |
// String num_nom_ret, String num_taxon, String famille,final String loc, String id_location,String dat, String lieu, String sta, String mil, String comment) { |
|
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST,oModele.getConfig().getServiceBaseUrl()+ "/Inventory/" + utilisateur + "/" + numeroOrdre + "/") ; |
|
String postData = "identifiant=" |
+ utilisateur + "&nom_sel=" + URL.encodeComponent(obs.getNomSaisi()) + "&num_nom_sel=" + obs.getNumeroNomenclaturalSaisi() |
+ "&location=" + URL.encodeComponent(obs.getLocalite()) + "&id_location=" + obs.getIdentifiantLocalite() + "&date_observation=" + obs.getDate() |
+ "&lieudit="+ URL.encodeComponent(obs.getLieudit()) + "&station="+ URL.encodeComponent(obs.getLieudit()) +"&milieu="+ URL.encodeComponent(obs.getMilieu()) + "&commentaire="+ URL.encodeComponent(obs.getCommentaire()) ; |
|
|
try { |
|
rb.sendRequest(postData, new RequestCallback() { |
|
public void onError(Request request, Throwable exception) { |
// TODO Auto-generated method stub |
|
} |
|
public void onResponseReceived(Request request, |
Response response) { |
|
r.rafraichir(numeroOrdre,true); |
|
} |
|
|
}) ; |
|
} catch (RequestException e) { |
|
} |
|
|
|
} |
|
} |