Span2field Plugin

  • Tags: /
  • Latest: 0.1.2
  • Last Updated: 21 January 2014
  • Grails version: 2.2.4 > *
0 vote
Dependency:
compile ":span2field:0.1.2"

 Documentation  Source  Issues

Summary

An easy way to make Grails views act like forms, allows you to click on a text element and edit the value in place, without navigating to an 'edit' page.

Installation

grails install-plugin span2field

Description

A simple Grails plugin providing a tablig that allows you to make spans editable. It is very easy to implement, as easy as any other of the delivered Grails input taglib tags (like g:textField and g:select).

The plugin's taglib tags create spans that display data, when the span is clicked the span is hidden and an input element appears, allowing you to edit the data, when you click out of (blur) the input element (or select an entry, in the case of the single select input element) the input element is hidden and the span reappears, containing the new value that was just input. The new data can be persisted either by submitting the form or using AJAX, which is built right in.

The plugin effectively combines the show and edit controller actions that grails generate-controller might produce, the result is a single view that both displays data and allows you to edit it inline, without having to navigate to another page.