I'm trying to invoke bean method from JSF command button, but I keep getting an error
javax.faces.FacesException: wrong number of arguments
This is the code in my page:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:dmx="http://java.sun.com/jsf/composite/dmx"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
<head>
<title>TODO supply a title</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<ui:composition>
<h:form>
<div id="child"></div>
<h:panelGroup>
<h:outputText value="Hello, DEMUX JSF!"
style="color: #{dmxAdapter.model.get('testData') ? 'green' : 'red' }" />
<h:commandButton value="Click me"
action="#{dmxAdapter.invokeController('com.vektorsoft.demux.samples.hello.HelloController')}" />
</h:panelGroup>
</h:form>
</ui:composition>
</body>
</html>
If I change action attribute to call method without parameters, everything works fine. I'm running this in Jetty inside OSGI container. JSF version is Mojarra 2.2.6 and EL 3.0.
I've read multiple answers mentioning that EL 2.2 and above is required for this to work,a nd I think EL 3.0 should work also. This is added as Maven dependency:
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<version>3.0.0</version>
</dependency>
Can anybody shed any light on what might be wrong here?