Hi

Sorry for the late response. The problem is jsp uses
UICommand.setActionListener method, but in facelets things are different.

Look this class:

http://svn.apache.org/repos/asf/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ActionSourceRule.java

If the target is instance of ActionSource, setActionListener is used, but if
is ActionSource2, the listener is added through addActionListener and use a
wrapper (javax.faces.event.MethodExpressionActionListener).

The problem is there is no underlying MethodBinding in this case.

The solution could be create a custom ComponentTagHandlerDelegate with a
special rule for ActionSource. I think it is the right moment to get the EL
expression.

regards,

Leonardo

2011/2/7 Rudy De Busscher <[email protected]>

> Hi all,
>
> For an ExtVal-addon I need to have access to the expression string of the
> actionListener property of a command button.
>
> So when i have
> *<h:commandButton id="check" value="Validate"
> actionListener="#{personBean.someActionListener}"/>*
> I need #{personBean.someActionListener}.
>
> In JSF 1.X, you could get the MethodBinding by calling
> *actionCommand.getActionListener() *
> but now it returns null. *The method is deprecated but maybe this is a bug
> that the old behaviour isn't respected?*
>
> I can access the actionListener by calling
> *actionCommand.getActionListeners()*
> but then I get the interface object back and not the underlying
> MethodBinding.
>
> Anyone an idea?
>
> Thx
> Rudy.
>

Reply via email to