title: jsf - retrieve parameters from ajax request
body: <p>How can I add a parameter to an <code>a4j:commandLink</code>? The parameter's always null when I check in debug mode.</p>
  
  <p>webcode:</p>
  
  <pre><code>&lt;a4j:form&gt;
      &lt;a4j:commandLink reRender="content" action="#{surveyEvaluationBean.doDetailEvaluation}"&gt;
          &lt;f:param name="question" value="#{result.question.pK.longValueAsString}" /&gt;
          &lt;h:graphicImage url="/survey/img/cloverleaf.jpg" styleClass="srv-analysis-cloverleaf" /&gt;
      &lt;/a4j:commandLink&gt;
  &lt;/a4j:form&gt;
  </code></pre>
  
  <p>bean:</p>
  
  <pre><code>HttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
      String param = request.getParameter("question");
  </code></pre>
  
  <hr>
  
  <p>I just found the error. There's nothing wrong with the <code>a4j-components</code>, the error was the following: I couldn't create the question-object correctly. So the PK was really null. I'm sorry for wasting your time guys. </p>