Javax.el.MethodNotFoundException: Method not found: TableBeanDetail@bd4053.onRowSelect ()

I am getting the following error when I click the commandbutton on the datatable that appears on every line. Looking at the example, I understand that after pressing the control key, the following code is first executed

 <f:setPropertyActionListener value="#{detailRow}" target="#{tableBeanDetail.selectedEntry}" />  


and then the code associated with the following bean method

  <p:commandButton id="detailsButton" actionListener="#{tableBeanDetail.onRowSelect}" icon="ui-icon-
      search" title="View Details">  


where in my onRowSelect I am trying to do the following:

  public String onRowSelect(ActionEvent event) throws Exception {

    // Get key fields from row data and set the parameters that needs to be passed w


I am getting the following error:


source to share

1 answer

Methods actionListener

must have the following signature:

public void someMethodName(ActionEvent event) {
    // ...


where ActionEvent

has a package javax.faces.event

(and therefore a package java.awt


However, you are returning String

and it is not clear if your ActionEvent

package is correct. But you seem to want to navigate. You should use action

instead actionListener

and remove this argument ActionEvent


public String onRowSelect() {
    // ...


See also:



All Articles