How to use message properties in TagLib
As I try to use a message properties开发者_高级运维 in taglib of my grails application it is empty.
<g:set var="pos" value="${message(code:"rating.positive.title")}" />
<foo:bar someNew="bla" positiveTitle="${pos}" bean="${item}" />
results in log of the attrs of taglib (def bar)
someNew=bla
positiveTitle=
bean=item
Any idea why this won't work as expected?
Check your Quotation marks " vs '
.
I'd try:
<g:set var="pos" value="${message(code:'rating.positive.title')}" />
instead of:
<g:set var="pos" value="${message(code:"rating.positive.title")}" />
精彩评论