| Line 4... |
Line 4... |
| 4 |
import org.tela_botanica.client.RegistreId;
|
4 |
import org.tela_botanica.client.RegistreId;
|
| 5 |
import org.tela_botanica.client.http.JsonRestRequestBuilder;
|
5 |
import org.tela_botanica.client.http.JsonRestRequestBuilder;
|
| 6 |
import org.tela_botanica.client.http.JsonRestRequestCallback;
|
6 |
import org.tela_botanica.client.http.JsonRestRequestCallback;
|
| 7 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
7 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
| 8 |
import org.tela_botanica.client.modeles.Information;
|
8 |
import org.tela_botanica.client.modeles.Information;
|
| - |
|
9 |
import org.tela_botanica.client.synchronisation.Reponse;
|
| 9 |
import org.tela_botanica.client.util.Debug;
|
10 |
import org.tela_botanica.client.util.Debug;
|
| 10 |
import org.tela_botanica.client.util.UtilDAO;
|
11 |
import org.tela_botanica.client.util.UtilDAO;
|
| Line 11... |
Line 12... |
| 11 |
|
12 |
|
| 12 |
import com.extjs.gxt.ui.client.Registry;
|
13 |
import com.extjs.gxt.ui.client.Registry;
|
| Line 24... |
Line 25... |
| 24 |
public StructureAPersonneAsyncDao(Rafraichissable vueARafraichirCourrante) {
|
25 |
public StructureAPersonneAsyncDao(Rafraichissable vueARafraichirCourrante) {
|
| 25 |
vueARafraichir = vueARafraichirCourrante;
|
26 |
vueARafraichir = vueARafraichirCourrante;
|
| 26 |
utilisateurId = ((Mediateur) Registry.get(RegistreId.MEDIATEUR)).getUtilisateurId();
|
27 |
utilisateurId = ((Mediateur) Registry.get(RegistreId.MEDIATEUR)).getUtilisateurId();
|
| 27 |
}
|
28 |
}
|
| Line 28... |
Line 29... |
| 28 |
|
29 |
|
| 29 |
public void selectionner(final String structureId, final String roleId) {
|
30 |
public void selectionner(final String structureId, final String roleId, final Integer seqId) {
|
| Line 30... |
Line 31... |
| 30 |
String[] parametres = {structureId, roleId};
|
31 |
String[] parametres = {structureId, roleId};
|
| 31 |
|
32 |
|
| 32 |
final JsonRestRequestBuilder rb = UtilDAO.construireRequete(SERVICE_NOM, parametres);
|
33 |
final JsonRestRequestBuilder rb = UtilDAO.construireRequete(SERVICE_NOM, parametres);
|
| Line 40... |
Line 41... |
| 40 |
final JSONArray reponse = responseValue.isArray();
|
41 |
final JSONArray reponse = responseValue.isArray();
|
| 41 |
// Transformation du tableau JSON réponse en ListeInstitution
|
42 |
// Transformation du tableau JSON réponse en ListeInstitution
|
| 42 |
StructureAPersonneListe personnel = new StructureAPersonneListe(reponse);
|
43 |
StructureAPersonneListe personnel = new StructureAPersonneListe(reponse);
|
| 43 |
info.setDonnee(0, personnel);
|
44 |
info.setDonnee(0, personnel);
|
| 44 |
// et on met à jour le demandeur des données
|
45 |
// et on met à jour le demandeur des données
|
| - |
|
46 |
if (seqId !=null) {
|
| - |
|
47 |
Reponse reponseSequenceur = new Reponse(info, seqId);
|
| - |
|
48 |
vueARafraichir.rafraichir(reponseSequenceur);
|
| - |
|
49 |
} else {
|
| 45 |
vueARafraichir.rafraichir(info);
|
50 |
vueARafraichir.rafraichir(info);
|
| - |
|
51 |
}
|
| 46 |
} else {
|
52 |
} else {
|
| 47 |
GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas un talbeau JSON et vaut : "+responseValue.toString(), null);
|
53 |
GWT.log(rb.getUrl()+"\n\tLa réponse n'est pas un talbeau JSON et vaut : "+responseValue.toString(), null);
|
| 48 |
}
|
54 |
}
|
| 49 |
} else {
|
55 |
} else {
|
| 50 |
if (structureId == null) {
|
56 |
if (structureId == null) {
|