Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.0.3
-
Fix Version/s: None
-
Component/s: Ajax
-
Labels:
-
Environment:Windows 7, jdk 7+, grails 2+
Description
View:
<html>
<head>
<title>Random Quote</title>
<g:javascript library="prototype"/>
</head>
<body>
<ul id="menu">
<li>
<g:remoteLink action="ajaxRandom" update="quote">
Next Quote
</g:remoteLink>
</li>
<li>
<g:link action="list">
Admin
</g:link>
</li>
</ul>
<div id="quote">
<q>$
</q>
<p>$
{quote.author}</p>
</div>
</body>
</html>
Controller:
def ajaxRandom = {
def randomQuote = quoteService.getRandomQuote()
render "<q>$
</q>" +
"<p>$
</p>"
}
Not updated, and renders a separate page.
Help me!
Thank you!
I am facing the same issue. I guess the prototype plugin has not been installed (this used to be default in older grails versions).
Can you check with:
what plugins you have available?
Pls refer to http://programmingitch.blogspot.com/2012/03/ajax-examples-upgraded-to-grails-200.html
I also changed my reference to javascript lib to:
<g:javascript library="prototype" plugin="prototype"/>and changed the default setting in Config.groovy:
grails.views.javascript.library = "prototype"Still, no success
. I also get the page with only the quote. When I look at the html source code of the random page, the prototype lib has not been loaded.