Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 45 Rev 74
Line 80... Line 80...
80
				
80
				
Line 81... Line 81...
81
			} catch (RequestException e) {
81
			} catch (RequestException e) {
82
				
82
				
-
 
83
		}
-
 
84
	}
-
 
85
	
-
 
86
	/**
-
 
87
	 * Envoie requete au serveur pour modifier une observations
-
 
88
	 * 
-
 
89
	 * @param motcle
-
 
90
	 *            le mots clés à ajouter avec son parent et son identifiant
-
 
91
	 */
-
 
92
	
-
 
93
	public void modifier(final Rafraichissable r, String utilisateur, final Observation obs, final String numeroOrdre) {
-
 
94
	
-
 
95
 
-
 
96
		
-
 
97
//		private void addElement(String nom_sel, String num_nom_sel, String nom_ret,
-
 
98
	//			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) {
Line -... Line 99...
-
 
99
 
-
 
100
			RequestBuilder rb = new RequestBuilder(RequestBuilder.POST,oModele.getConfig().getServiceBaseUrl()+ "/Inventory/" + utilisateur + "/" + numeroOrdre + "/") ;
-
 
101
			
-
 
102
			String postData = "identifiant="
-
 
103
				+ utilisateur + "&nom_sel=" + URL.encodeComponent(obs.getNomSaisi()) + "&num_nom_sel=" + obs.getNumeroNomenclaturalSaisi()
-
 
104
				+ "&location=" + URL.encodeComponent(obs.getLocalite()) + "&id_location=" + obs.getIdentifiantLocalite() + "&date_observation=" +  obs.getDate()
-
 
105
				+ "&lieudit="+ URL.encodeComponent(obs.getLieudit()) + "&station="+ URL.encodeComponent(obs.getLieudit()) +"&milieu="+ URL.encodeComponent(obs.getMilieu()) + "&commentaire="+ URL.encodeComponent(obs.getCommentaire()) ;
-
 
106
 
-
 
107
			
-
 
108
			try {
-
 
109
				
-
 
110
				rb.sendRequest(postData, new RequestCallback() {
-
 
111
 
-
 
112
					public void onError(Request request, Throwable exception) {
-
 
113
						// TODO Auto-generated method stub
-
 
114
						
-
 
115
					}
-
 
116
 
-
 
117
					public void onResponseReceived(Request request,
-
 
118
							Response response) {
-
 
119
						
-
 
120
						r.rafraichir(numeroOrdre,true);
-
 
121
						
-
 
122
					}
-
 
123
					
-
 
124
					
-
 
125
				}) ;
-
 
126
				
-
 
127
			} catch (RequestException e) {
-
 
128
				
-
 
129
		}
-
 
130
		
-
 
131
	
83
		}
132
	
84
	}
133
	}