grails


http://docs.codehaus.org/display/GRAILS/0.5+Release+Notes

Le cose + interessanti sembrano:

- La possibilità di definire liste ordinate (array) con GORM (http://grails.org/GORM+-+Collection+Types#GORM-CollectionTypes-Listsofobjects%28Since0.5%29)

- Il Custom Url Mapping : per associare un url ad un controller http://grails.org/URL+mapping

In services/Util.grails

def public static round2={x| Math.round(x*100)/100}

while in the controllers you can call:

Util.round2.call(ter)

Note: Util.round2(ter) does NOT work if the definition is the service while it works in the console

In formtaglib.groovy:

def dateFormat = { attrs ->
out << new java.text.SimpleDateFormat(attrs.format).format(attrs.date)
}

And in the page:

<g:dateFormat format=”dd-MM-yyyy” date=”${ter.date}”/>