NerdGerl

Posts Tagged ‘grails

Grails Pagination with Multiple Order Clauses – How To

Posted by: nerdgerl on: August 25, 2009

There is a known bug in grails where you can’t have multiple order by’s when returning a PagedResultList. When talking about the .createCriteria().list() method it seems you can only specify the order by inside the .list() method and not in the builder body itself even if only ordering by one values. This is very annoying [...]

Tags: ,

Populating a select box in Grails with values from database

Posted by: nerdgerl on: August 20, 2009

A fairly common requirement is to populate values in a select box/drop down box with values from a database. It’s quick and easy to do in Grails. Inside your Contorller, create your query in the closure associated with your view. Eg. I’m going to create a new object that contains a list of values from [...]

Tags: ,

Debugging in Grails

Posted by: nerdgerl on: August 20, 2009

Debugging your Grails app is just like remote debugging a regular java app. 1. Firstly in eclipse create a remote debugging configuration and click run. The default port is 5005. 2. Start up grails in debug mode. Do this by typing the following command: grails-debug run-app 3. That’s it! More info here.

Tags: ,

Follow

Get every new post delivered to your Inbox.