Grails g:select list with "Yes" value
I have something like this is my view:
<g:select name="book" from="${['Yes', 'No']}"开发者_运维知识库/>
How can I do this in the controller:
if(params.book== "Yes"){
doSomething()
}
Because that if is always false, and I'm sure its because params.book== "Yes"
is a wrong way to do it, thats why it always tells me it's false.
精彩评论