title: Passing parameter to a4j:ajax
body: <p>We are upgrading from jsf 1.2 to jsf 2. 
  We are using apache myfaces 2.1 and rich faces 4.3.</p>
  
  <p>Below is the xhtml code : </p>
  
  <p>Prior to Migration : </p>
  
  <pre><code>&lt;h:selectBooleanCheckbox id="comp1" value="#{bean.select}"&gt;
                          &lt;a4j:support event="onclick" ajaxSingle="true" actionListener="#{bean.processInput}" reRender="compId"&gt;
                                  &lt;f:param name="name" value="paramValue"/&gt;
                              &lt;/a4j:support&gt;  
  &lt;/h:selectBooleanCheckbox&gt;
  </code></pre>
  
  <p>We are passing one parameter with  and accept the parameter in actionListener method as : <code>(String)context.getExternalContext().getRequestParameterMap().get("name1");</code>    </p>
  
  <p>After Migration :</p>
  
  <pre><code>&lt;h:selectBooleanCheckbox id="comp1" value="#{bean.select}"&gt;
                  &lt;a4j:ajax event="click" listener="#{bean.processInput}" execute="@this" render="compId"/&gt;                  
  &lt;/h:selectBooleanCheckbox&gt;
  </code></pre>
  
  <p>I want to pass a parameter to bean.processInput method which has following signature : </p>
  
  <pre><code>public void processInput(AjaxBehaviorEvent event){
  </code></pre>
  
  <p>According to this post - <a href="https://stackoverflow.com/questions/10396244/issues-in-passing-parameter-in-fajax">Issues in passing parameter in f:ajax</a> , we cannot use <code>&lt;f:param&gt;</code> (its not working 
  also) and we are not using EL 2.2 which rules out passing parameter in method signature.</p>
  
  <p>Since we cannot use context.getApplication().evaluateExpressionGet due to constraints in our xhtml page only option available is 
  use <code>&lt;a4j:param name="" value="" assignTo=""/&gt;.</code>
  But this needs to have one variable defined in bean requiring code change.</p>
  
  <p>So my question is can we pass a parameter from UI to listener in second case and without changing the code.</p>