Update: I've isolated this error to registering the onchange event in this select. If I remove the onchange, the page renders without error, otherwise I get the No javascript provider error.
<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>
For various reasons I'd like to include jQuery using the resources Plugin instead of the the jQuery Plugin. It's mostly working but I have a page that will not render and is instead issuing the error No javascript provider is configured.
My ApplicationResources.groovy defines jquery:
jquery {
resource url: 'js/jquery/jquery-1.9.1.min.js', disposition: 'head'
}
My main.gsp layout looks like this:
<head>
<g:layoutHead/>
<g:javascript library="jquery"/>
<r:require module="jquerymobile"/>
<r:layoutResources />
</head>
The page issuing the provider not configured error looks like this:
<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>
Since you're manually setting the JQuery resource, there's no need to set:
Instead, just require your module:
EDIT
Looking at your new info, I think that your issue is with the
remoteFunctionmethod. Since it needs to know which javascript library you're using. Try adding<g:setProvider library="jquery"/>to your page.