Resolution: Works as designed
Affects Version/s: 2.1.14
Fix Version/s: 2.2.5
I'd like to have a couple of composite components: "toolbar" and "editor".
The toolbar is used in several edit pages, but can also be nested within the editor component.
I need ajax behavior on some pages, so I have the toolbar declare a clientbehavior like this:
toolbar.xhtml: <cc:clientBehavior name="save" targets="toolbarSaveBtn" event="action" />
When I use the toolbar directly in pages everything is fine, but if I attempt to nest the toolbar into the editor component and "bridge" the clientbehavior with:
editor.xhtml: <cc:clientBehavior name="save" targets="toolbar" event="save" />
(Where toolbar is the toolbar component id).
The containing page has:
<f:ajax event="save" listener="#
" execute="@form" render="@all"
When the toolbar internals are "inlined/copied" directly into "editor" it behaves like expected, when I put the toolbar into the editor component I see my listener getting triggered multiple (4 i think) times per click on the toolbar button.
When I do a view source in the browser it looks like the client behavior has been included twice in "onclick".