title: jsf conditionally set id
body: <p>i have a custom tag and want to allow to set the id of an inner element</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"&gt;
  
  &lt;f:subview rendered="#{not empty id}"&gt;
      &lt;h:message styleClass="message" id="#{id}" errorClass="message error"
          warnClass="message warn" for="#{element}" /&gt;
  &lt;/f:subview&gt;
  &lt;f:subview rendered="#{not id}"&gt;
      &lt;h:message styleClass="message" errorClass="message error"
          warnClass="message warn" for="#{element}" /&gt;
  &lt;/f:subview&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>but i always get </p>
  
  <pre><code>Empty id attribute is not allowed
  </code></pre>
  
  <p>how can i archieve that when the user sets an id it is used, and when not jsf should generate it by its own</p>