Line 78... |
Line 78... |
78 |
});
|
78 |
});
|
79 |
}
|
79 |
}
|
Line 80... |
Line 80... |
80 |
|
80 |
|
81 |
public void ajouter(Collection collection) {
|
81 |
public void ajouter(Collection collection) {
|
82 |
String postDonneesEncodees = construirePost(null, collection);
|
- |
|
83 |
|
82 |
String postDonneesEncodees = construirePost(null, collection);
|
84 |
final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM);
|
83 |
final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM);
|
85 |
rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
|
84 |
rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
|
86 |
@Override
|
85 |
@Override
|
87 |
public void surReponse(JSONValue responseValue) {
|
86 |
public void surReponse(JSONValue responseValue) {
|
Line 100... |
Line 99... |
100 |
}
|
99 |
}
|
101 |
});
|
100 |
});
|
102 |
}
|
101 |
}
|
Line 103... |
Line 102... |
103 |
|
102 |
|
104 |
public void modifier(Collection collection) {
|
- |
|
105 |
String postDonneesEncodees = construirePost(collection.getId(), collection);
|
- |
|
Line -... |
Line 103... |
- |
|
103 |
public void modifier(Collection collection) {
|
106 |
GWT.log(postDonneesEncodees, null);
|
104 |
|
107 |
|
105 |
String postDonneesEncodees = construirePost(collection.getId(), collection);
|
108 |
String[] parametres = {collection.getId()};
|
106 |
String[] parametres = {collection.getId()};
|
109 |
final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM, parametres);
|
107 |
final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM, parametres);
|
110 |
rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
|
108 |
rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
|
Line 145... |
Line 143... |
145 |
if (collection != null) {
|
143 |
if (collection != null) {
|
146 |
if (collectionId != null) {
|
144 |
if (collectionId != null) {
|
147 |
postDonnees += "&cc_id_collection=" + URL.encodeComponent(collectionId);
|
145 |
postDonnees += "&cc_id_collection=" + URL.encodeComponent(collectionId);
|
148 |
}
|
146 |
}
|
Line 149... |
Line 147... |
149 |
|
147 |
|
150 |
/*Debug.log("id projet:"+collection.getIdProjet());
|
- |
|
151 |
Debug.log("liste projet:"+((ProjetListe) Registry.get(RegistreId.PROJETS)).get(collection.getIdProjet()).toString());
|
148 |
/*
|
152 |
postDonnees += "&cpr_abreviation=" + URL.encodeComponent(((ProjetListe) Registry.get(RegistreId.PROJETS)).get(collection.getIdProjet()).getAbreviation());
|
149 |
postDonnees += "&cpr_abreviation=" + URL.encodeComponent(((ProjetListe) Registry.get(RegistreId.PROJETS)).get(collection.getIdProjet()).getAbreviation());
|
153 |
postDonnees += "&cc_ce_projet=" + URL.encodeComponent(collection.getIdProjet()) +
|
150 |
postDonnees += "&cc_ce_projet=" + URL.encodeComponent(collection.getIdProjet()) +
|
154 |
"&cc_ce_mere=" + URL.encodeComponent(collection.getCollectionMereId()) +
|
151 |
"&cc_ce_mere=" + URL.encodeComponent(collection.getCollectionMereId()) +
|
155 |
"&cc_ce_structure=" + URL.encodeComponent(collection.getIdStructure()) +
|
152 |
"&cc_ce_structure=" + URL.encodeComponent(collection.getIdStructure()) +
|