开发者

using html tags in resource bundle

开发者 https://www.devze.com 2023-01-13 03:22 出处:网络
I try to put a message from a resource bundle which contains html tags like: application.portal.action.help=test <a href\\=\"https://google.ro\" target\\=\"_blank\">the opt in conditions</a&

I try to put a message from a resource bundle which contains html tags like:

application.portal.action.help=test <a href\="https://google.ro" target\="_blank">the opt in conditions</a>

in a jsf outputLabel:

<h:outputL开发者_如何学Goabel id="test" value="#{myupmessages['application.portal.action.help']}"></h:outputLabel>

Well...the text is rendered as a plain text iso of rendering the link.

Do you have any ideea ..why?

Thanks.


Solution found:

I do need to add:

escape="false"

to the outputLabel control :)

0

精彩评论

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