This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes problem when using facelets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "problem when using facelets" Watch "problem when using facelets" New topic

problem when using facelets

Aioria sun

Joined: Jun 03, 2009
Posts: 4
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~~~
Annu Vinayak

Joined: Jul 17, 2009
Posts: 19
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.
I agree. Here's the link:
subject: problem when using facelets
Similar Threads
problem with code-completion for Facelets custum tags
duplicate call on preRenderView event
JSF, Facelets losing context after reload
Split Pane effect with JSF 1.2, Facelets, Javascript, RichFaces
Trying to get layout worked out for three content panes (using facelets template)