Quelqu'un peut-il proposer un tutoriel où je peux intégrer dans Ajax dans mon application Spring MVC en utilisant la bibliothèque JSON pour l'échange de données ????? Je dois utiliser jquery avec ajax dans ma demandeprintemps ajax json jquery
Répondre
http://blog.springsource.com/2010/01/25/ajax-simplifications-in-spring-3-0/ a un bon démarrage rapide
mais v r en utilisant le printemps 2.6 dans notre projet .... – apoorva
http://api.jquery.com/jQuery.ajax/ il est vraiment facile, vous pouvez commencer à partir restEasy comment implémenter RestWEbservice de base, alors vous pouvez faire un appel ajax à partir de la page web à ce service, puis revenir de ce service json et l'analyser très facilement si vous ne trouvez pas que je peux vous aider
intérieur printemps écrire un contrôleur er comme ce service
@GET
@Produces({MediaType.APPLICATION_JSON})
@Path("getAllAlbums")
public String getAllAlbums() {
List<Album> albums = photoService.getAlbums();
String albumListasJson = jgen.getFilteredJsonString(albums);
return albumListasJson;
}
c'est une bibliothèque JSON
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<classifier>jdk15</classifier>
<version>2.4</version>
</dependency>
et côté ajax
function getAlbums(){
$.ajax({
type: "GET",
url: "../rest/xxxx/" + userID,
dataType: "text", //"json"
cache : "false",
//content : "document.body",
success: function(msg) {
albums = "{\"albums\":" + msg + "}";
tplAlb = tmpls['viewId-01'];
if (tplAlb && albums) {
data = JSON.parse(aaaa);
if (data.albums.length == 0) {
$.post("../rest/cccccc/" + userID + "/" + "aaaaaaa");
getAlbums();
}
// alert(data.albums.length);
}
}
});
}
- 1. ajax jquery soutien au printemps mvc
- 2. Printemps-JSON utilisé au printemps MVC
- 3. jQuery AJAX erreur json
- 4. jquery ajax obtenir json array?
- 5. "filtre" json par ajax (jquery)
- 6. jquery ajax, array et json
- 7. jQuery Ajax Accès à json
- 8. jquery ajax erreur réponse JSON
- 9. problème jQuery AJAX PHP JSON
- 10. Conflit jQuery-Ajax JSON charset
- 11. Personnalisé json au printemps
- 12. échantillons printemps-Ajax nécessaire
- 13. jQuery meilleur moyen d'obtenir JSON avec ajax
- 14. Affichage du tableau JSON par ajax (jquery)
- 15. url dans JSON, jquery réponse ajax
- 16. Dans JQuery 1.4.2 .ajax convertit JSON incorrect
- 17. Étiquette invalide - Demande jQuery Ajax/Json
- 18. Jquery ajax avec facebook social graphe json
- 19. Ajax JSON Parse Erreur
- 20. Middleware pour MongoDB ou CouchDB avec jQuery frontend Ajax/JSON
- 21. JQueryMobile - AJAX - JSON Analyse syntaxique
- 22. USC google + ajax JSON
- 23. $ .ajax non JSON
- 24. Envoyer JSON avec AJAX
- 25. Ajax: Json vs XML
- 26. Affichage JSON avec JQuery
- 27. Parse JSON dans jquery
- 28. Utilisation de jQuery et JSON avec AJAX responseText?
- 29. ajax jquery avec json ne fonctionne pas sur IE
- 30. Envoyer JSON jQuery Ajax à PHP et retour
J'ai essayé avec ce tutoriel ... j'avais téléchargé le fichier jar json2.2.3 .. Est-ce qu'il contient la classe flexjson.JSONSerializer mentionnée dans ce tutoriel ?????? Ou est-ce que tous ensemble sont différents? – apoorva
flexjson est une bibliothèque supplémentaire à http://flexjson.sourceforge.net/ – JoseK
Lequel est préféré ici ??? Flexjson ou spring-json ?? est la bibliothèque de flexjson n'importe où liée à flex? – apoorva