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.
- Detailed description of JSF request processing process
- Use Acegi to protect JSF applications
- JSF technology and components
- JSF Development Problems and Solutions
- Analysis of unit tests for JSF Projects