0

I saw this question too, but I still can't make it work. I realized that when I calling a method it have red circle (aaaa) like regular method that returns void (Netbeans IDE). Here is aaaa method:

public void aaaa(ActionEvent event) {
    System.out.println("aaaaaaaaaaaaaa");
}

Is this a normal for Netbeans IDE? Anyway, normal or not, my method is never called. Just to mention I don't have nested forms!

Community
  • 1
  • 1
CallanSM
  • 303
  • 2
  • 10
  • 20

1 Answers1

0

In addition to the question which you found commandButton/commandLink/ajax action/listener method not invoked or input value not updated, the following must be made sure for an actionListener:

  • Ensure that the argument of an actionListener method is javax.faces.event.ActionEvent and not something else such as java.awt.ActionEvent which the average IDE autosuggests as 1st match.

Is there by the way any particular reason you're using actionListener instead of action here?

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • I am using the right Class - javax.faces.event.ActionEvent. Actually I make it work putting immediate="true" attribute. Can you please explain me why it work with it, and not without. – CallanSM Aug 24 '11 at 19:18
  • 1
    Then you've a validation/conversion error in an input element which is not covered by `immediate="true"`. Check point 3 of the answer on the question which you found. Add `` to be notified of any missing errors, or read the server logs. – BalusC Aug 24 '11 at 19:22