开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜