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:

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

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

I want to output a tag with dynamic attributes like:

<foo attr1="val1"
     attr2="val1"
     attr3="val1">
    Contents
</foo>
Where attribute names is unknown in compile ...