I'm trying to get every value from an 'application' object (in javascript using jquery) which has mostly Strings and booleans properties, but also a List. I want to get it on my server-side, java.
Here what I do to get the Strings and boolean :
Javascript with REST :
requete = clientRestApplication.saveApplication.read(application.id, application);
requete.done();
application is my object of course. It contains an Array called mails filled with Strings.
@RequestMapping(value = "/enregistrerApplication/id/{id}", method = RequestMethod.GET)
@ResponseBody
public void EnregistrerApplication(@PathVariable Long id, String nom, String acronyme, Integer idWebGD, Boolean estProgressWindows,
Boolean estProgressUnix, Boolean estDelphi, String cheminPatchWin, String cheminPatchUnix,
String cheminOutilsCompileWin, String cheminOutilsCompileUnix, String serveurCVS, String loginCVS,
String mdpCVS, boolean versionEncours, ArrayList<String> mails) { ... }
From here I can use every single attributes to do what I want, but can't get my array by any mean...
I'm probably doing something wrong, can somebody help ? Thanks a lot.
Make your Java part return JSON. Convert your Jaava Array to JSON: Convert normal Java Array or ArrayList to Json Array in android
And process this JSON
from the Javascript/JQuery side.
EDIT Reverse: Get JSON and converts into a Java Array : How to parse a JSON and turn its values into an Array?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With