2010/11/01

One or more resources have the target of 'head', but no 'head' component has been defined within the view.


Environment: JSF 2 + Facelets + PrimeFaces 2.1 + Glassfish V3

As I run my test.xhtml, it will show this error message in console:
sourceId=null[severity=(ERROR 2), summary=(One or more resources have the target of 'head', but no 'head' component has been defined within the view.), detail=(One or more resources have the target of 'head', but no 'head' component has been defined within the view.)] sourceId=null[severity=(ERROR 2), summary=(One or more resources have the target of 'head', but no 'head' component has been defined within the view.), detail=(One or more resources have the target of 'head', but no 'head' component has been defined within the view.)]


You will see this javascript error in my browser

Root Cause: I need to edit my template.xhtml
[Before]

[After]

Demo

8 comments:

  1. You answer was very useful.
    Thanks for the putting this on web.

    ReplyDelete
  2. Thank you.. you saved my face.

    ReplyDelete
  3. I prefer to say: you saved my head!!!
    Thanks!!

    ReplyDelete
  4. its great i m thinking is mine error but its Mistake of Designer thx dear .....
    love u .....

    ReplyDelete
  5. Hi,
    Thank you for your tip, but for me the bug still persist. I am using icefaces along with the jsf. I tried giving the <h: to the components but while submitting a form, when the enter button is pressed, the form is not submitted and the field gets cleared as well. Kindly guide me.

    ReplyDelete
  6. Thanks, saved me a lot of hair pulling

    ReplyDelete