简体   繁体   中英

Grails formRemote tag error

I have been using grails for several weeks now, and have run into this problem when using the g:formRemote tag.

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

for reference here is the .gsp page

<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>

I can't for the life of me figure out why the g:formRemote tag causes a problem, but other tags (run on different pages -- this one won't render) such as g:each will run without a problem. Thanks.

Most likely you are working on a Grails version that does not support "g:formRemote" any more. The formRemote tag and other Ajax related tags have been deprecated. You might want to think about a different approach.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM