Wednesday 15 May 2013

gorm - Change the value of an on grails -


I have & lt; G: select & gt; is one-to-many relationships, but I want to show it my class name (specialty) rather than ID.

It shows something like this:

  com.petshop.Category: 1   

I use this code on this view :

  & lt; G: select id = "subcategory" name = "subcategory.id" = "$ {com.petshop.Category.list ()}" optionKey = "id" required = "" value = "$ {Veterinary category". For example, instead of " Birs ", instead of " com.petshop.Category: 1", what should I change / add / remove / show < / Code>  

> "This is the object's ID.

Will this work?

  & lt; G: "id =" subcategory "name =" $ {com.petshop.Category.list (* * *) "optionKey =" id "optionValue =" name "is required" subcategory.name "=" "value = "$ {Veterinary class ... .name}" />    

No comments:

Post a Comment