开发者

Including HTML in JSF resource bundle string - possible? [duplicate]

This question already has an answer here: Component to inject and interpret String with HTML code into JSF page (1 answer) Closed 6 years ago. 开发者_运维知识库

I am using a property defined in a resource bundle properties file in an h:outputText tag in my JSF page. Is it possible to include HTML in the property file string, so that I can display an image on the page? The reason that I can't do this directly in the page is that this has to be a configurable option for the operations team.


Yes, just set escape="false" on the <h:outputText> so that the value won't be HTML-escaped.

<h:outputText value="#{bundle['some.key']}" escape="false" />
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜