Committed improvement to the 4.0 trunk at revision 41494.
Since our ace:ajax tag is modelled after the f:ajax tag of Mojarra, to add this improvement an approach similar to that of Mojarra was implemented. The main idea is to create an application-scoped stack that stores client behavior settings. Then, as the facelet tags are being processed, when an ace:ajax tag is reached, after we determine that the ace:ajax tag is wrapping other components (in our AjaxBehaviorHandler class), we add the facelet context, tag settings and event name to this stack. Then all the tags of components that implement IceClientBehaviorHolder will look for this stack and add the behaviours to the newly-created component. After all children of the ace:ajax tag have been processed, the behaviour settings are removed (popped) from the stack.
Thus, the ace:ajax tag follows the same rules or precedence described in the section 10.4.1.1 of the JSF 2.0 specification.
Unfortunately, at the moment it doesn't seem feasible to also support/affect standard (h: ) components nested inside our ace:ajax tag, since Mojarra and Myfaces use different approaches to support f:ajax in wrapping mode. Each of them uses their own classes that aren't part of the standard API. Many of these methods are private and we can't access them. Also, the different component implementations expect different things to be available when looking for ajax behaviours defined by a wrapping tag. There might also be some conflicts using ids to store application-wide objects. Each implementation has its own approach since the JSF specification doesn't mention any details regarding how this mechanism should be implemented. Also, when traversing the tag tree, it's not possible to directly access tag children and the components they create at the times where it would be optimal do be able to do so.
However, both ace:ajax and f:ajax tags can coexist and each will only affect the components they support. It's possible to wrap a set of ace: and h: components inside an ace:ajax and f:ajax tag. The order is not relevant.
Example for scenario #1 above: