Total Pageviews

Showing posts with label Facelets. Show all posts
Showing posts with label Facelets. Show all posts

2010/11/02

JSF2 + Facelets + PrimeFaces 2.2


1. Download PrimeFaces jar files from http://www.primefaces.org/downloads.html
2. Utilize JSF 2.0 and copy PrimeFaces-2.2.jar to WEB-INF/lib

3. you don't need to register servlet and servlet mapping in web.xml from JSF 2.0

4. You don't need to declare p:resources tag in head area

5. Create a simple page with 5 PrimeFaces command buttons in panel

6. Demo


Compare PrimeFaces 1.x with PrimeFaces 2.x

2010/11/01

How to integrate JSF 2.0 with Facelets

1. Create Dynamic Web Project. Assign project name, target runtime, dynamic web module version, and configuration.


2. Click Next

3. Click Next

4. Select JSF 2.0 in user library, and click finish.

5. The Dynamic Web Project had been created. (NOTICE: you won't need jsf-facelets.jar anymore)

6. Edit web.xml. Added one context parameter.

7. You don't need to add view-handler in faces-config.xml

8. Create header template page

9. Create footer template page

10. Create template page. Including header, title, body, and footer area.

11. Create test.xhtml. Apply template.xhtml, and insert new contents into title area and body area.

12. Demo


Compare JSF 1.2 with JSF 2.0 concerning configurations:

2010/08/27

PrimeFaces + Facelets Configuration

1. With regard to facelets configuration, please check: http://albert-myptc.blogspot.com/2010/08/1.html

2. Download primefaces-1.0.2.jar from http://www.primefaces.org/downloads.html


3. Edit web.xml. Add Resource Servlet and servlet mapping

4. Add p:resources tag to head tag in template.xhtml
Resource component needs to be present on a page that has PrimeFaces components, this component outputs the link and script tags that are necessary for PrimeFaces components to work. The ideal place to put resources component would be the html head element.

5. Create a test.xhtml, apply template.xhtml as its template page. And add p:editor in the body part.

6. Check the result

2010/08/26

Facelets Quick Start


1. download facelets jar file from https://facelets.dev.java.net/

2. copy jsf-facelets.jar to WEB-INF/lib

3. download jakarta-taglibs-standard jar files from

4. copy jstl.jar and standard.jar to WEB-INF/lib

5. add facelets initialization parameter in web.xml

6. add FaceletViewHandler in face-config.xml

7. ceate header.xhtml in template folder

8. create footer.xhtml in tempate folder

9. create template.xhtml in template folder

10. create test.xhtml which apply template.xhtml

11. check the result

Enable code completion in xhtml file (facelets)

[Problem] code completion function does not work in xhtml file

[Solution]
Window > Preferences

General > Content Types > Text > JSP

Add (xhtml)

Click OK

[CHECK Result]

2008/11/23

Integrate Seam with Apache Trinidad, Facelets and JPA

Agenda


  • Seam
  • Seam + JSF
  • Seam Annotation in JSF Implementation
  • Seam + JPA (No need to change)
  • Environment Configuration
  • Use Case
  • Page Flow
  • Class Diagram
  • Sequence Diagram


http://www.slideshare.net/junyuo/integrate-seam-with-apache-trinidad-facelets-and-jpa-presentation

2008/10/21

Facelets with Trinidad - Myfaces Wiki

Facelets with Trinidad - Myfaces Wiki

This article is used to explain how to integrate Facelets with Trinidad.