Line 5... |
Line 5... |
5 |
import org.tela_botanica.del.client.modeles.VoteDetermination;
|
5 |
import org.tela_botanica.del.client.modeles.VoteDetermination;
|
6 |
import org.tela_botanica.del.client.services.rest.async.AjoutVoteDeterminationCallback;
|
6 |
import org.tela_botanica.del.client.services.rest.async.AjoutVoteDeterminationCallback;
|
7 |
import org.tela_botanica.del.client.services.rest.async.ListeVotesDeterminationCallback;
|
7 |
import org.tela_botanica.del.client.services.rest.async.ListeVotesDeterminationCallback;
|
8 |
import org.tela_botanica.del.client.services.rest.async.PHPCallback.ModeRequete;
|
8 |
import org.tela_botanica.del.client.services.rest.async.PHPCallback.ModeRequete;
|
Line 9... |
Line 9... |
9 |
|
9 |
|
10 |
import com.google.gwt.http.client.RequestBuilder;
|
10 |
import org.tela_botanica.del.client.services.RequestBuilderWithCredentials;
|
Line 11... |
Line 11... |
11 |
import com.google.gwt.user.client.Window;
|
11 |
import com.google.gwt.user.client.Window;
|
Line 12... |
Line 12... |
12 |
|
12 |
|
Line 33... |
Line 33... |
33 |
if(idProposition == null) {
|
33 |
if(idProposition == null) {
|
34 |
idProposition = "0";
|
34 |
idProposition = "0";
|
35 |
}
|
35 |
}
|
Line 36... |
Line 36... |
36 |
|
36 |
|
37 |
String urlService = baseUrl+"observations/"+idObservation+"/"+idProposition+"/vote/";
|
37 |
String urlService = baseUrl+"observations/"+idObservation+"/"+idProposition+"/vote/";
|
Line 38... |
Line 38... |
38 |
RequestBuilder rb = new RequestBuilder(RequestBuilder.PUT, urlService);
|
38 |
RequestBuilderWithCredentials rb = new RequestBuilderWithCredentials(RequestBuilderWithCredentials.PUT, urlService);
|
39 |
|
39 |
|
40 |
callback.setMode(ModeRequete.AJOUT);
|
40 |
callback.setMode(ModeRequete.AJOUT);
|
41 |
String chainePost = assemblerChaineRequeteAjoutModif(voteDetermination);
|
41 |
String chainePost = assemblerChaineRequeteAjoutModif(voteDetermination);
|
Line 54... |
Line 54... |
54 |
if(idProposition == null) {
|
54 |
if(idProposition == null) {
|
55 |
idProposition = "0";
|
55 |
idProposition = "0";
|
56 |
}
|
56 |
}
|
Line 57... |
Line 57... |
57 |
|
57 |
|
58 |
String urlService = baseUrl+"observations/"+idObservation+"/"+idProposition+"/vote/";
|
58 |
String urlService = baseUrl+"observations/"+idObservation+"/"+idProposition+"/vote/";
|
Line 59... |
Line 59... |
59 |
RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, urlService);
|
59 |
RequestBuilderWithCredentials rb = new RequestBuilderWithCredentials(RequestBuilderWithCredentials.POST, urlService);
|
60 |
|
60 |
|
61 |
callback.setMode(ModeRequete.MODIFICATION);
|
61 |
callback.setMode(ModeRequete.MODIFICATION);
|
62 |
String chainePost = assemblerChaineRequeteAjoutModif(voteDetermination);
|
62 |
String chainePost = assemblerChaineRequeteAjoutModif(voteDetermination);
|
Line 81... |
Line 81... |
81 |
if(idProposition == null) {
|
81 |
if(idProposition == null) {
|
82 |
idProposition = "0";
|
82 |
idProposition = "0";
|
83 |
}
|
83 |
}
|
Line 84... |
Line 84... |
84 |
|
84 |
|
85 |
String urlService = baseUrl+"observations/"+idObservation+"/"+idProposition+"/vote/";
|
85 |
String urlService = baseUrl+"observations/"+idObservation+"/"+idProposition+"/vote/";
|
Line 86... |
Line 86... |
86 |
RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, urlService);
|
86 |
RequestBuilderWithCredentials rb = new RequestBuilderWithCredentials(RequestBuilderWithCredentials.GET, urlService);
|
87 |
|
87 |
|
88 |
callback.setMode(ModeRequete.LECTURE);
|
88 |
callback.setMode(ModeRequete.LECTURE);
|
89 |
try {
|
89 |
try {
|