I\'m using JSF templates and Primefaces.
Javascript code does not seem to be working under ui:composition and ui:define tags. The following code is not hitting the load
Everything outside is ignored during building the view. Also, redeclaring once again is unnecessary. To use a script which runs during on page load, better use a . This will be relocated to end of body and thus be invoked after the necessary HTML DOM elements are been built. This is also somewhat faster than an onload.
All with all, your entire content.xhtml must look like this:
alert("Working!!");
Random text