开发者

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")}" />
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜