in primefaces there's the RequestContext class which add the ability to invoke javascript method from server side :
RequestContext context = RequestContext.getCurrentInstance();
//execute javascript oncomplete
context.execute("PrimeFaces.info('Hello from the Backing Bean');");
i was wondering if it's possible to accomplish that with jsf 2 without using primefaces, please advise.