title: conditional in JSF
body: <p>Can i do conditional logic with JSF, without JSTL tags ?</p>
  
  <p>For example, i made a composite component, and want to state, if the 'id' attribute is specified, then define the 'id' attribute, but if the 'id' attribute is not specified, then, dont specify the 'id' attribute.</p>
  
  <p>For now i have to use rendered attribute, but so many duplications in there, with only slight difference in specifying id or not.</p>
  
  <pre><code>&lt;composite:interface&gt;
      &lt;composite:attribute name="id" /&gt;
          ...
  &lt;/composite:interface&gt;
  
  &lt;composite:implementation&gt;
      &lt;!-- render this when id is specified, id attribute is defined --&gt;
      &lt;h:selectOneMenu 
                  id="#{cc.attrs.id}" 
                  label="#{cc.attrs.label}"
                  value="#{cc.attrs.value}"
                  rendered="#{cc.attrs.id != null}" ...&gt;
                  ...
      &lt;/h:selectOneMenu&gt;
  
      &lt;!-- render this when id is not specified, id attribute is NOT defined --&gt;
      &lt;h:selectOneMenu 
                  label="#{cc.attrs.label}"
                  value="#{cc.attrs.value}"
                  rendered="#{cc.attrs.id == null}" ...&gt;
                  ...
      &lt;/h:selectOneMenu&gt;
  &lt;/composite:implementation&gt;
  </code></pre>
  
  <p>Any ideas to avoid this duplication and do the conditional stuff more easily ?</p>
  
  <p>Thank you !</p>