0

We read in a question and its answers, that we could tell JSF engine not to escape the values of an element:

<h:outputText value="#{messages.text}" style="font-weight:bold" escape="false" />

But how should I prevent escape on the whole template. My page reads a template from a http-url, which has contents that are semi-dynamic. That semi-dynamic template has mime-escaped encoded chars in it.

<ui:composition template="#{template.url}" ...

I tried doing

<ui:composition template="#{template.url}" escape="false"

But it does not work. Perhaps because, ui:composition does not take an escape attribute.

How do I prevent escape-effect on the whole template?

Community
  • 1
  • 1
Blessed Geek
  • 21,058
  • 23
  • 106
  • 176
  • AFAIK you can not do this. However if you want to retrieve dynamic content you can output it directly in the template with something like ``. – ForguesR May 08 '15 at 19:37
  • where do you load the template from? Do you use a `ResourceResolver`? – Kukeltje May 08 '15 at 21:21
  • The template is a web page, served by an apache httpd. – Blessed Geek May 08 '15 at 22:54
  • Pls read up on this, if you don't know what a template url is: http://www.jsftoolbox.com/documentation/facelets/10-TagReference/facelets-ui-composition.html – Blessed Geek May 08 '15 at 23:13
  • I don't get it: 1. MIME escaping is not HTML escaping - MIME escaped characters should need no special HTML escaping. 2. I can't find the term "template url" or even "url" on the given page. But what it states, and what the specification says: The template has to be a valid facelets file, not just a HTML page. 3. _But it does not work_ is a very unspecific description. – Tobias Liefke May 09 '15 at 19:28

0 Answers0