• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

ajax in spring 3.0

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

i am trying to develop country state ajax using spring 3.0 and jquery.

and i am using getjson method.

but i dont kow whether i am getting response from the controller or not callback function is not calling.

and my code
javascript

function checkAvailability() {


$.getJSON("countryajax.htm",function(data) {alert(data);});


}

and controller

@RequestMapping(method = RequestMethod.GET)
public @ResponseBody
List<String> getStates() {
List<Item> itemlist = genericService.findItemsByListName("Country");

List<String> country = new ArrayList<String>();
for (Item cs : itemlist) {
country.add(cs.getName());
}
System.out.println(country.size());
return country;
}

and the control is going to controller and response is generating but i dont know it is returning or not.please tell me how to check it


thanks in advance
 
reply
    Bookmark Topic Watch Topic
  • New Topic