Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I believe you got confused by builtin XSS prevention of JSF which caused your "plain vanilla" HTML to get escaped and thus displayed as-is instead of being interpreted as part of HTML source. Given that you're familiar with PHP, the explanation is that JSF has basically PHP's <a href="http://www.php.net/manual/en/function.htmlspecialchars.php" rel="nofollow noreferrer"><code>htmlspecialchars()</code></a> by default turned on in all EL expressions printing output.</p> <p>Just use <code>&lt;h:outputText&gt;</code> with <code>escape</code> attribute set to <code>false</code> to turn off implicit HTML escaping.</p> <pre class="lang-html prettyprint-override"><code>&lt;h:outputText value="#{bean.html}" escape="false" /&gt; </code></pre> <p>Please make sure that you're fully aware of the potential XSS attack hole created here when it concerns user-controlled input. Your question at its own already indicates that you had no idea of it.</p> <h3>See also:</h3> <ul> <li><a href="https://stackoverflow.com/questions/7722159/csrf-xss-and-sql-injection-attack-prevention-in-jsf/7725675#7725675">CSRF, XSS and SQL Injection attack prevention in JSF</a></li> <li><a href="https://stackoverflow.com/questions/5539894/is-it-suggested-to-use-houtputtext-for-everything/5540859#5540859">Is it suggested to use h:outputText for everything?</a></li> </ul> <hr> <p>As to the concrete functional requirement,</p> <blockquote> <p><em>This is because I want to add three different primefaces components each time a user clicks on one of the component that has been added. I could not achieve this with taglibs.</em></p> </blockquote> <p>Please note that JSF code is not HTML code. You should instead be writing those JSF components directly in the view and use the <code>rendered</code> attribute to render them conditionally.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload