Total Pageviews

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:

Bino Mathew said...

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

Rosdi said...

Thank you.. you saved my face.

Anonymous said...

I prefer to say: you saved my head!!!
Thanks!!

Unknown said...

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

mahi said...

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.

Kolossus said...

Thanks, saved me a lot of hair pulling

Tosha Shah said...

THANKS A LOT

ساري said...

And a big thank you !