Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there “server-side comments” in JSF / Seam / RichFaces?

With the JSF/Seam/RichFaces stack, is there a way to mark up comments (on XHTML pages) so that they will not be included in the HTML output? I.e., something like JSP's <%-- comments --%>, as opposed to normal <!-- comments -->.

I heard that facelets.SKIP_COMMENTS context-param migth do this for normal HTML comments, but is there any other option? (After all, there might be some comments that you want included in the page output and some that you don't.)

like image 615
Jonik Avatar asked Apr 26 '10 14:04

Jonik


2 Answers

Found an answer in a thread on the JSF for nonbelievers forum of IBM developerWorks:

<ui:remove><!--
    <tags you want to remove/>
--></ui:remove>

See the official Facelets documentation of ui:remove for more information.

like image 117
eh. Avatar answered Nov 08 '22 17:11

eh.


Use the facelets.SKIP_COMMENTS context-param. You won't need comments in the generated pages. They are not meant to be human-readable anyway.

like image 42
Bozho Avatar answered Nov 08 '22 18:11

Bozho