kristianmandrup / gsp-snippets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gsp snippets

Groovy Server Pages (GSP) snippets for use with Groovy on Grails.

Features

Snippets included

  • dollarsign: ${}
  • gactionsubmit: Generates a submit button that maps to a specific action",
  • gcheckbox: Generates a checkbox form field
  • collect: Uses the Groovy JDK collect method to transform objects in a list by a expression
  • gcreatelink: Creates a link that can be used in a href, JavaScript, AJAX call, etc
  • geach: Uses the Groovy JDK each method to iterate the specified list
  • gelse: The logical else tag
  • gelseif: The logical elseif tag
  • gelseifenv: The logical elseif tag for an environment
  • gfield: Creates an input field where the user can enter data
  • gfindall: Uses the Groovy JDK findAll method to find objects that match the expression
  • gfor: Uses the each tag with a range of numbers
  • gform: Creates a form that submits to a controller and action
  • ghid: Creates a input of type hidden
  • gif: The logical if tag to switch on an expression
  • gifenv: The logical if tag to switch on an expression and/or current environment
  • gimg: Renders an HTML img tag for an image resource
  • gjs: Includes inline JavaScript
  • gjslib: Includes a JavaScript library
  • gjssrc: Includes a JavaScript script
  • glink: Creates an html anchor tag with the href set based on the specified parameters
  • glinkm: Creates an html anchor tag for the specified named mapping
  • gmsg: Resolves a message from the given code and args (if any)
  • gpwd: Creates a input of type 'password'
  • gradio: Generates a radio button
  • gradiogroup: Generates radio button groups
  • grender: Applies a template against a model
  • gselect: Generates HTML select for the given list
  • gselectbind: Generates HTML select for the given list with key-value binding
  • gset: Sets the value of a variable accessible with the GSP page
  • gs: "${}\
  • gtext: Creates an input of type 'text'
  • gtextarea: Creates a HTML text area element
  • gwhile: Executes a condition in a loop until the condition returns false

Requirements

Snippets are made available only in .gsp files

Extension Settings

Currently no settings are available.

Known Issues

None

Release Notes

1.0.0

Initial release of GSP snippets extension.

Enjoy!

About