2 Replies Latest reply on Dec 13, 2007 9:57 AM by junkie

    Facelets: Ways to output code that shall be unparsed

    junkie

      If you use Facelets:

      How can one output a fragment like this? The tags will cause errors as this is not well-formed.

      This is code for Google-Analytics

      if(typeof(urchinTracker)=='undefined')document.write('<sc'+'ript src="'+\
      'http'+(l=document.location.protocol=='https:'?'s://ssl':'://www')+\
      '.google-analytics.com/urchin.js'+'"></sc'+'ript>')


      I have put the code into a properties file and use this to output it, however I don't like this solution. Do you know a better one?

      <h:outputText escape="false" value="#{...}" />