small medium large xlarge

Back to: All Forums  Grails
Generic-user-small
20 Jul 2010, 17:06
John Seals (2 posts)

In Chapter 4 the dynamic finder TekUser.findByFullName setup in BootStrap.groovy doesn’t seem to work properly for me. Instead of getting the fullName I am still getting ‘tekdays.TekUser : 1” when I navigate to http://localhost:8080/TekDays/tekEvent/show/1

This seems like a very simple relationship but I am not getting it to work.

Thanks.

Generic-user-small
20 Jul 2010, 20:47
John Seals (2 posts)

OK this was easy after all and I think it points to some errata in the book. When creating the TekUser domain class you have to use the “toString()” method as follows:

String toString(){ “$fullName” }

Otherwise it will not work in the view layer.

I have submitted this as errata to the author.

Dklein_tiny_pragsmall
21 Jul 2010, 06:02
Dave Klein (34 posts)

Thanks John. I’ll take a look at it.

Dave

You must be logged in to comment