java:
@Named
@RequestScoped
public class Bean {
public void method() { }
public void method(AjaxBehaviorEvent
e) { }
}
So JSF use createMethodExpression with
AjaxBehaviorEvent
as
parameter class
and then invoke it.
This works when no params or
AjaxBehaviorEvent is defined as parameter in the bean.
There is another case how a user can pass custom params to that method:
<f:ajax event="click" listener="#{bean.method(component)}" />
public void method(UIComponent component) { }
In this case "component" is resolved by a custom ELResolver.
The issue discussed in the GitHub link is a combination of both.
How can i receive the param from JSF (AjaxBehaviorEvent) and pass my custom UIComponent?
<f:ajax event="click" listener="#{bean.method(xxx, component)}" />
public void method(AjaxBehaviorEvent
e, UIComponent component) { }
AFAIR someone of the PF users used it like this:
<f:ajax event="click" listener="#{bean.method(javax.faces.event.AjaxBehaviorEvent, component)}" />
But im not sure if this is supposed to work or just a random behavior of the EL impl?
Best regards,
Thomas