Code based on http://kapilpandit.wordpress.com/2009/02/25/complex_form_grails/