Saturday, September 25, 2010

A brief description of JSF and Facelets



JSF and Facelets

Attempt to combine JSF and JSP is like trying to make foot hard into the glove: It may do, but there is a better solution before an expedient measure. In this article, JSF enthusiastic supporter of Rick Hightower introduces his favorite on the content of Facelets: easy HTML-style templating and reusable composite components.

As the recent Java? Server Appearance (JSF) project work, I am very fortunate for the first time using Facelets. About Facelets, my favorite is that it allows me to create reusable composite components. Be able to come up with a page (for example, JSP) and turn it into components, for my JSF development is really a great advantage. My conclusion is what? If not Facelets, then JSF can not be obtained from the largest gains.

JSF and Java Server Pages technology mismatch between, JSF development is a serious problem. The question is how to integrate JSP's dynamic content JSF component-based model. JSP attaches great importance to generate dynamic content output, but JSF requires JSP to coordinate the component model. For this task goes beyond the original purpose of JSP, so had a Distance.

Most JSF developers simply learn to deliberations to address these problems, but it is like a pillow on the hammer, injuring his head will eventually fall. Facelets is a more comprehensive solution: for JSF component model tailored templating language.

Facelets has the following attractive features:

鈼?Templating (like Tiles)

鈼?Composite Components

鈼?Custom logic tags

鈼?expression language

鈼?Development of the designer-friendly page

鈼?Create component library

These features than I expected to be more relevant and uniform. In this article, I discussed the first two: templating and composite components. I use Web-based application for the suspect for my family who developed a JSF application, I put it to use Facelets view update instead of Tiles. Before reading further, should download the sample code. If you want to discuss together with the operation, also need to install Facelets.

Facelets Overview

For Facelets may do the greatest wrong assumption that it is only a substitute for Tiles. Facelets much more than that: it is the new way of thinking JSF.

JSP is the kind of template of the language generated servlet. Subject and JSP servlet's doGet () and doPost () method is equivalent to (that is, as jspService () method). JSF custom tags (such as f: view and h: form) is called JSF components to render the current state of their own. JSF component model is independent of the life cycle of the generated JSP servlet's life cycle. This independence is a source of confusion.

Different with JSP, Facelets templating language that, from the start, on account of the life cycle of JSF components. Use Facelets, generated template build the component tree, not the servlet. This allows better reuse, as components can be combined into one component.

Facelets custom tags to reduce the preparation needs to use JSF. Facelets itself can use the JSF custom components. Communication JSF and Facelets requires very little special code: to do all the work is Facelet JSF tag library components declared. In the Facelets templating language can be used directly JSF components, without any additional development.

Facelets template framework

Building design in the provision of a template for the component framework, Facelets and Tapestry (see Resources) similar. However, we have the background for JSP, Facelets seem friendly and more than Tapestry. It allows the use of the familiar style of JSTL tags and JSTL / JSF / JSP expression language style. Greatly reduce the learning curve means you can start developing more rapidly.

Facelets allows the definition can be included directly into the page, or easily added to the Facelet tag library of components. Happily actually defined in the Facelets custom tag (composite components and JSP custom tag like tag) is very fast. Set to use these components, Facelets also allows the definition of site templates (and a smaller template). This is similar to using the Tiles, but less definition files. JSF components can also be customized for internal use Facelets, because the Facelets API provides JSF components can be easily integrated with the interface.

From Tiles to JSF and Facelets

As mentioned earlier, where the sample Web application to use for my on the JSF for the skeptics to create the sample series. It is an online CD store inventory management, create, read, update, and delete (CRUD) list. It includes a form to allow users to enter a new system, CD, a radio button list, allows the user to select the music category. When the user selects a classification, it immediately triggers some javascript form submission back to server. Application also includes a CD list, the user can list the title or the artist's CD on order.

The original application received from the Tiles view, support, and now I'll build Facelets view. I will start replacing the example with Facelets Tiles support beginning, and then write complex components.







相关链接:



How To Become A DBA From A Beginner



XviD to MP4



M2TS to MKV



Call Of Operations Of Foreign Carriers



Taobao Alipay betrayal?



Sonic Foundry Vegas 4.0 Image SHARPENING novice Collection 28



MKV TO Zune



IS Audit and Supervision Comparison



Easy to use Adventure And Roleplay



Listed company s three key financial indicators



Moving To The Countryside To The Computer Through Three Banks



10 training managers to work effectively



advanced video editing 2



for YOU Science - Screen Savers



Picked Shell Tools



Infomation Cartoons - Screen Savers



Flash MX Overview 1



Tuesday, September 14, 2010

CSS Syntax Guide (6) Categories property


CSS Syntax Guide

Categories property

1, display

Function: to change the display value element can be element type line, the transformation between block and list items.
Value:
none - do not show elements
block - block shows before and after the set break in the element
inline - remove the element before and after the break to make it into the other elements of the stream
list-item - the list of elements is set to line
Description: display attribute values can be generated into the list of additional titles and graphics into a line or so shows.

2, white-space

Function: Control elements of the blank.
Value:
normal - do not change, maintain the default value, the length of office in the browser page wrap.
pre - required documents show that the use of source code format.
nowarp - allow visitors inside the wrapping element.

3, list-style-type

Function: Specifies the list of the symbol or number used type of stress
Value:
none - no stress break
disc - disc stress operator (solid circles)
circle - circular stressed the symbol (hollow circle)
square - square stressed character (Solid)
decimal - a decimal number emphasize character
lower-roman - Lowercase Roman word stress break
upper-roman - Roman uppercase characters emphasize character
lower-alpha - lowercase letters emphasize character
upper-alpha - uppercase letters emphasize character
Examples:


item1
item2
item3
4, list-style-image
Function: list of standards used to replace the selected graphic symbol stressed
Value:
No graphics
url - URL address Graphics
Examples:

item1
item2
item3
5, list-style-position
Function: used to set the indentation stress break or stretch row, this attribute can be highlighted in the list to emphasize character or list of items other than alignment.
Value:
inside - indent, will emphasize the character and content of the list of projects aligned left border
outside - Shen Pai, Fu stressed that the list of outstanding items to the outside of the content of left border

6, list-style
Function: shorthand property, placed all the list of attributes in a statement.
Value:
list-style-type
list-style-position
list-style-image
These values are some of the details, see the various properties.
Examples:


item1
item2
item3





Recommended links:



F4v converter free



.mov TO .avi converter free



Yuv Format



Matroska converter