0

I'm trying to learn JSF and EL and I am facing the following error:

/index.xhtml @20,120 actionListener="#{contatosController.adicionar(actionEvent)}" Q

What does that mean and how can I solve it?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555

1 Answers1

0

It means that your environment does not support the EL 2.2 feature of invoking methods with arguments. The EL syntax #{bean.method(argument)} is unsupported in EL 2.1 and older and therefore unparsable. Just get rid of that argument. JSF fills it in by itself anyway.

actionListener="#{contatosController.adicionar}"

Please note that even if you upgraded to EL 2.2, it would still end up in trouble as you're essentially passing null to it (you don't have a managed bean #{actionEvent}, right?). You should actually never need to specify the default argument of a JSF (action)listener method yourself.

See also:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555