component for the defined event, it creates a valuebinding for this script. The only thing i need to do now is to use this value binding, if exists, for javascriopt generation.
Also, the custom component renderer must have set encodeChildren = true. Also, take care that the client id is written to the id attribute for the top level html element of the custom component, and that this element is generated by the encodeBegin() method, and not the encodeEnd(). If you are using MyFaces, delegate the renderChildren() to the Apache RenderUtils, because the default implementation of the Renderer class is buggy.
If anybody is interested, please let me know. I can provide a tutorial ...