jsf - SCRIPT5009: 'myfaces' is undefined -


i have jsf2 application running on was8.5.4 sever using libraries primefaces-3.4-snapshot-20120807.jar , javax.faces-2.1.9.jar . in 1 of pages , have p:commandlink button view attached documents .but when users click on component , browser displays error script5009: 'myfaces' undefined .as result, user not able view documents . please advise how fix issue.

was ships myfaces out box, yet you're attempting override altogether providing mojarra via webapp, apparently without instructing should load war-bundled jsf instead of was-bundled jsf.

get rid of javax.faces-2.1.9.jar (that's mojarra). being full fledged java ee container ships jsf out box (which myfaces).

the error faced javascript error. javascript variable myfaces defined. it's automatically defined when myfaces loaded , auto-includes own jsf.js javascript file in jsf page. failure can happen when either <h:head> missing, or when mojarra's own jsf.js javascript instead being auto-included (you perhaps know, web resources in war have higher loading precedence in jars , server itself). mojarra's jsf.js has indeed variable name myfaces defined. it's instead mojarra. however, html output of jsf components being rendered myfaces, loaded server before war gets chance load bundled mojarra, , therefore render , expect myfaces javascript variable (but available, explained).


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -