grailsアプリケーションのajaxライブラリとしてjqueryを使用しています。別のドロップダウンから入力されたドロップダウンリストを取得しましたが、値が表示されません。
GSP:
<label for="countryddl" >Country:</label>
<g:select name="countryddl" id="countryddl" from="${locations.country}"
keys ="${locations.country}"
noSelection="['':'Select one...']"
onChange="${remoteFunction( action:'updateProvince',
params: '\'id=\'+escape(this.value)',
update: [success: 'provinceddl'] )}"
></g:select> <br/><br />
<label for="provinceddl" >Province:</label>
<g:select name="provinceddl" id ="provinceddl" noSelection="['':'Select one...']" from=""></g:select>
コントローラ:
def updateProvince = {
def country = params['id']
def locations = Location.findAllByCountry(country)
render locations.province as JSON
}