Last updated by 3 years ago

Page: 1.3.6 Release Notes, Version:5

Grails 1.3.6 Release Notes

Grails is a dynamic web application framework built on Java and Groovy, leveraging best of breed APIs from the Java EE sphere including Spring, Hibernate and SiteMesh. Grails brings to Java and Groovy developers the joys of convention-based rapid development while allowing them to leverage their existing knowledge and capitalize on the proven and performant APIs Java developers have been using for years.

New Features & Improvements

Attributes On link Namespace Tags

Tags in the link namespace now support an attrs attribute.

<link:accountDetails attrs="[class: 'fancy']" acctNumber="8675309">Show Account</link:accountDetails>

That would result in:

<a href="/details/8675309" class="fancy">Show Account</a>

GORM Now Supports beforeValidate

class Person {
   String name
   static constraints = {
       name size: 5..45
   }

def beforeValidate() { name = name?.trim() } }

class Person {
   String name
   String town
   Integer age
   static constraints = {
       name size: 5..45
       age range: 4..99
   }

def beforeValidate(List propertiesBeingValidated) { // do pre validation work based on propertiesBeingValidated } }

Updated libraries

This release updates Spring Framework to 3.0.5, Commons DBCP to 1.3, Commons Pool to 1.5.5, and Commons Codec to 1.4.

New run-script command

You can now run one or more Groovy scripts from the commandline using the run-script command, e.g.

grails run-script [path-to-script-1] [path-to-script-2]...[path-to-script-n]

This works around the issue in Gant scripts where you can't conveniently access application classes since they're not available in the classpath when the scripts start.