File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Spring AJAX problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring AJAX problem" Watch "Spring AJAX problem" New topic
Author

Spring AJAX problem

Bill Wied
Greenhorn

Joined: Mar 11, 2009
Posts: 9
I am trying to perform a "simple" AJAX remoting call (see JSP segment below) to allow the states/provinces to change based on the country selected.

<div class="required">
<form:select id="selectCountry" path="countryCd" onchange="alert('hello');Spring.remoting.submitFor m('selectCountry', 'accountUpdate', {_eventId:'selectState'});return false;alert('goodbye');">
<form:option value="XX"> </form:option>
<form:options items="${countries}" itemValue="countryCd"
itemLabel="countryName" />
</form:select>
</div>

I get the following console error when I change the selected country:
Spring is not defined.

I am using annotated controllers. I must not have included something in my configuration.

Your help would be appreciated.

Bill
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I played with it a long long time ago so this is a shot in the dark.

Did you add some dependency for the js file it needs?

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring AJAX problem