Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6598423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:20:48+00:00 2026-05-25T18:20:48+00:00

I am trying to create a simple project layout with logo and horizontal tabs

  • 0

I am trying to create a simple project layout with logo and horizontal tabs on top of the page. Some menus on the left hand side. Both the top tabs and menu of left hand side should refresh the content in center. I tried this with ui:composition template / rich tabbedpanel. No luck yet. This may be a common structure followed in lot of projects. May be this can be easily done in CSS without richfaces. Would appreciate if somebody can post the code for this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:20:49+00:00Added an answer on May 25, 2026 at 6:20 pm

    This is generic project layout which should fits your needs (topmenu, left menu, content in center and footer) with facelets.

    MainLayout.xhtml (remeber to add doctype at the beginning)

    <?xml version="1.0" encoding="UTF-8" ?>
    
    <html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:a4j="http://richfaces.org/a4j"
        xmlns:rich="http://richfaces.org/rich">
    
        <f:view contentType="text/html" />
    
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <meta http-equiv="Pragma" content="no-cache" />
            <meta http-equiv="Cache-Control" content="no-cache" />
            <meta http-equiv="Expires" content="0" />
            <ui:insert name="headStyles" />
            <title>
                <ui:insert name="pageTitle" />
            </title>
            <ui:insert name="htmlHeader" />
        </head>
    
        <body>
            <div id="pageContainer" >
                <div id="headerContainer" class="topMenu">
                    <ui:insert name="header" />
                </div>
                <div id="mainContainer" >               
                    <ui:insert name="main"/>        
                </div>
                <div id="footerContainer" > 
                    <ui:insert name="footer" />
                </div>
            </div> 
        </body>
    </html>
    

    Two ColummnsLayout.xhtml

    <?xml version="1.0" encoding="UTF-8" ?>
    <ui:composition
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:a4j="http://richfaces.org/a4j"
        xmlns:rich="http://richfaces.org/rich"
        template="mainLayout.xhtml">
    
        <ui:define name="headStyles">   
            <!-- define your styles HERE -->
        </ui:define>
    
        <ui:define name="pageTitle">    
            <!-- define your title HERE -->
        </ui:define>
    
        <ui:define name="htmlHeader">   
            <!-- define your header HERE -->
        </ui:define>
    
        <ui:define name="menu"> 
            <!-- define your richfaces top Menu HERE -->
        <ui:define>
    
        <ui:define name="main">     
    
            <div id="menuContainer" class="leftColumn">
                <ui:insert name="leftMenu"/>
            </div> 
    
            <div id="contentContainer" class="contentColumn">                                   
                <ui:insert name="contentMain"/>
            </div> 
    
        </ui:define>
    
    </ui:composition>
    

    Then if you want menus with simple html and css have a look at ListaMatic It’s good starting point, with a simple list and using cascading style sheets you can create horizontal/vertical Toolbars.

    However if you want to use richfaces menu toolbar you have examples here.

    Finally for refreshing parts of you page then you need a ajax component (e.g a4j:support) and use de attribute reRender (defining id(s) of JSF component(s) that should be rerendered after an Ajax request)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a simple flex4 project which involves some timers that trigger
I'm trying to create an archtype for a simple project, this project contains some
I am trying to create a simple user maintenance page for a school project.
Im using Eclipse 3.4, EclipseMe 1.7.9. Im trying to deploy/create package a simple project
I'm trying to create a simple custom validator for my project, and I can't
I am trying to create a simple page that enters data in to a
I'm trying to create a simple project with hadoop. I am new to IntelliJ
I am new in spring mvc3,and I am trying to create a simple project
I'm trying to create a simple web project using Tomcat in Java. In the
in a small c# project, I'm trying to create a simple custom configsection. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.