Check the generated HTML source. Is the onclick there? If so, can you post an extract with all relevant/related code? If not (even more, most of HTML attributes are missing), then you've a collision in the JSF libraries used.
Since JSF Mojarra 1.2_05 there was a performance enhancement in generating of the standard HTML attributes and the logic was also moved from jsf-impl.jar to the jsf-api.jar. If you have a JSF API of older than 1.2_05 wandering in the classpath while you have a JSF impl of 1.2_05 or newer in your webapp, then you will see this problem. Most of the HTML attributes except of id, name, class such as onclick, onmouseover, etcetera are missing in generated HTML source.
You see this problem often when you've different versioned JSF libraries in both the Appserver/lib and the Webapp/WEB-INF/lib and then often in Glassfish servers. In case of loose JSF libraries in Appserver/lib, just remove them. They belongs in Webapp/WEB-INF/lib. In case of Glassfish which has the JSF libraries merged into its javaee.jar file, you should follow the Glassfish upgrade instructions along the JSF download.