• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem when using facelets

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, guys
i am working on a project using facelets. I got a problem on displaying my pages correctly. On my root directory, i got a template.xhtml file which is a facelet template. i divided the template into 3 layouts which are header, content and footer. All other pages should be displayed in the content layout. But, only the pages under root directory can refer to the template and display in the content layout. The other pages which are not under root directory just display without the template. ( i got some pages under a directory call "post" ).

i codes the template.xhtml page like this:


post.xhtml which under directory "post", i wrote like this:


any ideas? any help is appreciated~~~
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am not sure if you have tried giving the relative path of the folder in which the template is contained. I am usinf the same in my project without any issues.

I have added the following inside <f:view>
<ui:composition template="/layouts/layout.xhtml"> in my xhtmls and they work just fine.
 
Well THAT's new! Comfort me, reliable tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic