title: How to pass an iterated parameter via ajax to a backing bean method
body: <p>So, I have a dataTable that looks like this:</p>
  
  <pre><code>                &lt;h:form&gt;
          &lt;h:dataTable value="#{backingBean.employeeLineItems}" var="emp"&gt;
              &lt;h:column&gt;
                  &lt;f:facet name="header"&gt;First&lt;/f:facet&gt;
                  #{emp.lastname}
              &lt;/h:column&gt;
              &lt;h:column&gt;              
                  &lt;f:facet name="header"&gt;Last&lt;/f:facet&gt;
                  #{emp.firstname}
              &lt;/h:column&gt;
              &lt;h:column&gt;
                  &lt;f:facet name="header"&gt;Actions&lt;/f:facet&gt;
                  &lt;h:commandButton value="View Details"&gt; 
                      &lt;f:ajax execute="#{setCurrentEmployeeId(emp.id)}" render="employeeDetails"/&gt; 
                  &lt;/h:commandButton&gt;
              &lt;/h:column&gt;
          &lt;/h:dataTable&gt;
                      &lt;h:outputText value="#{backingBean.employeeDetails}" id="employeeDetails"/&gt;
                  &lt;/h:form&gt;
  </code></pre>
  
  <p>For each row of the datatable, there is a button that I want to, when clicked, ajax the employeeLineItem id value over to a method that sets that id in the backing bean, and then renders the outputText tag with id "employeeDetails"  (The getEmployeeDetails method would use the employeeLineItem id to get the right employee details object from the database, of course) </p>
  
  <p>My solution doesn't seem to be working, does anyone know what I'm doing wrong?</p>