• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring 2.5 and JSON and JSP/AJAX working together

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic