title: JSF ActionListener Event
body: <p>I am using an ActionListener to find out if a next button was pressed, I plan to have a previous button implemented later.</p>
  
  <p>This is the xhtml</p>
  
  <pre><code>&lt;h:commandLink styleClass="btn btn-info" id="tablePagerNext"
                              value="Next" actionListener="#{records.increnemt}"&gt;
                              &lt;f:ajax render="dataTableRecords" /&gt;
                          &lt;/h:commandLink&gt;
  </code></pre>
  
  <p>Now that is supposed to call my method here:</p>
  
  <pre><code>public void increnemt(ActionEvent e){
          System.out.println("The action taken was " + e.getComponent().getAttributes().get("action"));
      }
  </code></pre>
  
  <p>Where based on the action it will call an appropriate method (This just prints out The action taken was null). I know that in <code>swing</code> you can do</p>
  
  <pre><code>if(e.getSource == jButton){
   //do this
  }else{}
  </code></pre>
  
  <p>in JSF there is a <code>.getSource()</code> what I am not sure of is what that source is based on the xhtml above. I am not really sure what I am looking for when the event fires. </p>
  
  <p>Could someone clear this up for me?</p>