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>
I just resolved the same error what was caused from a g:remoteLink tag. I found that I need to call twice. Once in the head, and the other in the footer where you should be loading js files from. I also had to add jQuery as a plugin in BuildConfig.groovy
My main.gsp has
I have g:layoutHead last so jQuery loads before scripts that may need it.
If you are just inline some scripts you may want to look at
If you use this tag to render inline JavaScript code, it is recommended that you use the Resources plugin's tag to produce inline script that is included at the end of the body, or in the head if necessary - rather than inline. For more control use the Resources plugin's tag directly. -