• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Help Needed For JSF FACELET RENDERING PROBLEM

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All , I am trying Facelets With JSF,Below is my template.xhtml file.I try to create a page which contains a header,a footer, a left aligned navigation panel,and a content in center of page.

The Problem I Face Is , Header,Footer and left panel is displaying as I Expect,but the content instead of displaying at the center,it displays below the left navigation panel.

Also If I Change the tempalate.xhtml by placing header,content at center,left aligned navigation,footer. now the navigation panel link goes down of content.

I use jsf 1.2. Am i doing any thing Wrong???. I hope facelets will do this correctly.

TEMPLATE.XHTML
----------------------

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="include/cms.css" type="text/css" rel="stylesheet" />
<title>Insert title here</title>
</head>
<body>
<div id="header">
<ui:insert name="header">
<ui:include src="testheader.xhtml"></ui:include>
</ui:insert>
</div>
<div id="left">
<ui:insert name="leftPanel">
<ui:include src="leftPanel.xhtml"></ui:include>
</ui:insert>
</div>
<div id="center">
<ui:insert name="content">
<ui:include src="testNetCreditUpload.xhtml"></ui:include>
</ui:insert>
</div>
<div id="footer">
<ui:insert name="footer">
<ui:include src="testfooter.xhtml"></ui:include>
</ui:insert>
</div>
</body>
</html>

This Is How I Invoke my xhtml Page-Template Client
---------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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:rich="http://richfaces.org/rich"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j">
<head>
<title>SmsSetings</title>
</head>
<body>
<ui:composition template="layout.xhtml">
<ui:define name="content">

The Content Goes Here...
</ui:define>
</ui:composition>
</body>
</html>


I had follwed this link fOR Reference
http://www.ibm.com/developerworks/java/library/j-facelets/

Please Help Me ....

Regards
Vijay









 
reply
    Bookmark Topic Watch Topic
  • New Topic