2016-08-19 75 views
0

我試圖從我的測試控制器&中獲取一個簡單的form.gsp頁面,在我的gsp頁面中出現錯誤。錯誤:找不到名稱空間的標籤庫:g

URI 
/test/form 
Class 
org.grails.taglib.GrailsTagException 
Message 
Request processing failed; nested exception is org.grails.gsp.GroovyPagesException: Error processing GroovyPageView: [views/test/form.gsp:25] [views/test/form.gsp:25] Tag [remoteFunction] does not exist. No tag library found for namespace: g 
Caused by 
[views/test/form.gsp:25] [views/test/form.gsp:25] Tag [remoteFunction] does not exist. No tag library found for namespace: g 

試過下<head>標籤添加以下代碼

<g:javascript library='jquery' /> 
<r:layoutResources/> 

也試過在build.gradle文件,但一切都是徒勞

增加運行jQuery的依賴性使用以下版本

grailsVersion=3.1.10 
gradleWrapperVersion=2.13 

會感謝任何幫助!
P.S: - 我只是Grails Groovy的初學者因此,我的疏忽道歉!

+0

你可以發佈你的代碼來渲染表單嗎? – Abs

+0

remoteFunction http://stackoverflow.com/questions/25245689/since-gremotefunction-in-grails-2-4-x-is-deprecated-what-should-i-use-instead – Vahid

回答

2

它看起來像你還沒有安裝ajax-tags插件。您需要在build.gradledependencies部分中找到類似runtime 'org.grails.plugins:ajax-tags:1.0.0.RC1'的內容。

+0

謝謝傑夫!我錯過了這個插件。非常感謝 :):) – JavaAppUser

相關問題