• Post Reply Bookmark Topic Watch Topic
  • New Topic

Templates should not be this hard

 
John Morgan
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working with Netbeans 8.0 and JSF2.2. I am trying to create a web site that has a common header, footer, and menu. The only part that would be dynamic is the content. I can not find a tutorial or help file that would accomplish what I need. So here goes...

1) I need a common template that has 4 parts, Header, Footer, Menu, Content
2) The header, footer and menu are to be in a separate files of which are called from the main template
3) The content will change based on the menu item changed
4) The menu has to change the content section only

I know how to do this in HTML but I am trying to set up some thing in JSF to learn more on JSF pages.
All I am looking for is an example that I can follow along with having the multiple pages as well having the menu change the content (I have done a ton of internet searching but nothing really fits the bill).

Thanks.

This is the code I have currently.

Index (Main Template)


Footer
 
John Morgan
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well after lots of trial and error I figured out part of it.... the "<ui: composition>" tags were in the wrong place as well as needing to change the index.xhtml a little bit.




Not sure if this is the correct way or not but it seems to work.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!