Meaningless Drivel is fun!
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring AJAX problem" Watch "Spring AJAX problem" New topic

Spring AJAX problem

Bill Wied

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" />

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.

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
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?

I agree. Here's the link:
subject: Spring AJAX problem
It's not a secret anymore!