aspose file tools*
The moose likes JSF and the fly likes Help Needed For JSF FACELET RENDERING PROBLEM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Help Needed For JSF FACELET RENDERING PROBLEM" Watch "Help Needed For JSF FACELET RENDERING PROBLEM" New topic
Author

Help Needed For JSF FACELET RENDERING PROBLEM

VijayAnand Venkateswaran
Greenhorn

Joined: Aug 04, 2008
Posts: 10
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











Ship Is Safe at Shore,But its not Built For That
 
jQuery in Action, 2nd edition
 
subject: Help Needed For JSF FACELET RENDERING PROBLEM
 
Similar Threads
Error:The XML page cannot be displayed Cannot view XML input using style sheet
Facelets + CSS problem; CSS is not applied after first request
Problem rendering facelets templates
Facelets and JSF
Why events are not fired when value changes in h:selectOneMenu? I am stuck!