All I've done is cut the zoom prompt and menu from the original file, and pasted it into zoomLevelControl.xhtml.
However, now when I change the zoom level menu, I get an error:
<f:ajax> contains an unknown id 'image'
According to the AjaxBehaviorRenderer:
/**
* Attempt to find the component assuming the ID is relative to the
* nearest naming container. If not found, then search for the component
* using an absolute component expression.
*/
My guess is that the components within the composite component are considered to be within a naming container, isolating them from your image component. The strange part, though, is that the composite component is not acting like a naming container as I observed. To fix your problem w/ the current implementation, you have to use an absolute id to the image component (I would guess). But yeah, this is a very confusing situation for developers.
Frankly, for JSF 2.1, I would like to see us go to an XPath-like syntax (or jQuery) to find components because component IDs in JSF just plain suck.
-Dan