| Line 7... |
Line 7... |
| 7 |
import org.tela_botanica.client.http.JsonRestRequestBuilder;
|
7 |
import org.tela_botanica.client.http.JsonRestRequestBuilder;
|
| 8 |
import org.tela_botanica.client.http.JsonRestRequestCallback;
|
8 |
import org.tela_botanica.client.http.JsonRestRequestCallback;
|
| 9 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
9 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
| 10 |
import org.tela_botanica.client.modeles.Information;
|
10 |
import org.tela_botanica.client.modeles.Information;
|
| 11 |
import org.tela_botanica.client.synchronisation.Reponse;
|
11 |
import org.tela_botanica.client.synchronisation.Reponse;
|
| 12 |
import org.tela_botanica.client.synchronisation.Sequenceur;
|
- |
|
| 13 |
import org.tela_botanica.client.util.Debug;
|
- |
|
| 14 |
import org.tela_botanica.client.util.UtilDAO;
|
12 |
import org.tela_botanica.client.util.UtilDAO;
|
| Line 15... |
Line 13... |
| 15 |
|
13 |
|
| - |
|
14 |
import com.extjs.gxt.ui.client.Registry;
|
| 16 |
import com.extjs.gxt.ui.client.Registry;
|
15 |
import com.google.gwt.core.client.Callback;
|
| 17 |
import com.google.gwt.core.client.GWT;
|
16 |
import com.google.gwt.core.client.GWT;
|
| 18 |
import com.google.gwt.json.client.JSONArray;
|
17 |
import com.google.gwt.json.client.JSONArray;
|
| 19 |
import com.google.gwt.json.client.JSONObject;
|
18 |
import com.google.gwt.json.client.JSONObject;
|
| 20 |
import com.google.gwt.json.client.JSONValue;
|
- |
|
| Line 21... |
Line 19... |
| 21 |
import com.google.gwt.user.client.Window;
|
19 |
import com.google.gwt.json.client.JSONValue;
|
| 22 |
|
20 |
|
| 23 |
public class PersonneAsyncDao {
|
21 |
public class PersonneAsyncDao {
|
| Line 128... |
Line 126... |
| 128 |
}
|
126 |
}
|
| 129 |
});
|
127 |
});
|
| 130 |
}
|
128 |
}
|
| 131 |
}
|
129 |
}
|
| Line -... |
Line 130... |
| - |
|
130 |
|
| - |
|
131 |
public void testerExistencePersonne(String nomComplet, final Callback<JSONObject, String> cb) {
|
| - |
|
132 |
String[] parametres = {null, nomComplet};
|
| - |
|
133 |
|
| - |
|
134 |
/** CONSTRUCTION DE LA REQUETE **/
|
| - |
|
135 |
final JsonRestRequestBuilder rb = UtilDAO.construireRequete(SERVICE_NOM, parametres);
|
| - |
|
136 |
|
| - |
|
137 |
/** ENVOI DE LA REQUETE **/
|
| - |
|
138 |
rb.envoyerRequete(null, new JsonRestRequestCallback()
|
| - |
|
139 |
{
|
| - |
|
140 |
/** RECEPTION DE LA REPONSE **/
|
| - |
|
141 |
public void surReponse(JSONValue responseValue)
|
| - |
|
142 |
{
|
| - |
|
143 |
if (responseValue.isObject() != null) {
|
| - |
|
144 |
cb.onSuccess(responseValue.isObject());
|
| - |
|
145 |
}
|
| - |
|
146 |
}
|
| - |
|
147 |
});
|
| - |
|
148 |
}
|
| 132 |
|
149 |
|
| 133 |
public void ajouter(Personne personne) {
|
150 |
public void ajouter(Personne personne) {
|
| 134 |
String postDonneesEncodees = personne.obtenirChainePOST();
|
151 |
String postDonneesEncodees = personne.obtenirChainePOST();
|
| 135 |
postDonneesEncodees += "&cmhl_ce_modifier_par=" + utilisateurId;
|
152 |
postDonneesEncodees += "&cmhl_ce_modifier_par=" + utilisateurId;
|
| 136 |
final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM);
|
153 |
final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM);
|