更新: このエラーを、この選択で onchange イベントを登録することに切り分けました。onchange を削除すると、ページはエラーなしでレンダリングされます。それ以外の場合は、No javascript providerエラーが発生します。
<g:select optionKey="id" optionValue="name" name="course" id="course"
from="${com.TourneyCard.Course.list(sort:'name')}" value="${homeCourse.id}"
onchange="${remoteFunction(controller:'foursome', action:'ajaxGetTeesJSON',
params:'\'id=\' + escape(this.value)',
onSuccess:'updateTees(data);')}">
</g:select>
さまざまな理由から、jQuery プラグインの代わりにリソース プラグインを使用して jQuery を組み込みたいと考えています。それはほとんど機能していますが、レンダリングされず、代わりにNo javascript provider is configuredというエラーを発行しているページがあります。
私の ApplicationResources.groovy は jquery を定義します:
jquery {
resource url: 'js/jquery/jquery-1.9.1.min.js', disposition: 'head'
}
私の main.gsp レイアウトは次のようになります。
<head>
<g:layoutHead/>
<g:javascript library="jquery"/>
<r:require module="jquerymobile"/>
<r:layoutResources />
</head>
プロバイダーが構成されていないというエラーを発行するページは、次のようになります。
<head>
<meta content="main" name="layout">
<r:require modules="jqmdatebox,jqmgrid960,updateTees"/>
....
</head>
<body>
....
<g:javascript>
var zselect = document.getElementById('tee')
var zopt = zselect.options[zselect.selectedIndex]
</g:javascript>
</body>