JSF is a standard web user interface framework for Java technology. Java Server Faces (JSF) utilizes standard components but supports the writing of custom components, which are complicated to write. JSF version 1.0 was standardized in 2004 and version 1.2 in 2006. It is first recommended to use version 1.2 to write custom components due to easier tagging. However, to use JSF version 1.2, JSP version 2.1 is necessary, which can be run on Tomcat 6.0.
Writing a standalone JSF component is complicated and entails the following:
- UI component class
- Renderer class (optional)
- Component registration
- JSF configuration file
- Need to write a JSP tag
- Need to write a JSF tld
In short, this presentation showed a lot of code in a short amount of time and was very confusing to follow. In the end, it appears a framework or two will be in place to ease this development but right now requires a few different open-source projects. Rather than confuse this issue, it would be beneficial to look for articles at http://www.jsfcentral.com and research the below open-source projects.
Look into the following open-source projects to help augment writing JSF custom components:
- Apache Shale (can perform registration using annotations rather than XML)
- Apache Shale Clay - Replaces JSP (ease JSF tag handler)
- Facelets (ease JSF tag handler)
- JSFTemplating
- Weblets
Couple notes:
- Facelets tag library or Apache Clay can assist with the needed JSF tag handler.
- Facelets -> Write a WEB-INF/name.taglib.xml. Create a "facelet-taglib" xml element.
- In JSP version 2.1, you can use a tag file.
Benefits of Facelets:
- Built specifically for JSF components, JSP was not
- Will heavily influence JSF platform 2.0
- Changes reflected immediately
- No need t restart the application
- Excellent error messages
In summary, it appears a projects called "Intuition" is being developed to ease the implementation of Apache Shale, Clay, Facelets, templating, etc. Intuition is not yet available. It will be available with Facelets or Open-Source. Keep tuned to http://www.jsfcentral.com
Intuition Notes
- Must load one taglib.
- Write a class with properties and annotate the properties, which will expose the properties and handle state.
- When writing the encode method, you can mainly delegate to a super class. State holder methods do not need to be written but the encoding methods must be written.
- A Faces template **.xhtml file) is written to go with the class.
- Uses Shale annotations and Facelets
- Requires only a component class and a template
Subscribe to:
Post Comments (Atom)
1 comment:
burgeoning beta shillwsfcs represents embed passage ranbaxy biztalk dreezsen preserve waterside
lolikneri havaqatsu
Post a Comment