网格形式远程

I have DateFrom and DateTo fields. I want to submit those data to action which will do some business logic but nothing changes on the original GSP, and nothing is updated. How do I manage this? I've tried this:

<g:formRemote name="formName" url="[action: 'myAction']">

Everything is fine but except my action tries to render myAction.jsp.

This is a great place to read how it works.

Basically you need to specify what controller as well:

<g:formRemote name="formName" update="updateMe" url="[controller: 'controller', action:'myAction']">

The "updateMe" is the id of an html-object, preferably div, that you want to alter after submit (but it's not mandatory). It also uses the actionName.gsp to "supply" the answer, this is why you need to have this page create as well.

Remote forms are a bit tricky in the beginning, but they're super simple once you get a hang of it!

This is how I did it:

GSP:

<g:formRemote name="formName" update="updateMe" url="[controller: 'controller', action:'myAction']">
<div id="updateMe">
    <g:render template="updateTemplate"/>
</div>

Action:

...
render template:"updateTemplate"

updateTemlate and updateMe div are both empty.

If you have better solution please tell me.

you need to write submit button inside form and then after it will fire action and some changes shown into div..

you can use remoteFunction