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