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

冷暖自知 提交于 2019-12-01 16:19:21

问题


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.


回答1:


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" />


来源:https://stackoverflow.com/questions/5263453/including-html-in-jsf-resource-bundle-string-possible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!