title: passing url param to backing bean method
body: <p>I have the following code in my Facelet:</p>
  
  <pre><code>&lt;ui:composition template="/templates/mastertemplate.xhtml"&gt;
      &lt;ui:define name="pageTitle"&gt;
          &lt;h:outputFormat value="#{msgs.productPageTitle}"&gt;
              &lt;f:param value="#{param.productName}"/&gt;
          &lt;/h:outputFormat&gt;
      &lt;/ui:define&gt;
      &lt;ui:param name="categoryName" value="#{param.categoryName}"/&gt;
  
      &lt;ui:define name="content"&gt;
          &lt;p&gt;#{param.productName}&lt;/p&gt;
          &lt;h:form&gt;
              &lt;h:commandLink action="#{cartBean.addItemToCart(param.productName)}"&gt;
                  &lt;f:ajax event="action" render=":cart :cartPrice" /&gt;
                  &lt;h:graphicImage value="resources/img/addToCart.gif"/&gt;
              &lt;/h:commandLink&gt;
          &lt;/h:form&gt;
      &lt;/ui:define&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p>It prints the <code>#{param.productName}</code> as it should. The <code>cartBean</code> expects a <code>String</code> as argument for its <code>addItemToCart</code> method (I know this is terrible, but not my choice). I have set up a logger in my <code>cartBean</code> and it tells me that the parameter is not coming through, it is empty.</p>
  
  <p>If I do the following:           </p>
  
  <pre><code>&lt;h:commandLink action="#{cartBean.addItemToCart('someProductName')}"&gt;
      &lt;f:ajax event="action" render=":cart :cartPrice" /&gt;
      &lt;h:graphicImage value="resources/img/addToCart.gif"/&gt;
  &lt;/h:commandLink&gt;
  </code></pre>
  
  <p>I substitute the <code>#{param.productName}</code> for a string literal, it works fine. Why can't I pass the param value as argument? I get an <code>EvaluationException</code> which explains why my logger sees an empty string but I don't understand how I should do this then.</p>