For those that may stumble upon this problem later, I am adding some details and the "fix".
What lead me to the solution was that in FireFox the error is reported as such:
Code:
SyntaxError: missing ) in parenthetical
From that, I found an forum posting mentioning that it's a bad JSON parse. I am not sure why Dojo doesn't have a better error-handling for mis-formed JSON, but thats a discussion for another Forum.
Anyhow, the problem was that I was getting back an error from my controller. I had added this to my Controller's JSON method's RequestMapping:
Code:
headers = "Accept=application/json"
Basically requiring the Accept header be set to JSON. The problem is that Dojo doesn't change the Accept header when you switch the handleAs to "json".
Bottom line, Spring MVC was sending back an HTTP 500 error page, since there was no RequestMapping to handle the request, and Dojo was blowing up trying to parse the resulting page as JSON. The ultimate fix for me was to add the Accept header to the Dojo JSON request as following:
Code:
dojo.xhrGet({
url: "${get_site_users}",
handleAs: "json",
headers: {'Accept':'application/json'},
load: function(data,ioArgs) {
// Do something with 'data'
}
});
Once the header was being sent, things started working just fine.