-
1. Re: Possible Reasons for "ReferenceError: jsf is not defined"
jigg4 May 10, 2013 2:53 AM (in response to jigg4)Ok I watched into my header in firebug of the generated site and found this two JavaScripts:
1) jsf.js.faces?ln=javax.faces&stage=Development
2) jsf.js.faces?ln=org.apache.myfaces.core.api
After 2) i can see all the richfaces JS. So actually 1) and 2) should be loaded before the richfaces JS?
After setting breakpoints in 2) on line 40 where it says: var jsf = new function() {.......
And also a breakpoint in the richfaces-queue.js.faces, where the jsf function is used, i noticed that the richfaces-queue.js.faces is loaded BEFORE the jsf.js, which doesnt make any sense to me.
Any ideas why this is happening guys?
EDI: I have solved this issue by editing a param in my web.xml:
<context-param>
<param-name>org.apache.myfaces.USE_MULTIPLE_JS_FILES_FOR_JSF_UNCOMPRESSED_JS</param-name>
<param-value>false</param-value>
</context-param>
This one was set to true, which caused the above errors. By setting it to false solves the issue, just in case anybody runs into the same problem