Skip to content Skip to sidebar Skip to footer

Template (jsf) Is Not Working Properly. When I Override The Elements, They Dont Appear On The Page.

I have done template in 3 steps: Firstly i created a xhtml file with content that is common to all the pages: AllComponentsTemplate.xhtml html, head and body, and as AllComponentsTemplate.xhtml will be included, it doesn't need to add template attribute, or define sections.

If i were you I would set AllComponentsTemplate.xhtml as the main template it self with html, h:head and h:body, etc.., and let Trial.xhtml implement it. Later on if you needed another pages to have a shared view, you go ahead and create AnotherComponentsTemplate.xhtml and let them implement it.

Solution 2:

Refer this link it will help you as you are begineer.

http://www.mkyong.com/jsf2/jsf-2-templating-with-facelets-example/

and considering your problem use h:head and h:body for all html tags as Najjar metioned in his answer.

Post a Comment for "Template (jsf) Is Not Working Properly. When I Override The Elements, They Dont Appear On The Page."