0

I am using a to display list of profilenames.

<g:select name="ProfileSelector" from='${ProfileList?.profileName}' id='ProfileSelect' noSelection="['null':' SELECT VT']" disabled="true" />

So profile list is type of profiles having profilename,profileid,profileDescription. On submit I was only able to access the profileName selected as param in the controller.Is there any way that I could pass the profileId of corresponding profileName as param.

Suryateja Kosaraju
  • 493
  • 1
  • 7
  • 14

1 Answers1

5

Yes, by using the optionKey and optionValue parameters. Have a look at http://grails.org/doc/2.0.x/ref/Tags/select.html for more info.

GreyBeardedGeek
  • 29,460
  • 2
  • 47
  • 67