0

If I have the following domain using Grails 3

class Books {

   String Title
   String Description
   Author author
}

The generated scaffold create a dropdown list for author, which is good however, the values on the list contains;

webapp.author : 1
webapp.author : 2
webapp.author : 3

How can I make it display a field in the author domain, like author name and last name and remove project name, domain name and the id?

bill_dom
  • 71
  • 5

1 Answers1

0

You need to add this to you Author Domain

String toString() {
    "${AuthorName}"
}

Change AuthorName to the actual variable you want displayed on the dropdown list.