在资源包中使用html标签(using html tags in resource bundle)

编程入门 行业动态 更新时间:2024-10-24 01:50:59
在资源包中使用html标签(using html tags in resource bundle)

我尝试从包含html标签的资源包中放入一条消息,例如:

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

在jsf outputLabel中:

<h:outputLabel id="test" value="#{myupmessages['application.portal.action.help']}"></h:outputLabel>

嗯...文本呈现为呈现链接的纯文本iso。

你有什么想法..为什么?

谢谢。

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:outputLabel 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.

最满意答案

解决方案:

我需要添加:

escape="false"

到outputLabel控件:)

Solution found:

I do need to add:

escape="false"

to the outputLabel control :)

更多推荐

portal,iso,action,test,电脑培训,计算机培训,IT培训"/> <meta name="descri

本文发布于:2023-08-07 00:52:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1457911.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:包中   标签   资源   resource   bundle

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!