tags:

views:

52

answers:

1

Get the list of values for g:select from controller action.

A: 

Assuming you would like a list of "user" instances, your controller would look something like:

def myAction = { [userInstanceList : User.list()] }

Then in your view, you could use the g:select tag as follows:

<g:select from="${userInstanceList}" value="blah" />
Rich Kroll