FAQs
Search
Recent Topics
Flagged Topics
Hot Topics
Best Topics
Register / Login
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
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Tim Cooke
Liutauras Vilda
Bear Bibeault
Devaka Cooray
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Campbell Ritchie
Henry Wong
Saloon Keepers:
Tim Moores
Ron McLeod
salvin francis
Stephan van Hulst
Vijitha Kumara
Bartenders:
Tim Holloway
Carey Brown
Frits Walraven
Forum:
JSF
Facelets and JSF
Michał Jurczuk
Greenhorn
Posts: 5
posted 8 years ago
How can add my
JSP
(
JSF
) file into .xhtml facelet file?
I have template file:
<?xml version='1.0' encoding='UTF-8' ?> <!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=UTF-8" /> <link href="./css/default.css" rel="stylesheet" type="text/css" /> <link href="./css/cssLayout.css" rel="stylesheet" type="text/css" /> <title>Facelets Template</title> </head> <body> <div id="top"> <ui:insert name="top"></ui:insert> </div> <div> <div id="left"><ui:insert name="left">left</ui:insert></div> <div> <div id="right"> <ui:insert name="right">Right</ui:insert> </div> <div id="content" class="right_content"> <ui:insert name="content">Content</ui:insert> </div> </div> </div> <div id="bottom"> <ui:insert name="bottom">Bottom</ui:insert> </div> </body>
template client:
<?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE composition 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"> <body> <ui:composition template="./myTemp.xhtml"> <ui:define name="top"> </ui:define> <ui:define name="left"> </ui:define> <ui:define name="right"> </ui:define> <ui:define name="content"> <ui:include src="header.xhtml"/> </ui:define> <ui:define name="bottom"> </ui:define> </ui:composition> </body> </html>
and header.xhtml file:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>TODO supply a title</title> </head> <body> <rich:panel> <f:facet name="header" > Admin </f:facet> example example </rich:panel> </body> </html>
1. Can I use normal JSP (JSF) file ?? Or all have to be .xhtml??
2. How can I add tab completion for RichFaces??
It is sorta covered in the
JavaRanch Style Guide
.
Post Reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Error:The XML page cannot be displayed Cannot view XML input using style sheet
Why events are not fired when value changes in h:selectOneMenu? I am stuck!
JSF, Facelets losing context after reload
Help Needed For JSF FACELET RENDERING PROBLEM
Problem rendering facelets templates
More...