1
我一直在使用Grails幾個星期,並且在使用g:formRemote標記時遇到了這個問題。Grails formRemote標記錯誤
org.grails.taglib.GrailsTagException: [views/inventoryDetails/details.gsp:21] [views/inventoryDetails/details.gsp:21] Tag [formRemote] does not exist. No tag library found for namespace: g
參考這裏是.gsp頁
<html>
<head>
<meta name="layout" content="bccmain" />
<title>Details - BCC Virtual Map and Inventory Tracker</title>
<g:javascript library="jquery" />
<link rel="stylesheet" href="${resource(dir: 'css', file: 'details.css')}" type="text/css">
<script>
$(document).ready(function() {
$("#database").addClass("active");
});
</script>
</head>
<body>
<div id ="content">
<g:formRemote name = "detailsUpdateForm" url = "[controller: 'InventoryDetails',action: 'ajaxUpdate']" update="updateBox">
<g:each in ="${details}" var = "d" status = "i">
<g:textField name="details" value = "${d.details}" class = "detailsblock"/>
<g:hiddenField name ="id" value = "${d.id}" />
<g:submitButton name = "submit" value = "Save" />
</g:each>
</g:formRemote>
<div id = "updateBox"></div>
</div>
</body>
</html>
我不能爲我的生命弄清楚爲什麼G:formRemote標籤會導致一個問題,但其他標籤(在不同的運行頁面 - 這個不會渲染),比如g:每個都會運行,沒有問題。謝謝。
什麼版本的Grails?所有遠程標記都是舊的,並且在更高版本的Grails中不再受支持。 (或將被完全刪除) –