submitToRemote

Purpose

Creates a button that submits the surrounding form as a remote ajax call serializing the fields into parameters.

Examples

Example controller for an application called "shop":

class BookController {
     def list = { [ books: Book.list( params ) ] }
     def show = { [ book : Book.get( params['id'] ) ] }
}

Example usages for above controller:

<g:form action="show">
        Login: <input name="login" type="text"></input>
        <g:submitToRemote update="updateMe" />
</g:form>
<div id="updateMe">this div is updated by the form</div>

Description

Attributes

Events

Source

Show Source