How to reference a grails GSP model variable indirectly e.g. via .get(…)

后端 未结 3 1538
终归单人心
终归单人心 2021-01-19 11:25

I\'m using a GSP for sending out emails based on the MailService plug-in. The sendMail closure passes (amongst others) body(view:..., model:myModel)

I k

3条回答
  •  萌比男神i
    2021-01-19 11:36

    You can use ${fieldValue(bean: book, field: 'title')}

    See: http://grails.github.io/grails-doc/latest/ref/Tags/fieldValue.html

提交回复
热议问题