• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Spring 2.5 and JSON and JSP/AJAX working together

Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying really hard to make sense of this stuff without trying to get confused.

My objective is simple...
1. I have a list of folders that I have obtained using my controller and they are organized into a HashMap.
2. I add the new "folders" map as an attribute to my model (model.addAttribute("folders",folders))
3. I return to my jsp page.
4. Now, I can view the results of my hashmap using the json tab library without any problem

But I would like to make use of the spring-json functionality and return "folders" as a json object instead of a HashMap. Once I have the json "folders" object I am then assuming I can use the data towards the jquery treeview plugin.

Is there anyone that can offer my some ideas or suggestions on how to do this successfully? I'm thinking I am overwhelming myself with documentation that is well over my head and more complicated than what I'm trying to do. Given some documentation, it appears that I may need to modify my context file adding the XmlViewResolver , while creating another context file (project-views.xml), along with writing a jsonView bean.

Thanks so much.
laura mccord
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I an almost getting there...so far I have create the json object and now I need to be able to do something with it once I get to the jsp page

If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!