Facelets step by step

阅读更多
Facelets step by step:
1. Need 3 JAR files in WEB-INF/lib
§ jsf-facelets.jar, el-api.jar, el-ri.jar
§ Download from http://facelets.dev.java.net/
 
 
2.In web.mxl
 Extension of faceletsfiles.
E.g., foo.xhtmlwill be accessed as foo.faces.
javax.faces.DEFAULT_SUFFIX
.xhtml
How often to check for changes
after initial deployment.
facelets.REFRESH_PERIOD
2
Use debug/development output.
facelets.DEVELOPMENT
true
...
 
 
3. faces-config.xml Setting
com.sun.facelets.FaceletViewHandler
   
...
 
 
4. ? Define template file
¡§ Common data for all pages goes directly in template file
¡§ Sections that will be changed marked with ui:insert
...

 

Content shared by all clients
...
? Define client file(s)
¡§ Specify template file with ui:composition
¡§ Give content for the sections with ui:define
Content to go in "body" section of template
 
 
5. Use xhtml
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
...

你可能感兴趣的:(JSF,UI,Web,SUN,XHTML)