title: JSF rendering: condition of EL statement incorrect
body: <p>I have got a problem with my JSF-rendering. A given condition in Expression Language will not be executed in the right way.
  E.g:</p>
  
  <p><strong>Example 1</strong></p>
  
  <pre><code>&lt;f:param name="cat" value="#{product.category.uri}" rendered="#{product.category.parent.uri == null}" /&gt;
  &lt;f:param name="cat" value="#{product.category.parent.uri}" rendered="#{product.category.parent.uri != null}" /&gt;
  </code></pre>
  
  <p><strong>Example 2</strong></p>
  
  <pre><code>&lt;c:if test="#{product.category.parent.uri == null}"&gt;
      &lt;f:param name="cat" value="#{product.category.uri}" /&gt;
  &lt;/c:if&gt;
  
  &lt;c:if test="#{product.category.parent.uri != null}"&gt;
      &lt;f:param name="cat" value="#{product.category.parent.uri}" /&gt;
  &lt;/c:if&gt;
  </code></pre>
  
  <p><strong>Problem</strong></p>
  
  <p>In both examples, both my parameters will be added to my surrounding h:outputLink.
  I am not sure what other code to add, so if you guys need anything else in order to help me, I'll be happy to provide it.</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Example 3 (on request)</strong></p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
  
  &lt;ui:composition template="./WEB-INF/templates/base.xhtml"
                  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:c="http://java.sun.com/jsp/jstl/core"&gt;
      &lt;ui:define name="content"&gt;
          &lt;c:choose&gt;
              &lt;c:when test="#{webshop.productlist.size() &gt; 0}"&gt;
                  &lt;div id="spacer"&gt;
                      &lt;ui:repeat value="#{webshop.productlist}" var="product"&gt;
                          &lt;div id="block"&gt;
                              &lt;p&gt;
                                  &lt;h:outputLink value="product.xhtml"&gt;
                                      #{product.name}
                                      &lt;c:choose&gt;
                                          &lt;c:when test="#{product.category.parent.uri == null}"&gt;
                                              &lt;f:param name="cat" value="#{product.category.uri}" rendered="" /&gt;
                                          &lt;/c:when&gt;
                                          &lt;c:otherwise&gt;
                                              &lt;f:param name="cat" value="#{product.category.parent.uri}" /&gt;
                                          &lt;/c:otherwise&gt;
                                      &lt;/c:choose&gt;
                                      &lt;f:param name="product" value="#{product.uri}" /&gt;
                                  &lt;/h:outputLink&gt;
                              &lt;/p&gt;
                          &lt;/div&gt;
                      &lt;/ui:repeat&gt;
                  &lt;/div&gt;
              &lt;/c:when&gt;
  
              &lt;c:otherwise&gt;
                  (...)
              &lt;/c:otherwise&gt;
          &lt;/c:choose&gt;
      &lt;/ui:define&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p>I have cleaned up this example a bit, but the essence is there.
  I have replaced the first examples by a when/otherwise construction, whether my product.category.parent.uri is null or not, it will give me the first result in this case.</p>