I like to close
https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-49 as "Won't
fix" as this request suffers from the chicken and the egg problem. In
this particular case we cannot make sure the client id is rendered
before the JavaScript executes.