remoteField

Purpose

Creates a text field that sends its value to a remote link when it changes. By default the parameter name sent is called 'value', this can be changed by specifying a 'paramName' attribute.

Examples

Example controller for an application called "shop":

class BookController {
    def changeTitle = {
       def b = Book.get(params.id)
       b.title = params.value
       b.save()
    }
}

Example usages for above controller:

<g:remoteField action="changeTitle" update="titleDiv"  name="title" value="${book?.title}"/>

<div id="titleDiv">I'm updated with the new title!</div>

Description

Attributes

Events

Source

Show Source