Working on RF-10862 [1], I've found that the behaviorSource check in RenderKitUtils is too restrictive. Specifically the check that the behaviorSource matches the clientId of the component. In the case of RF-10862, the behaviorSource is the Input nested within the autocomplete component. My suggested fix is to make the behaviorSource check less restrictive, and replace the equals check [2] with a startsWith check [3].

This indeed fixes the problem with RF-10862. I'm curious what others thing might be the consequences of such a change.

Thinking about it some more, the startsWith check would give a false positive when checking nested components. However, if we check for the JSF client ID sperator in the trailing piece, we would be more rigorous.

IMHO, this is a problem of autocomplete that should be providing correct behavior context with clientId explicitly set on rendering and utility class should not left changed. For example you can take a look at how Mojarra/MyFaces do this for select many checkbox component.

Alternatively, 'change' event can be called in the context of root component element.

if somehow "input" will be passed as a source (some durty javascript sent just from debug console or something like that) then it potentially could allow the behavior from input1 pretend to be bound to input2. But thats seems too fantasy case.

And I think that separatorChar check you made is really enough and should be the only problem.

This came up again with RF-12114. I again resolved the issue by firing secondary events. We need a more robust solution, as this undobtedly affects other components too.

The DOM event model supports bubbling of events, we should consider supporting a similar bubbling of events within event model of the JSF component tree. The startWith/separationChar check suggested above seems like a good start at supporting such a bubbling of events, by restricting the "bubbling" of JSF events accross JSF component boundaries.

We should build the required tests to guard against regressions, and make the above change.