#1 Add onbegin attribute and register deferred script resource as
rendered in Mojarra/MyFaces/PrimeFaces