Hi Ganesh,

This is a known problem of the JSF 2.0 spec, see [1]. Sadly it was
(re-)targeted for 2.2.

The problem is that when the ation listener is retargeted (from the
composite component to the inner (implementation) component), it
cannot be retargeted to another composite component, because this one
does not implement ActionSource2. IMO we could try to implement a
working solution already in MyFaces 2.0.x, but I don't know if this
stuff is tested by the TCK..

Regards,
Jakob

[1] https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=755

2010/10/12 Ganesh <gan...@j4fry.org>:
> Hi,
>
> If my test page calls a composite component in level 1:
>
>        xmlns:level1="http://java.sun.com/jsf/composite/level1";
>
>        <level1:button value="test1">
>                <f:actionListener for="button1" binding="#{myBean.action1}"
> />
>        </level1:button>
>
> where level1 button passes the action listener on to level 2:
>
>        xmlns:level2="http://java.sun.com/jsf/composite/level2";
>
>        <!-- INTERFACE -->
>        <composite:interface>
>                <composite:attribute name="value"/>
>                <composite:actionSource name="button1" />
>        </composite:interface>
>
>        <!-- IMPLEMENTATION -->
>        <composite:implementation>
>                <level2:button id="button1" value="#{cc.attrs.value}"/>
>        </composite:implementation>
>
> and level 2 finally consumes the action:
>
>        <!-- INTERFACE -->
>        <composite:interface>
>                <composite:attribute name="value"/>
>                <composite:actionSource name="button2" />
>        </composite:interface>
>
>        <!-- IMPLEMENTATION -->
>        <composite:implementation>
>                <h:commandButton id="button2" value="#{cc.attrs.value}" />
>        </composite:implementation>
>
> Shouldn't this call the ActionListener returned by getAction1()? In fact it
> doesn't, if you agree that it should I will open an issue.
>
> Best regards,
> Ganesh
>



-- 
Jakob Korherr

blog: http://www.jakobk.com
twitter: http://twitter.com/jakobkorherr
work: http://www.irian.at

Reply via email to