JSF: Integration of JSF + Spring + Hibernate

Source: Internet
Author: User

This article describes JSF. First, let's give readers a brief introduction to JSF: JSF is a java web standard and may replace the jsp era. JSF is the user interface framework of Java Web applications.

JSF provides a set of APIs and tag libraries for creating Page forms and complex interface elements.

JSF makes it easier to compile the code for form submission. The code can respond to different button submissions, change some values or select some users.

◆ Managed beans: This simplifies JSF's method for processing request parameters.

◆ ELExpression Language): JSF has a set of expression languages for accessing java bean attributes and set elements.

◆ Form field type conversion and verification

◆ Special attributes

◆ UI Component Model

JSF provides a set of flexible component models, including:

◆ A set of UIComponent classes that define the status and behavior of the UI component.

◆ Rendering model: defines how to present components in different ways

◆ Event and listener models are used to process component events.

◆ Conversion model: convert data

◆ Verification Model: How to verify the validity of data

Getting started with JSF: Data Conversion Model

When a component is bound to an object, there are two views for component data:

One is the model view: From this perspective, the data is represented by the java object type, such as int, long, Date, and so on.

One is to present the view: From this perspective, the data is expressed as a form that can be read or modified by people. For example, a Date type may be displayed as a string in the yyyy-MM-dd format, or three strings, representing the year, month, and day.

You can define your own converter to convert data.

JSF Introduction: event and listener Model

Event: value change event, Action event, and data model event.

Value Change: for example, the value of the input box is changed and the checkbox is selected.

Action event: click a button or hyperlink

Data Model event: this event is triggered when a row of the UIData component is selected.

JSF entry: navigation model

Navigation-rule, which can contain one from-view-id and multiple navigation-Cases

Each navigation-case mainly includes the page for turning.

From-view-id: Current page

From-action: From which action Method

From-outcome: Logical name From

To-view-id: To which page

The problem solved by navigation is: from where to where. In a word: from the from-view-id page, when the from-action method is called and its return value is from-outcome, it is switched to the to-view-id page.

  1. Detailed description of JSF request processing process
  2. Use Acegi to protect JSF applications
  3. JSF technology and components
  4. JSF Development Problems and Solutions
  5. Analysis of unit tests for JSF Projects

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.