Output « Facelets « JSF Q&A

1. Output XML from JSF2 with Facelets    stackoverflow.com

I would like to return a well-formed XML document when a user clicks on a specific link in my JSF2 application. I have the link working which goes to an xhtml page ...

2. Default output when h:message is empty    stackoverflow.com

I'm looking for a way to achieve the following switch in JSF:

   if empty(<h:message for="x">)
     <h:outputText value="default value" />

3. Output arbitrary tag element in Facelets?    stackoverflow.com

I want to output a tag with dynamic attributes like:

<foo attr1="val1"
Where attribute names is unknown in compile ...