Hi I got a simple fresh project based on MyFaces 2.0.11 with Primefaces 3.0 on Tomcat 6
When I\'m trying to navigate to a page I\'m getting Uncaught ReferenceE
This script will only be auto-included whenever you use <f:ajax> in the view. If you don't, then it won't be auto-included.
Just add an extra check before you call jsf.ajax.addOnEvent
:
if (typeof jsf !== 'undefined') {
jsf.ajax.addOnEvent(someFunctionName);
}
Or, explicitly include the library by <h:outputScript>
on the proper library
, like as you already did.